twitter / pelikan

Pelikan is Twitter's unified cache backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compilation error

1a1a11a opened this issue · comments

I have encountered a few errors in compilation

  1. install-check.sh and install-fluxcapacitor.sh: set -euo pipefail masks installation error log, so that when the installation fails, no log is printed and the temp dir is deleted.
  2. install-check.sh and install-fluxcapacitor.sh: TOPLEVEL is not used and fails when the repo is not git-cloned.
  3. install-check.sh: using out-of-source build causes error reported in check#172.
  4. install-fluxcapacitor.sh: on some systems (my ubuntu 18.04 box), the installation failed due to conflicting function signatures, see below. However, a fresh installed ubuntu 18.04 with the same version of kernel, cmake, gcc does not have this issue. And both systems are using the exactly same header at /usr/include/x86_64-linux-gnu/sys/time.h.
  5. CMakeLists.txt: check_symbol_exists does not work in some environments, for example my ubuntu box and my mac, but a fresh installed ubuntu 18.04 does not have the problem.

fluxcapacitor compilation error

src/preload.c:50:5: error: conflicting types for ‘gettimeofday’
 int gettimeofday(struct timeval *tv, struct timezone *tz) {
     ^~~~~~~~~~~~
In file included from src/preload.c:9:0:
/usr/include/x86_64-linux-gnu/sys/time.h:66:12: note: previous declaration of ‘gettimeofday’ was here
 extern int gettimeofday (struct timeval *__restrict __tv,
            ^~~~~~~~~~~~
Makefile:22: recipe for target 'fluxcapacitor_preload.so' failed

I will fix 1, 2, 3 in the next PR, but I am not sure what is the best way to handle 4 and 5.