bingmann / cobs

COBS - Compact Bit-Sliced Signature Index (for Genomic k-Mer Data or q-Grams)
https://panthema.net/cobs
MIT License
83 stars 15 forks source link

Fails to Compile (Errors during 'make') #4

Closed Bradsol closed 5 years ago

Bradsol commented 5 years ago

I'm trying to install Cobs on a Linux cluster and I believe I have all the dependencies necessary. My cmake output is:

-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /software/apps/compilers/gcc/5.5.0/bin/gcc
-- Check for working C compiler: /software/apps/compilers/gcc/5.5.0/bin/gcc -- 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: /software/apps/compilers/gcc/5.5.0/bin/g++
-- Check for working CXX compiler: /software/apps/compilers/gcc/5.5.0/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- COBS CMAKE_CXX_FLAGS: -fopenmp -Wpedantic -W -Wall -march=native -fPIC
-- 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 PythonInterp: /software/apps/anaconda/5.2/python/3.7/bin/python (found version "3.7.1") 
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Performing Test CFLAG_Wall
-- Performing Test CFLAG_Wall - Success
-- Performing Test CFLAG_Wextra
-- Performing Test CFLAG_Wextra - Success
-- Performing Test CFLAG_Wcast_qual
-- Performing Test CFLAG_Wcast_qual - Success
-- Performing Test CFLAG_Wcast_align
-- Performing Test CFLAG_Wcast_align - Success
-- Performing Test CFLAG_Wshadow
-- Performing Test CFLAG_Wshadow - Success
-- Performing Test CFLAG_Wstrict_aliasing_1
-- Performing Test CFLAG_Wstrict_aliasing_1 - Success
-- Performing Test CFLAG_Wswitch_enum
-- Performing Test CFLAG_Wswitch_enum - Success
-- Performing Test CFLAG_Wdeclaration_after_statement
-- Performing Test CFLAG_Wdeclaration_after_statement - Success
-- Performing Test CFLAG_Wstrict_prototypes
-- Performing Test CFLAG_Wstrict_prototypes - Success
-- Performing Test CFLAG_Wundef
-- Performing Test CFLAG_Wundef - Success
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7") 
-- Boost version: 1.68.0
-- Found the following Boost libraries:
--   system
--   filesystem
-- Performing Test TLX_CXX_HAS_CXX17
-- Performing Test TLX_CXX_HAS_CXX17 - Success
-- TLX CMAKE_CXX_FLAGS: -Wshadow -Wold-style-cast -std=c++17 -g -W -Wall -Wextra -fPIC  -fopenmp -Wpedantic -W -Wall -march=native -fPIC -Wcast-qual -Winit-self -Wnoexcept -Woverloaded-virtual -Wredundant-decls
-- Found PythonLibs: /software/apps/anaconda/5.2/python/3.7/lib/libpython3.7m.so
-- pybind11 v2.2.4
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home-1/bsolomo9@jhu.edu/software/cobs/build

However I am unable to compile cobs despite using a recursive git clone. Instead it seems to crash more or less immediately:

[  1%] Building CXX object extlib/googletest/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
In file included from /home-1/bsolomo9@jhu.edu/software/cobs/extlib/googletest/googletest/include/gtest/internal/gtest-internal.h:45:0,
                 from /home-1/bsolomo9@jhu.edu/software/cobs/extlib/googletest/googletest/include/gtest/gtest.h:59,
                 from /home-1/bsolomo9@jhu.edu/software/cobs/extlib/googletest/googletest/src/gtest-all.cc:38:
/software/centos7/usr/include/sys/wait.h:114:46: error: ‘__pid_t wait(void*)’ hides constructor for ‘union wait’ [-Werror=shadow]
 extern __pid_t wait (__WAIT_STATUS __stat_loc);
                                              ^
In file included from /software/centos7/usr/include/bits/fcntl.h:61:0,
                 from /software/centos7/usr/include/fcntl.h:35,
                 from /home-1/bsolomo9@jhu.edu/software/cobs/extlib/googletest/googletest/src/gtest.cc:61,
                 from /home-1/bsolomo9@jhu.edu/software/cobs/extlib/googletest/googletest/src/gtest-all.cc:41:
/software/centos7/usr/include/bits/fcntl-linux.h:308:27: error: ISO C++ forbids zero-size array ‘f_handle’ [-Werror=pedantic]
   unsigned char f_handle[0];
                           ^
cc1plus: all warnings being treated as errors
make[2]: *** [extlib/googletest/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [extlib/googletest/googlemock/gtest/CMakeFiles/gtest.dir/all] Error 2
make: *** [all] Error 2
bingmann commented 5 years ago

Well, you should get a newer GCC version. 5.5 is not old but does not support the newer C++ features.

Bradsol commented 5 years ago

Still fails with GCC 6.4.0 which is unfortunately the latest version available on this particular cluster. Do you have a suggested version to properly compile cobs? 9.2.0?

bingmann commented 5 years ago

I think gcc7 is necessary.