edawson / gfakluge

A C++ library and utilities for manipulating the Graphical Fragment Assembly format.
http://edawson.github.io/gfakluge/
MIT License
51 stars 20 forks source link

Compilation issue with g++ 5.3.1 #6

Closed ekg closed 7 years ago

ekg commented 8 years ago

Just updating to Ubuntu 16.04. I get this error on build:

g++ (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413

Error:

make[1]: Entering directory '/home/erik/vg/deps/gfakluge'
ar -rs libgfakluge.a gfakluge.o
g++ -O3 -o gfa_sort gfa_sort.cpp -L./ -I./ -lgfakluge
/tmp/ccxIDYPB.o: In function `main':
gfa_sort.cpp:(.text.startup+0x11c): undefined reference to `gfak::GFAKluge::parse_gfa_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
gfa_sort.cpp:(.text.startup+0x14f): undefined reference to `gfak::GFAKluge::block_order_string[abi:cxx11]()'
collect2: error: ld returned 1 exit status
Makefile:9: recipe for target 'sort' failed
make[1]: *** [sort] Error 1
make[1]: Leaving directory '/home/erik/vg/deps/gfakluge'
Makefile:142: recipe for target 'lib/libgfakluge.a' failed
make: *** [lib/libgfakluge.a] Error 2
edawson commented 8 years ago

That's no good. I wonder of GCC 5 has stricter include requirements or something. As a hack, you can remove the sort target from the all Make recipe (as I assume you just need the library). I'll try to push a fix tonight.

ekg commented 8 years ago

Looks like I can work around the problem by doing into the deps/gfakludge directory and doing a make clean && make cycle.

edawson commented 8 years ago

I suspect this is actually a parallel build issue. I've shifted the make dependencies around - let me know if the newest commit still fails. I think we need to update to the latest one anyway for JSON parsing.

edawson commented 7 years ago

Considering it fixed; builds on 6.1.