racon: Missing headers during build?
On trying to build the current version on Max OSX 10.12.6 with Clang (Apple LLVM version 8.1.0 (clang-802.0.42)) and cmake 3.10.2, I got the following error:
Scanning dependencies of target edlib_static
[ 6%] Building CXX object vendor/edlib/CMakeFiles/edlib_static.dir/edlib/src/edlib.cpp.o
[ 13%] Linking CXX static library ../../lib/libedlib_static.a
[ 13%] Built target edlib_static
Scanning dependencies of target spoa
[ 20%] Building CXX object vendor/spoa/CMakeFiles/spoa.dir/src/alignment_engine.cpp.o
/Users/DanWork/Desktop/Software/racon/vendor/spoa/src/alignment_engine.cpp:26:9: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/vendor/spoa/src/alignment_engine.cpp:32:9: error: use of undeclared identifier 'exit'
exit(1);
^
2 errors generated.
make[2]: *** [vendor/spoa/CMakeFiles/spoa.dir/src/alignment_engine.cpp.o] Error 1
make[1]: *** [vendor/spoa/CMakeFiles/spoa.dir/all] Error 2
make: *** [all] Error 2
After some Googling, I added #include <stdlib.h>
to racon/vendor/spoa/include/spoa/alignment_engine.hpp
. The next attempt went a bit further:
Scanning dependencies of target edlib_static
[ 6%] Building CXX object vendor/edlib/CMakeFiles/edlib_static.dir/edlib/src/edlib.cpp.o
[ 13%] Linking CXX static library ../../lib/libedlib_static.a
[ 13%] Built target edlib_static
Scanning dependencies of target spoa
[ 20%] Building CXX object vendor/spoa/CMakeFiles/spoa.dir/src/alignment_engine.cpp.o
[ 26%] Building CXX object vendor/spoa/CMakeFiles/spoa.dir/src/graph.cpp.o
[ 33%] Building CXX object vendor/spoa/CMakeFiles/spoa.dir/src/simd_alignment_engine.cpp.o
[ 40%] Building CXX object vendor/spoa/CMakeFiles/spoa.dir/src/sisd_alignment_engine.cpp.o
[ 46%] Linking CXX static library lib/libspoa.a
[ 46%] Built target spoa
Scanning dependencies of target thread_pool
[ 53%] Building CXX object vendor/thread_pool/CMakeFiles/thread_pool.dir/src/thread_pool.cpp.o
[ 60%] Linking CXX static library lib/libthread_pool.a
[ 60%] Built target thread_pool
Scanning dependencies of target racon
[ 66%] Building CXX object CMakeFiles/racon.dir/src/main.cpp.o
[ 73%] Building CXX object CMakeFiles/racon.dir/src/polisher.cpp.o
/Users/DanWork/Desktop/Software/racon/src/polisher.cpp:357:13: warning: format specifies type 'unsigned long' but the argument has type
'unsigned long long' [-Wformat]
i + 1, overlaps.size());
^~~~~
/Users/DanWork/Desktop/Software/racon/src/polisher.cpp:494:13: warning: format specifies type 'unsigned long' but the argument has type
'unsigned long long' [-Wformat]
i + 1, thread_futures.size());
^~~~~
2 warnings generated.
[ 80%] Building CXX object CMakeFiles/racon.dir/src/overlap.cpp.o
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:59:9: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:63:28: error: use of undeclared identifier 'atoi'
q_begin_ = atoi(&cigar_[0]);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:75:34: error: use of undeclared identifier 'atoi'
auto num_bases = atoi(&cigar_[j]);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:80:34: error: use of undeclared identifier 'atoi'
auto num_bases = atoi(&cigar_[j]);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:84:34: error: use of undeclared identifier 'atoi'
auto num_bases = atoi(&cigar_[j]);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:88:34: error: use of undeclared identifier 'atoi'
q_clip_length += atoi(&cigar_[j]);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:136:9: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:147:13: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:152:52: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t'
(aka 'unsigned long long') [-Wformat]
"missing sequence with id %lu!\n", q_id_);
~~~ ^~~~~
%llu
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:153:13: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:160:13: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:165:52: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t'
(aka 'unsigned long long') [-Wformat]
"missing sequence with id %lu!\n", t_id_);
~~~ ^~~~~
%llu
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:166:13: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:179:9: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:191:9: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:210:13: error: use of undeclared identifier 'free'
free(cigar);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:213:62: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t'
(aka 'unsigned long long') [-Wformat]
"edlib unable to align pair (%lu x %lu)!\n", q_id_, t_id_);
~~~ ^~~~~
%llu
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:213:69: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t'
(aka 'unsigned long long') [-Wformat]
"edlib unable to align pair (%lu x %lu)!\n", q_id_, t_id_);
~~~ ^~~~~
%llu
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:214:13: error: use of undeclared identifier 'exit'
exit(1);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:253:41: error: use of undeclared identifier 'atoi'
uint32_t k = 0, num_bases = atoi(&cigar_[j]);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:293:41: error: use of undeclared identifier 'atoi'
uint32_t k = 0, num_bases = atoi(&cigar_[j]);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:308:41: error: use of undeclared identifier 'atoi'
uint32_t k = 0, num_bases = atoi(&cigar_[j]);
^
/Users/DanWork/Desktop/Software/racon/src/overlap.cpp:338:9: error: use of undeclared identifier 'exit'
exit(1);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 warnings and 20 errors generated.
make[2]: *** [CMakeFiles/racon.dir/src/overlap.cpp.o] Error 1
make[1]: *** [CMakeFiles/racon.dir/all] Error 2
make: *** [all] Error 2
I then added the same #include <stdlib.h>
to racon/src/overlap.hpp
and made it to the end with warnings, but no further errors.
I can now run ./racon --help
from the bin, so it seems like it might be successfully installed, but wanted to post this for others.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 24
It seems successful by adding -DCMAKE_CXX_COMPILER=/public/software/gcc-5.2.0/bin/c++ -DCMAKE_C_COMPILER=/public/software/gcc-5.2.0/bin/gcc