hydro-project / fluent

A data-driven compute platform
Apache License 2.0
1.22k stars 173 forks source link

Compile errors and warnings #15

Closed mia0x75 closed 6 years ago

mia0x75 commented 6 years ago
$ scripts/build-all.sh 
-- The C compiler identification is GNU 8.1.1
-- The CXX compiler identification is Clang 6.0.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Protobuf: /usr/lib64/libprotobuf.so;-lpthread (found version "3.5.0") 
-- Found Protobuf: /usr/lib64/libprotobuf.so;-lpthread;-lpthread (found version "3.5.0") 
-- Downloading/updating googletest
-- Configuring done
-- Generating done
-- Build files have been written to: /src/github.com/fluent-project/fluent/build/googletest-download
Scanning dependencies of target googletest-download
[ 11%] Creating directories for 'googletest-download'
[ 22%] Performing download step (git clone) for 'googletest-download'
Cloning into 'googletest-src'...
Note: checking out 'release-1.8.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at ec44c6c Merge pull request #821 from mazong1123/master
[ 33%] No patch step for 'googletest-download'
[ 44%] Skipping update step for 'googletest-download'
[ 55%] No configure step for 'googletest-download'
[ 66%] No build step for 'googletest-download'
[ 77%] No install step for 'googletest-download'
[ 88%] No test step for 'googletest-download'
[100%] Completed 'googletest-download'
[100%] Built target googletest-download
-- Found PythonInterp: /bin/python (found version "2.7.15") 
-- Found Protobuf: /usr/lib64/libprotobuf.so;-lpthread;-lpthread;-lpthread (found version "3.5.0") 
-- Found Protobuf: /usr/lib64/libprotobuf.so;-lpthread;-lpthread;-lpthread;-lpthread (found version "3.5.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /src/github.com/fluent-project/fluent/build
Scanning dependencies of target zeromq
Scanning dependencies of target zeromqcpp
[  1%] Creating directories for 'zeromqcpp'
[  2%] Creating directories for 'zeromq'
[  3%] Performing download step (download, verify and extract) for 'zeromq'
[  4%] Performing download step (git clone) for 'zeromqcpp'
-- Downloading...
   dst='/src/github.com/fluent-project/fluent/build/vendor/zeromq/src/zeromq-4.2.5.tar.gz'
   timeout='none'
-- Using src='https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz'
Cloning into 'zeromqcpp'...
-- Retrying...
-- Using src='https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz'
-- [download 0% complete]
-- [download 1% complete]
-- [download 2% complete]
Already on 'master'
Your branch is up to date with 'origin/master'.
[  5%] No patch step for 'zeromqcpp'
[  6%] No update step for 'zeromqcpp'
[  7%] No configure step for 'zeromqcpp'
[  8%] No build step for 'zeromqcpp'
-- [download 4% complete]
[  9%] No install step for 'zeromqcpp'
[ 10%] Completed 'zeromqcpp'
[ 10%] Built target zeromqcpp
[ 11%] Running C++ protocol buffer compiler on ./include/proto/requests.proto
Scanning dependencies of target flproto
[ 12%] Building CXX object CMakeFiles/flproto.dir/requests.pb.cc.o
In file included from /src/github.com/fluent-project/fluent/build/requests.pb.cc:4:
/src/github.com/fluent-project/fluent/build/requests.pb.h:7:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
-- [download 5% complete]
1 error generated.
make[2]: *** [CMakeFiles/flproto.dir/build.make:71: CMakeFiles/flproto.dir/requests.pb.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:106: CMakeFiles/flproto.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
-- [download 6% complete]
.
.
.
-- [download 100% complete]
-- Downloading... done
-- extracting...
     src='/src/github.com/fluent-project/fluent/build/vendor/zeromq/src/zeromq-4.2.5.tar.gz'
     dst='/src/github.com/fluent-project/fluent/build/vendor/zeromq/src/zeromq'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 14%] No update step for 'zeromq'
[ 14%] No patch step for 'zeromq'
[ 14%] Performing configure step for 'zeromq'
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether C compiler accepts -std=gnu11... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether g++ supports C++11 features by default... yes
checking for a sed that does not truncate output... /bin/sed
checking whether to build with code coverage support... no
checking for a sed that does not truncate output... (cached) /bin/sed
checking for gawk... (cached) gawk
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for xmlto... /bin/xmlto
checking for asciidoc... /bin/asciidoc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /bin/ld -m elf_x86_64
checking if the linker (/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for valgrind... no
checking whether the C compiler works... yes
checking whether we are using Intel C compiler... no
checking whether we are using Sun Studio C compiler... no
checking whether we are using clang C compiler... no
checking whether we are using gcc >= 4 C compiler... yes
checking whether the C++ compiler works... yes
checking whether we are using Intel C++ compiler... no
checking whether we are using Sun Studio C++ compiler... no
checking whether we are using clang C++ compiler... no
checking whether we are using gcc >= 4 C++ compiler... yes
checking whether to enable debugging information... no
checking whether to enable code coverage... no
checking if TIPC is available and supports nonblocking connect... yes
checking whether to enable ASan... no
checking for library containing dladdr... -ldl
checking for pthread_create in -lpthread... yes
checking for clock_gettime in -lrt... yes
checking whether C++ compiler supports -fvisibility=hidden... yes
checking whether C++ compiler supports dso visibility... yes
checking for asciidoc... yes
checking for xmlto... yes
checking whether to build documentation... yes
checking whether to install manpages... yes
configure: Choosing polling system from 'kqueue epoll devpoll pollset poll select'...
configure: Using 'epoll' polling system with CLOEXEC
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/eventfd.h usability... yes
checking sys/eventfd.h presence... yes
checking for sys/eventfd.h... yes
checking whether EFD_CLOEXEC is supported... yes
checking whether SO_PEERCRED is declared... yes
checking whether LOCAL_PEERCRED is declared... no
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for ssize_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for uint32_t... yes
checking for working volatile... yes
configure: Using tweetnacl for CURVE security
checking "with_norm_ext = no"... no
checking how to enable additional warnings for C++ compiler... -Wall
checking how to turn warnings to errors in C++ compiler... -Werror
checking how to enable strict standards compliance in C++ compiler... -pedantic
checking whether compiler supports __atomic_Xxx intrinsics... yes
checking return type of signal handlers... void
checking for perror... yes
checking for gettimeofday... yes
checking for clock_gettime... yes
checking for memset... no
checking for socket... yes
checking for getifaddrs... yes
checking for freeifaddrs... yes
checking for fork... no
checking for posix_memalign... no
checking for mkdtemp... yes
checking for accept4... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking whether signature of pthread_setname_np() has 1 argument... no
checking whether signature of pthread_setname_np() has 2 arguments... yes
checking whether signature of pthread_setname_np() has 3 arguments... no
checking whether pthread_set_name_np() exists... no
checking whether pthread_setaffinity_np() exists... yes
checking whether SOCK_CLOEXEC is supported... yes
checking whether O_CLOEXEC is supported... yes
checking whether SO_BINDTODEVICE is supported... yes
checking whether SO_KEEPALIVE is supported... yes
checking whether TCP_KEEPCNT is supported... yes
checking whether TCP_KEEPIDLE is supported... yes
checking whether TCP_KEEPINTVL is supported... yes
checking whether TCP_KEEPALIVE is supported... no
checking whether getrandom is supported... yes
checking for ./.git... no
configure: Building stable and legacy API (no draft API)
checking for LIBUNWIND... yes
checking for dladdr in -ldl... yes
checking for clang-format... /bin/clang-format
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/libzmq.pc
config.status: creating doc/Makefile
config.status: creating builds/Makefile
config.status: creating builds/msvc/Makefile
config.status: creating src/platform.hpp
config.status: executing depfiles commands
config.status: executing libtool commands
[ 15%] Performing build step for 'zeromq'
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
Making all in doc
  CC       external/unity/unity.o
  AR       external/unity/libunity.a
  CXX      src/src_libzmq_la-address.lo
  CXX      src/src_libzmq_la-client.lo
  CXX      src/src_libzmq_la-clock.lo
  CXX      src/src_libzmq_la-ctx.lo
  CXX      src/src_libzmq_la-curve_client.lo
  CXX      src/src_libzmq_la-curve_mechanism_base.lo
  CXX      src/src_libzmq_la-curve_server.lo
  CXX      src/src_libzmq_la-dealer.lo
  CXX      src/src_libzmq_la-devpoll.lo
  CXX      src/src_libzmq_la-dgram.lo
  CXX      src/src_libzmq_la-dish.lo
  CXX      src/src_libzmq_la-dist.lo
  CXX      src/src_libzmq_la-epoll.lo
  CXX      src/src_libzmq_la-err.lo
  CXX      src/src_libzmq_la-fq.lo
  CXX      src/src_libzmq_la-gather.lo
  CXX      src/src_libzmq_la-gssapi_mechanism_base.lo
  CXX      src/src_libzmq_la-gssapi_client.lo
  CXX      src/src_libzmq_la-gssapi_server.lo
  CXX      src/src_libzmq_la-io_object.lo
  CXX      src/src_libzmq_la-io_thread.lo
  CXX      src/src_libzmq_la-ip.lo
  CXX      src/src_libzmq_la-ipc_address.lo
  CXX      src/src_libzmq_la-ipc_connecter.lo
  CXX      src/src_libzmq_la-ipc_listener.lo
  CXX      src/src_libzmq_la-kqueue.lo
  CXX      src/src_libzmq_la-lb.lo
  CXX      src/src_libzmq_la-mailbox.lo
  CXX      src/src_libzmq_la-mailbox_safe.lo
  CXX      src/src_libzmq_la-mechanism.lo
  CXX      src/src_libzmq_la-mechanism_base.lo
  CXX      src/src_libzmq_la-metadata.lo
  CXX      src/src_libzmq_la-msg.lo
  CXX      src/src_libzmq_la-mtrie.lo
  CXX      src/src_libzmq_la-norm_engine.lo
  CXX      src/src_libzmq_la-null_mechanism.lo
  CXX      src/src_libzmq_la-object.lo
  CXX      src/src_libzmq_la-options.lo
  CXX      src/src_libzmq_la-own.lo
  CXX      src/src_libzmq_la-pair.lo
  CXX      src/src_libzmq_la-pgm_receiver.lo
  CXX      src/src_libzmq_la-pgm_sender.lo
  CXX      src/src_libzmq_la-pgm_socket.lo
  CXX      src/src_libzmq_la-pipe.lo
  CXX      src/src_libzmq_la-plain_client.lo
  CXX      src/src_libzmq_la-plain_server.lo
  CXX      src/src_libzmq_la-poll.lo
  CXX      src/src_libzmq_la-poller_base.lo
  CXX      src/src_libzmq_la-pollset.lo
  CXX      src/src_libzmq_la-precompiled.lo
  CXX      src/src_libzmq_la-proxy.lo
  CXX      src/src_libzmq_la-pub.lo
  CXX      src/src_libzmq_la-pull.lo
  CXX      src/src_libzmq_la-push.lo
  CXX      src/src_libzmq_la-radio.lo
  CXX      src/src_libzmq_la-random.lo
  CXX      src/src_libzmq_la-raw_decoder.lo
  CXX      src/src_libzmq_la-raw_encoder.lo
  CXX      src/src_libzmq_la-reaper.lo
  CXX      src/src_libzmq_la-rep.lo
  CXX      src/src_libzmq_la-req.lo
  CXX      src/src_libzmq_la-router.lo
  CXX      src/src_libzmq_la-scatter.lo
  CXX      src/src_libzmq_la-select.lo
  CXX      src/src_libzmq_la-server.lo
  CXX      src/src_libzmq_la-session_base.lo
  CXX      src/src_libzmq_la-signaler.lo
  CXX      src/src_libzmq_la-socket_base.lo
  CXX      src/src_libzmq_la-socks.lo
  CXX      src/src_libzmq_la-socks_connecter.lo
  CXX      src/src_libzmq_la-stream.lo
  CXX      src/src_libzmq_la-stream_engine.lo
  CXX      src/src_libzmq_la-sub.lo
  CXX      src/src_libzmq_la-tcp.lo
  CXX      src/src_libzmq_la-tcp_address.lo
  CXX      src/src_libzmq_la-tcp_connecter.lo
  CXX      src/src_libzmq_la-tcp_listener.lo
  CXX      src/src_libzmq_la-thread.lo
  CXX      src/src_libzmq_la-timers.lo
  CXX      src/src_libzmq_la-tipc_address.lo
  CXX      src/src_libzmq_la-tipc_connecter.lo
  CXX      src/src_libzmq_la-tipc_listener.lo
  CXX      src/src_libzmq_la-trie.lo
  CXX      src/src_libzmq_la-udp_address.lo
  CXX      src/src_libzmq_la-udp_engine.lo
  CXX      src/src_libzmq_la-v1_decoder.lo
  CXX      src/src_libzmq_la-v2_decoder.lo
  CXX      src/src_libzmq_la-v1_encoder.lo
  CXX      src/src_libzmq_la-v2_encoder.lo
  CXX      src/src_libzmq_la-vmci.lo
  CXX      src/src_libzmq_la-vmci_address.lo
  CXX      src/src_libzmq_la-vmci_connecter.lo
  CXX      src/src_libzmq_la-vmci_listener.lo
  CXX      src/src_libzmq_la-xpub.lo
  CXX      src/src_libzmq_la-xsub.lo
  CXX      src/src_libzmq_la-zmq.lo
  CXX      src/src_libzmq_la-zmq_utils.lo
  CXX      src/src_libzmq_la-decoder_allocators.lo
  CXX      src/src_libzmq_la-socket_poller.lo
  CXX      src/src_libzmq_la-zap_client.lo
  CC       src/src_libzmq_la-tweetnacl.lo
  CXXLD    src/libzmq.la
  CXX      tools/curve_keygen.o
  CXXLD    tools/curve_keygen
  CXX      perf/local_lat.o
  CXXLD    perf/local_lat
  CXX      perf/remote_lat.o
  CXXLD    perf/remote_lat
  CXX      perf/local_thr.o
  CXXLD    perf/local_thr
  CXX      perf/remote_thr.o
  CXXLD    perf/remote_thr
  CXX      perf/inproc_lat.o
  CXXLD    perf/inproc_lat
  CXX      perf/inproc_thr.o
  CXXLD    perf/inproc_thr
[ 16%] No install step for 'zeromq'
[ 17%] Completed 'zeromq'
[ 17%] Built target zeromq
make: *** [Makefile:130: all] Error 2
$ cmake --version
cmake version 3.11.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Im running Fedora 28 x86-64.

lemonlinger commented 6 years ago

+1 got the same issue on aws linux ec2

vsreekanti commented 6 years ago

The error is here:

In file included from /src/github.com/fluent-project/fluent/build/requests.pb.cc:4:
/src/github.com/fluent-project/fluent/build/requests.pb.h:7:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~

My hunch based on some quick Googling is that this is happening because the C compiler is being identified as gcc (GNU 8.1.1), whereas the CXX compiler is finding clang. When we configure Ubuntu instances, we set the default C and CXX compilers to both point to the same version of clang. I'll verify this later today.

qinhunter commented 6 years ago

Similar problem on centos7. It could be solved by sudo yum install libcxx sudo yum install libcxx-devel.x86_64 But I got another problem then.

-- Check for working CXX compiler: /usr/bin/clang++ -- broken
CMake Error at /usr/local/share/cmake-3.12/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "/usr/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/web_server/hunter/fluent/build/vendor/yamlcpp/src/yamlcpp/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/gmake" "cmTC_ad3a5/fast"
    gmake[3]: Entering directory `/home/web_server/hunter/fluent/build/vendor/yamlcpp/src/yamlcpp/CMakeFiles/CMakeTmp'
    /usr/bin/gmake -f CMakeFiles/cmTC_ad3a5.dir/build.make CMakeFiles/cmTC_ad3a5.dir/build
    gmake[4]: Entering directory `/home/web_server/hunter/fluent/build/vendor/yamlcpp/src/yamlcpp/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_ad3a5.dir/testCXXCompiler.cxx.o
    /usr/bin/clang++    -stdlib=libc++    -o CMakeFiles/cmTC_ad3a5.dir/testCXXCompiler.cxx.o -c /home/web_server/hunter/fluent/build/vendor/yamlcpp/src/yamlcpp/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    Linking CXX executable cmTC_ad3a5
    /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ad3a5.dir/link.txt --verbose=1
    /usr/bin/clang++  -stdlib=libc++     -rdynamic CMakeFiles/cmTC_ad3a5.dir/testCXXCompiler.cxx.o  -o cmTC_ad3a5
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_end_catch'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_allocate_exception'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_guard_release'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_pure_virtual'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__gxx_personality_v0'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_begin_catch'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_rethrow'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_throw'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_guard_abort'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `vtable for __cxxabiv1::__class_type_info'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_free_exception'
    /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc++.so: undefined reference to `__cxa_guard_acquire'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[4]: *** [cmTC_ad3a5] Error 1
    gmake[4]: Leaving directory `/home/web_server/hunter/fluent/build/vendor/yamlcpp/src/yamlcpp/CMakeFiles/CMakeTmp'
    gmake[3]: *** [cmTC_ad3a5/fast] Error 2
    gmake[3]: Leaving directory `/home/web_server/hunter/fluent/build/vendor/yamlcpp/src/yamlcpp/CMakeFiles/CMakeTmp'

Hope you can add more supports of different systems.

vsreekanti commented 6 years ago

On an Amazon Linux instance, I got the following to work:

  1. Installing clang-5.0 (what we compile with by default) using the pre-built LLVM binaries here. Download and move the whole directory into /usr/bin/clang.
  2. Using update-alternatives to link /usr/bin/clang++ to /usr/bin/clang/bin/clang++.
  3. Running sudo yum groupinstall "Development Tools" to install gcc, g++, etc.
  4. Installing libcxx as suggested by @qinhunter above. (Thanks!)

This fixed most of the issues, but there were a few remaining hacks:

  1. Add /usr/lib64 to the LIBRARY_PATH variable.
  2. On Amazon Linux, there was no libtinfo.so, so I had to run sudo yum install -y ncurses-devel-5.7-4.20090207.14.amzn1.x86_64 and then symlink /usr/lib64/libtinfo.so.6 to /usr/lib64/libtinfo..
  3. Symlink the crtbegin.o and crtend.o from the /usr/lib/gcc/x86_64-amazon-linux/4.8.5/ directory into /usr/lib/.

This enabled CMake and clang to run properly, but when I attempt to build and install protobuf, the configuration step fails because it believes there's no sched_yield on the system. I did some quick Googling, but I wasn't able to find any solutions. I'm running into the limits of my Fedora knowledge, and I'm sure it has sched_yield, so I assume this is another issue with some system library configuration.

I'll try to come back to this soon, but if anyone else is more familiar with these issues, I'd love some help.

vsreekanti commented 6 years ago

Another update: It looks like the reason that the protobuf installation is failing is because ./configure script is invoking a libcxxabi function call that depends on version 2.18 of glibc, the default version on Amazon Linux is 2.17. I tried to install a new version, but that broke... basically everything. :-) As I said earlier, I don't know if this generalizes to other Fedora distributions, but if anyone has any input, we'd love your help.

In the meantime, the software definitely works on Ubuntu, and there is a Dockerfile that you can use to run the software. We'll have a pre-built image hosted on Dockerhub soon (see #18).

vsreekanti commented 6 years ago

Hi all, this should be fixed now. As of #23, we can now compile Fluent with GNU g++. I tested this on an Amazon Linux instance, and it compiles fine. There are some compile warning, but the processes all start fine. Please let me know if you run into anymore issues.