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

Build failing on ubuntu 16.04.5, gcc 5.4.0 #3

Closed rsharris closed 5 years ago

rsharris commented 5 years ago

"make -j4" is failing for me. My best guess is that my compiler is not being used in c++17 mode.

The first failure is reported at Building CXX object cobs/CMakeFiles/cobs_static.dir/construction/compact_index.cpp.o The reported error is ...cobs/kmer.hpp:47:55: error: expected ',' before ')' token for a call to static_assert() with only one argument. The single argument static_assert() was introduced in c++17, before that two arguments were required. This is why I believe the problem is that the compiler is being run in pre-17 mode.

I note that the output from the top level cmake command included this line: TLX CMAKE_CXX_FLAGS: ... -std=c++17 .... Does that suggest that cmake was smart eough to know it needed to add -std=c++17 to get my compiler into c++17?

I've tried to dig through the build process to see what gcc command line was used for that first failure. That information is (effectively) hidden in the definitions of $(CXX_FLAGS) (or perhaps $(CXX_DEFINES)) in effect in cobs/CMakeFiles/cobs_static.dir/build.make, but I'm not familiar enough with the cmake process to know where to find where those are defined.

Is there any way to get make -j4 to show me all the commands it performs, i.e. the command lines instead of the usually more informative summaries it is currently showing me?

rsharris commented 5 years ago

make VERBOSE=1 -j4 causes the gcc command lines to be reported (thanks stackoverflow).

The (first) gcc command that is failing for me is /usr/bin/c++ ... -std=gnu++1z .... From what I find via google, gnu++1z is a synonym for c++17.

FWIW /usr/bin/c++ --version reports c++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609

Possibly also relevant: I don't have the Boost.Filesystem library. According to readme.md, I think that is OK, right?

bingmann commented 5 years ago

I fear gcc 5.4.0 is too old. Boost.Filesystem is required OR a recent C++17 compiler with the std filesystem libraries. I would suggest you upgrade to gcc7 or such.

rsharris commented 5 years ago

That's the same conclusion I've come to. gcc 5.4 appears to have been released a couple months before c++17 was officially standardized.

I don't have admin privs on the machine. I can build and install a newer version of gcc under my home directory. But my notes indicate I've only been successful doing that one time in five attempts (and the success was ten years ago, while this machine was still sand on the beach).

Anyway, not really a problem with this package. You should close this issue.

Thanks.