Error while installing
rmnsimonyan opened this issue · 15 comments
Hello! I have an issue during installation, could you please help me fix it? Thank you!
-- The CXX compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Configuring done
-- Generating done
-- Build files have been written to: /binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA
Scanning dependencies of target lja_common
[ 2%] Building CXX object src/tools/common/CMakeFiles/lja_common.dir/cl_parser.cpp.o
[ 4%] Linking CXX static library ../../../lib/liblja_common.a
[ 4%] Built target lja_common
Scanning dependencies of target lja_sequence
[ 6%] Building CXX object src/tools/sequences/CMakeFiles/lja_sequence.dir/contigs.cpp.o
[ 8%] Building CXX object src/tools/sequences/CMakeFiles/lja_sequence.dir/sequence.cpp.o
[ 10%] Linking CXX static library ../../../lib/liblja_sequence.a
[ 10%] Built target lja_sequence
Scanning dependencies of target spoa
[ 12%] Building CXX object src/lib/spoa/CMakeFiles/spoa.dir/src/alignment_engine.cpp.o
[ 14%] Building CXX object src/lib/spoa/CMakeFiles/spoa.dir/src/graph.cpp.o
[ 17%] Building CXX object src/lib/spoa/CMakeFiles/spoa.dir/src/simd_alignment_engine_dispatcher.cpp.o
[ 19%] Building CXX object src/lib/spoa/CMakeFiles/spoa.dir/src/sisd_alignment_engine.cpp.o
[ 21%] Linking CXX static library lib/libspoa.a
[ 21%] Built target spoa
Scanning dependencies of target ksw2
[ 23%] Building C object src/lib/ksw2/CMakeFiles/ksw2.dir/ksw2_extz2_sse.c.o
[ 25%] Linking C static library ../../../lib/libksw2.a
[ 25%] Built target ksw2
Scanning dependencies of target lja_dbg
[ 27%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/sparse_dbg.cpp.o
[ 29%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/graph_algorithms.cpp.o
[ 31%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/dbg_disjointigs.cpp.o
[ 34%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/dbg_construction.cpp.o
[ 36%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/minimizer_selection.cpp.o
[ 38%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/paths.cpp.o
[ 40%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/graph_alignment_storage.cpp.o
[ 42%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/component.cpp.o
[ 44%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/graph_modification.cpp.o
[ 46%] Linking CXX static library ../../../lib/liblja_dbg.a
[ 46%] Built target lja_dbg
Scanning dependencies of target dot_bulge_stats
[ 48%] Building CXX object src/projects/scripts/CMakeFiles/dot_bulge_stats.dir/dot_bulge_stats.cpp.o
[ 51%] Linking CXX executable ../../../bin/dot_bulge_stats
[ 51%] Built target dot_bulge_stats
Scanning dependencies of target sdbg_stats
[ 53%] Building CXX object src/projects/scripts/CMakeFiles/sdbg_stats.dir/sdbg_stats.cpp.o
[ 55%] Linking CXX executable ../../../bin/sdbg_stats
[ 55%] Built target sdbg_stats
Scanning dependencies of target lja_ec
[ 57%] Building CXX object src/projects/error_correction/CMakeFiles/lja_ec.dir/correction_utils.cpp.o
[ 59%] Building CXX object src/projects/error_correction/CMakeFiles/lja_ec.dir/manyk_correction.cpp.o
[ 61%] Building CXX object src/projects/error_correction/CMakeFiles/lja_ec.dir/multiplicity_estimation.cpp.o
[ 63%] Building CXX object src/projects/error_correction/CMakeFiles/lja_ec.dir/initial_correction.cpp.o
[ 65%] Building CXX object src/projects/error_correction/CMakeFiles/lja_ec.dir/dimer_correction.cpp.o
[ 68%] Building CXX object src/projects/error_correction/CMakeFiles/lja_ec.dir/tip_correction.cpp.o
[ 70%] Building CXX object src/projects/error_correction/CMakeFiles/lja_ec.dir/mult_correction.cpp.o
[ 72%] Building CXX object src/projects/error_correction/CMakeFiles/lja_ec.dir/precorrection.cpp.o
[ 74%] Linking CXX static library ../../../lib/liblja_ec.a
[ 74%] Built target lja_ec
Scanning dependencies of target jumboDBG
[ 76%] Building CXX object src/projects/lja/CMakeFiles/jumboDBG.dir/dbg.cpp.o
[ 78%] Building CXX object src/projects/lja/CMakeFiles/jumboDBG.dir/subdataset_processing.cpp.o
[ 80%] Linking CXX executable ../../../bin/jumboDBG
[ 80%] Built target jumboDBG
Scanning dependencies of target lja_homopolish
[ 82%] Building CXX object src/projects/polishing/CMakeFiles/lja_homopolish.dir/homopolish.cpp.o
[ 85%] Linking CXX static library ../../../lib/liblja_homopolish.a
[ 85%] Built target lja_homopolish
Scanning dependencies of target lja
[ 87%] Building CXX object src/projects/lja/CMakeFiles/lja.dir/lja.cpp.o
[ 89%] Building CXX object src/projects/lja/CMakeFiles/lja.dir/subdataset_processing.cpp.o
[ 91%] Building CXX object src/projects/lja/CMakeFiles/lja.dir/gap_closing.cpp.o
[ 93%] Building CXX object src/projects/lja/CMakeFiles/lja.dir/uncompressed_output.cpp.o
[ 95%] Linking CXX executable ../../../bin/lja
[ 95%] Built target lja
Scanning dependencies of target run_polishing
[ 97%] Building CXX object src/projects/polishing/CMakeFiles/run_polishing.dir/run_polishing.cpp.o
/binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA/src/projects/polishing/run_polishing.cpp: In function ‘int main(int, char**)’:
/binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA/src/projects/polishing/run_polishing.cpp:35:29: error: invalid initialization of reference of type ‘const std::vector<Contig>&’ from expression of type ‘std::experimental::filesystem::v1::__cxx11::path’
Polish(logger, threads, res, assembly, alignments_file, reads_lib, dicompress);
^~~
In file included from /binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA/src/projects/polishing/run_polishing.cpp:2:
/binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA/src/projects/polishing/homopolish.hpp:5:21: note: in passing argument 3 of ‘std::vector<Contig> Polish(logging::Logger&, size_t, const std::vector<Contig>&, const std::experimental::filesystem::v1::__cxx11::path&, const Library&, size_t)’
std::vector<Contig> Polish(logging::Logger &logger, size_t threads,
^~~~~~
make[2]: *** [src/projects/polishing/CMakeFiles/run_polishing.dir/build.make:63: src/projects/polishing/CMakeFiles/run_polishing.dir/run_polishing.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:677: src/projects/polishing/CMakeFiles/run_polishing.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
[ 4%] Built target lja_common
[ 10%] Built target lja_sequence
[ 21%] Built target spoa
[ 25%] Built target ksw2
[ 46%] Built target lja_dbg
[ 51%] Built target dot_bulge_stats
[ 55%] Built target sdbg_stats
[ 74%] Built target lja_ec
[ 80%] Built target jumboDBG
[ 85%] Built target lja_homopolish
[ 95%] Built target lja
[ 97%] Building CXX object src/projects/polishing/CMakeFiles/run_polishing.dir/run_polishing.cpp.o
/binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA/src/projects/polishing/run_polishing.cpp: In function ‘int main(int, char**)’:
/binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA/src/projects/polishing/run_polishing.cpp:35:29: error: invalid initialization of reference of type ‘const std::vector<Contig>&’ from expression of type ‘std::experimental::filesystem::v1::__cxx11::path’
Polish(logger, threads, res, assembly, alignments_file, reads_lib, dicompress);
^~~
In file included from /binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA/src/projects/polishing/run_polishing.cpp:2:
/binf-isilon/sgarglab/people/gtk897/soft/LJA/LJA/src/projects/polishing/homopolish.hpp:5:21: note: in passing argument 3 of ‘std::vector<Contig> Polish(logging::Logger&, size_t, const std::vector<Contig>&, const std::experimental::filesystem::v1::__cxx11::path&, const Library&, size_t)’
std::vector<Contig> Polish(logging::Logger &logger, size_t threads,
^~~~~~
make[2]: *** [src/projects/polishing/CMakeFiles/run_polishing.dir/build.make:63: src/projects/polishing/CMakeFiles/run_polishing.dir/run_polishing.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:677: src/projects/polishing/CMakeFiles/run_polishing.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Hi.As I understand you are using the main branch. Currently one of the targets in i is broken. To fix this you can either compile with "make lja" or use the release version. However I recommend to wait a little bit for the new release which I hope to publish very soon.
Thanks so much for a fast reply! It has worked with the release version! I am working on a small benchmarking project, I will greatly appreciate if you notify me when the new release is out:) Happy holidays!
Hello I also have the installation issue with 99f9326.
I am using cmake version 3.14.0, gcc-9.2.0, zlib, GNU make on CentOs 8. I don't have root control and install dependencies with conda.
$ cmake .
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sou6/bin/LJA
$ make
[ 1%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/sparse_dbg.cpp.o
x86_64-conda_cos6-linux-gnu-c++: error: NOTFOUND: No such file or directory
make[2]: *** [src/projects/dbg/CMakeFiles/lja_dbg.dir/build.make:63: src/projects/dbg/CMakeFiles/lja_dbg.dir/sparse_dbg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:655: src/projects/dbg/CMakeFiles/lja_dbg.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Please let me know how to fix this. Thank you.
Shujun
Hi! Thank you for your interest in LJA. This looks like a conda issue. it can not find c++ compiler where it should be. Could you run "conda install gxx_linux-64" and see if it fixes the problem.
Thank you for your quick reply. I installed cmake and gxx_linux-64 via conda, restarted the terminal, and tried to reinstall, but encounter another error(s):
$ make clean
$ cmake .
...
$ make
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sou6/bin/LJA
(asm) [sou6@devschatz2 LJA]$ make
[ 1%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/sparse_dbg.cpp.o
[ 3%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/graph_algorithms.cpp.o
[ 4%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/dbg_disjointigs.cpp.o
[ 6%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/dbg_construction.cpp.o
[ 7%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/minimizer_selection.cpp.o
[ 9%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/paths.cpp.o
[ 10%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/graph_alignment_storage.cpp.o
[ 12%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/component.cpp.o
[ 13%] Building CXX object src/projects/dbg/CMakeFiles/lja_dbg.dir/graph_modification.cpp.o
[ 15%] Linking CXX static library ../../../lib/liblja_dbg.a
[ 15%] Built target lja_dbg
Scanning dependencies of target repeat_resolution
[ 16%] Building CXX object src/projects/repeat_resolution/CMakeFiles/repeat_resolution.dir/paths.cpp.o
[ 18%] Building CXX object src/projects/repeat_resolution/CMakeFiles/repeat_resolution.dir/mdbg_topology.cpp.o
[ 19%] Building CXX object src/projects/repeat_resolution/CMakeFiles/repeat_resolution.dir/mdbg_inc.cpp.o
[ 21%] Building CXX object src/projects/repeat_resolution/CMakeFiles/repeat_resolution.dir/mdbg_vertex_processor.cpp.o
[ 22%] Building CXX object src/projects/repeat_resolution/CMakeFiles/repeat_resolution.dir/mdbg.cpp.o
[ 24%] Building CXX object src/projects/repeat_resolution/CMakeFiles/repeat_resolution.dir/mdbg_seq.cpp.o
[ 25%] Linking CXX static library ../../../lib/librepeat_resolution.a
[ 25%] Built target repeat_resolution
Scanning dependencies of target gtest
[ 27%] Building CXX object src/tests/googletest-master/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 28%] Linking CXX static library ../../../../lib/libgtest.a
[ 28%] Built target gtest
Scanning dependencies of target gtest_main
[ 30%] Building CXX object src/tests/googletest-master/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[ 31%] Linking CXX static library ../../../../lib/libgtest_main.a
[ 31%] Built target gtest_main
Scanning dependencies of target run_tests
[ 33%] Building CXX object src/tests/CMakeFiles/run_tests.dir/test_repeat_resolution/test_mdbg.cpp.o
[ 34%] Building CXX object src/tests/CMakeFiles/run_tests.dir/test_repeat_resolution/test_paths.cpp.o
[ 36%] Building CXX object src/tests/CMakeFiles/run_tests.dir/test_repeat_resolution/test_mdbgseq.cpp.o
[ 37%] Linking CXX executable ../../bin/run_tests
/home/sou6/bin/miniconda3/envs/primrose/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: CMakeFiles/run_tests.dir/test_repeat_resolution/test_mdbg.cpp.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
/home/sou6/bin/miniconda3/envs/primrose/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /home/sou6/bin/miniconda3/envs/primrose/bin/../x86_64-conda_cos6-linux-gnu/sysroot/lib/librt.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/tests/CMakeFiles/run_tests.dir/build.make:138: bin/run_tests] Error 1
make[1]: *** [CMakeFiles/Makefile2:451: src/tests/CMakeFiles/run_tests.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
I googled some error messages like "undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'" and "error adding symbols: DSO missing from command line", but I don't know how to fix it on my end.
Hello,
I tried to install LJA in my conda environment, and the same error message persists.
Best,
Encountered the same issue as @oushujun and @biozzq. After a brief search found this solution in a different GitHub issues discussion: tarantool/tarantool#4639 (comment). Modified CMakeLists.txt
as detailed below, and was able to successfully install the tool.
Original CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0048 NEW)
project(DR VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(PYTHON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/py)
find_package(OpenMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -lstdc++fs -ggdb3 ${OpenMP_CXX_FLAGS}" )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
set(CMAKE_COMPILE_OPTIONS "-Wall ${OpenMP_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_SHARED_LINKER_FLAGS "-Wall -Wc++-compat -O2 -msse4.1 -DHAVE_KALLOC -DKSW_CPU_DISPATCH -D_FILE_OFFSET_BITS=64 -ltbb -fsigned-char -fsanitize=address")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/tools)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/lib)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/projects)
add_subdirectory(src/tests)
add_subdirectory(src/tools)
add_subdirectory(src/lib/spoa)
add_subdirectory(src/lib/ksw2)
add_subdirectory(src/projects)
Modified CMakeLists.txt
, change on line 19, added -lrt
flag.
cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0048 NEW)
project(DR VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(PYTHON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/py)
find_package(OpenMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -lstdc++fs -ggdb3 ${OpenMP_CXX_FLAGS} -lrt" )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
set(CMAKE_COMPILE_OPTIONS "-Wall ${OpenMP_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_SHARED_LINKER_FLAGS "-Wall -Wc++-compat -O2 -msse4.1 -DHAVE_KALLOC -DKSW_CPU_DISPATCH -D_FILE_OFFSET_BITS=64 -ltbb -fsigned-char -fsanitize=address")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/tools)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/lib)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/projects)
add_subdirectory(src/tests)
add_subdirectory(src/tools)
add_subdirectory(src/lib/spoa)
add_subdirectory(src/lib/ksw2)
add_subdirectory(src/projects)
Unfortunately, it does not work on my end. It produces the exact same error after adding -lrt
. Not sure if it's related to the conda environment I am using. Will try on a new conda env and a few more things.
@oushujun. could you try to compile the code using this CMakeLists.txt:
cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0048 NEW)
project(DR VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(PYTHON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/py)
find_package(OpenMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -lstdc++fs -lrt -ggdb3 ${OpenMP_CXX_FLAGS}" )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
set(CMAKE_COMPILE_OPTIONS "-Wall ${OpenMP_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_SHARED_LINKER_FLAGS "-Wall -Wc++-compat -O2 -msse4.1 -DHAVE_KALLOC -DKSW_CPU_DISPATCH -D_FILE_OFFSET_BITS=64 -ltbb -lrt -fsigned-char -fsanitize=address")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/tools)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/lib)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/projects)
add_subdirectory(src/tests)
add_subdirectory(src/tools)
add_subdirectory(src/lib/spoa)
add_subdirectory(src/lib/ksw2)
add_subdirectory(src/projects)
@AntonBankevich Thank you for your suggestion. I created a new conda env, installed gcc, gxx, cmake, and tried to compile with your new cmakefile.txt, it still produced the exact same error. My operating system is CentOs 8. Are there any other things I can check on? Thank you.
Shujun
Hi @oushujun. Could you try to compile from branch bug_fix?
Hello @AntonBankevich, thank you for making the branch. I updated my clone and switched to the bug_fix branch, and cmake .
, then make
, and still stoped at the same step:
[ 37%] Linking CXX executable ../../bin/run_tests
/home/sou6/bin/miniconda3/envs/primrose/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /home/sou6/bin/miniconda3/envs/primrose/lib/libstdc++.so: undefined reference to `aligned_alloc@GLIBC_2.16'
/home/sou6/bin/miniconda3/envs/primrose/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /home/sou6/bin/miniconda3/envs/primrose/lib/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17'
collect2: error: ld returned 1 exit status
make[2]: *** [src/tests/CMakeFiles/run_tests.dir/build.make:134: bin/run_tests] Error 1
make[1]: *** [CMakeFiles/Makefile2:388: src/tests/CMakeFiles/run_tests.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I also tried the CMakeLists.txt
file provided above and had the same error.
Encountered the same issue as @oushujun and @biozzq. After a brief search found this solution in a different GitHub issues discussion: tarantool/tarantool#4639 (comment). Modified
CMakeLists.txt
as detailed below, and was able to successfully install the tool.Original
CMakeLists.txt
cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0048 NEW) project(DR VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(PYTHON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/py) find_package(OpenMP) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -lstdc++fs -ggdb3 ${OpenMP_CXX_FLAGS}" ) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") set(CMAKE_COMPILE_OPTIONS "-Wall ${OpenMP_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELEASE "-O3") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_SHARED_LINKER_FLAGS "-Wall -Wc++-compat -O2 -msse4.1 -DHAVE_KALLOC -DKSW_CPU_DISPATCH -D_FILE_OFFSET_BITS=64 -ltbb -fsigned-char -fsanitize=address") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/tools) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/lib) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/projects) add_subdirectory(src/tests) add_subdirectory(src/tools) add_subdirectory(src/lib/spoa) add_subdirectory(src/lib/ksw2) add_subdirectory(src/projects)
Modified
CMakeLists.txt
, change on line 19, added-lrt
flag.cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0048 NEW) project(DR VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(PYTHON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/py) find_package(OpenMP) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -lstdc++fs -ggdb3 ${OpenMP_CXX_FLAGS} -lrt" ) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") set(CMAKE_COMPILE_OPTIONS "-Wall ${OpenMP_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELEASE "-O3") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_SHARED_LINKER_FLAGS "-Wall -Wc++-compat -O2 -msse4.1 -DHAVE_KALLOC -DKSW_CPU_DISPATCH -D_FILE_OFFSET_BITS=64 -ltbb -fsigned-char -fsanitize=address") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/tools) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/lib) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/projects) add_subdirectory(src/tests) add_subdirectory(src/tools) add_subdirectory(src/lib/spoa) add_subdirectory(src/lib/ksw2) add_subdirectory(src/projects)
after update CMakeLists.txt, it works!!! many thank
Hi! I'm still having the same problem while installing, I was wondering if the problem was solved.
I made the changes as mentioned in "Modified CMakeLists.txt, change on line 19, added -lrt flag", it still does not work. Any help or leads would be greatly appreciated, thank you!