isovic/racon

Racon make error

Closed this issue · 2 comments

On trying to make racon-v1.4.21 on Red Hat 6.6, I got the following error:
[ 0%] Building CXX object vendor/edlib/CMakeFiles/edlib_static.dir/edlib/src/edlib.cpp.o
[ 0%] Linking CXX static library ../../lib/libedlib_static.a
[ 0%] Built target edlib_static
[ 0%] Building CXX object vendor/spoa/CMakeFiles/spoa.dir/src/alignment_engine.cpp.o
In file included from /public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:3:
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/include/spoa/alignment_engine.hpp:29: error: expected nested-name-specifier before 'Alignment'
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/include/spoa/alignment_engine.hpp:29: error: 'Alignment' has not been declared
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/include/spoa/alignment_engine.hpp:29: error: expected ';' before '=' token
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/include/spoa/alignment_engine.hpp:29: error: expected unqualified-id before '=' token
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/include/spoa/alignment_engine.hpp:61: error: 'Alignment' does not name a type
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/include/spoa/alignment_engine.hpp:66: error: 'Alignment' does not name a type
In file included from /public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:10:
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/sisd_alignment_engine.hpp:20: error: 'spoa::SisdAlignmentEngine::SisdAlignmentEngine(spoa::SisdAlignmentEngine&&)' cannot be defaulted
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/sisd_alignment_engine.hpp:21: error: 'spoa::SisdAlignmentEngine& spoa::SisdAlignmentEngine::operator=(spoa::SisdAlignmentEngine&&)' cannot be defaulted
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/sisd_alignment_engine.hpp:37: error: expected ';' before 'override'
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/sisd_alignment_engine.hpp:39: error: 'Alignment' does not name a type
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/sisd_alignment_engine.hpp:55: error: 'Alignment' does not name a type
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/sisd_alignment_engine.hpp:60: error: 'Alignment' does not name a type
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/sisd_alignment_engine.hpp:65: error: 'Alignment' does not name a type
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/sisd_alignment_engine.hpp:77: error: expected ';' before 'noexcept'
In file included from /public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:11:
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/simd_alignment_engine.hpp:34: error: 'spoa::SimdAlignmentEngine::SimdAlignmentEngine(spoa::SimdAlignmentEngine&&)' cannot be defaulted
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/simd_alignment_engine.hpp:51: error: expected ';' before 'override'
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/simd_alignment_engine.hpp:53: error: 'Alignment' does not name a type
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/simd_alignment_engine.hpp:80: error: expected constructor, destructor, or type conversion before 'Linear'
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/simd_alignment_engine.hpp:86: error: expected constructor, destructor, or type conversion before 'Affine'
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/simd_alignment_engine.hpp:92: error: expected constructor, destructor, or type conversion before 'Convex'
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/simd_alignment_engine.hpp:108: error: expected initializer before 'noexcept'
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:94: error: 'Alignment' does not name a type
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp: In member function 'int64_t spoa::AlignmentEngine::WorstCaseAlignmentScore(int64_t, int64_t) const':
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:104: error: expected primary-expression before '[' token
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:104: error: expected primary-expression before ']' token
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:104: error: expected primary-expression before 'len'
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:104: error: unable to deduce 'auto' from ''
/public/home/zuozhangqi/software/racon-v1.4.21/vendor/spoa/src/alignment_engine.cpp:104: error: expected ',' or ';' before '{' token
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

When building racon by cmake -DCMAKE_BUILD_TYPE=Release .., it seemed no error with following output:
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/local/lib/libz.so (found version "1.2.8")
CMake Deprecation Warning at vendor/spoa/vendor/cereal/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning (dev) at vendor/spoa/vendor/cereal/CMakeLists.txt:2 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
PROJECT_VERSION
PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR
PROJECT_VERSION_PATCH
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Boost: /usr/local/lib/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: serialization
-- boost_variant.cpp
-- Found Doxygen: /usr/bin/doxygen (found version "1.6.1") found components: doxygen dot
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
Setting warning flags
-- Configuring done
-- Generating done
-- Build files have been written to: /public/home/zuozhangqi/software/racon-v1.4.21/build

The gcc version is 6.4.0, and cmake version is 3.20.0-rc5.
I found the issue is same as issue #186, but there is no reply to this error in issue #186, so I open a new issue.
Do you have any suggestions on this issue?

Hello,
CMake picks up the older compiler on your system (you can check with make VERBOSE=1 and see the path of gcc/g++ used). To manually set the newer compiler run:
cmake -DCMAKE_C_COMPILER=<path to gcc> -DCMAKE_CXX_COMPILER=<path to g++> -DCMAKE_BUILD_TYPE=Release ..

Best regards,
Robert

Hello Robert,
Thank you very much for quick reply! I solved it successfully.

Best regards!