chrisquince / STRONG

Strain Resolution ON Graphs
MIT License
47 stars 9 forks source link

compile the SPAdes and COG tools executables: fail #106

Closed weiting-liang closed 3 years ago

weiting-liang commented 3 years ago

I ran " ./build_cog_tools.sh " , the following error appeared. Is this step necessary?

CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it.

-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) CMake Warning (dev) at bioenv3.7/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:424 (message): The package name passed to find_package_handle_standard_args (readline) does not match the name of the calling package (Readline). This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND) to follow a certain pattern. Call Stack (most recent call first): cmake/Modules/FindReadline.cmake:32 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) cmake/deps.cmake:19 (find_package) CMakeLists.txt:52 (include) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Boost 1.70.0 at /bioenv/lib/cmake/Boost-1.70.0 -- Requested configuration: QUIET REQUIRED -- Found boost_headers 1.70.0 at bioenv/lib/cmake/boost_headers-1.70.0 CMake Error at cmake/flags.cmake:14 (message): SPAdes requires OpenMP to be available Call Stack (most recent call first): CMakeLists.txt:55 (include)

-- Configuring incomplete, errors occurred! See also "STRONG/SPAdes/assembler/build/debug/CMakeFiles/CMakeOutput.log". See also "STRONG/SPAdes/assembler/build/debug/CMakeFiles/CMakeError.log". ↓ on STRONG/SPAdes/assembler/build/debug/CMakeFiles/CMakeError.log:

Detecting C OpenMP failed with the following output: Change Dir: STRONG/SPAdes/assembler/build/debug/CMakeFiles/CMakeTmp ………… ………… …………

Sebastien-Raguideau commented 3 years ago

Yes it is completely necessary. These are some supplementary tools builds using SPAdes library for kmer coverage/ subgraph extraction/ high resolution graph processing....

It looks like you're missing OpenMP. If you didn't do it yet I advise you run : sudo apt-get -y install libbz2-dev libreadline-dev cmake g++ zlib1g zlib1g-dev I think OpenMP is installed as part of these. Otherwise It seems OpenMP is available as part of gcc > 4.2.0.

weiting-liang commented 3 years ago

Thank you for your help! I'm sorry for the late reply. I contacted the administrator to add the OpenMP, and now it seems could run, but the new error appeared.

I have tried several times and the program "./build_cog_tools.sh" stoped in different places. ############################################################## [ 73%] Linking CXX static library libspades-stages.a [ 73%] Built target spades-stages make: *** [Makefile:171: all] Error 2

[ 73%] Built target hmmer [ 74%] Linking CXX static library libspades-stages.a [ 74%] Built target spades-stages [ 74%] Linking CXX static library libpath_extend.a [ 74%] Built target path_extend make: *** [Makefile:171: all] Error 2

[ 67%] Built target jemalloc-syms-internal [ 68%] Linking CXX static library libspades-stages.a [ 68%] Built target spades-stages make: *** [Makefile:171: all] Error 2

[ 70%] Built target path_extend make: *** [Makefile:171: all] Error 2 ###############################################################

I don't kown what went wrong, so I pick up the log's highlight. -- Found readline: /usr/include -- Looking for wsyncup in /usr/lib64/libncurses.so -- Looking for wsyncup in /usr/lib64/libncurses.so - not found -- Looking for wsyncup in /usr/lib64/libcurses.so -- Looking for wsyncup in /usr/lib64/libcurses.so - not found -- Found Boost 1.70.0 at /bioenv/lib/cmake/Boost-1.70.0 -- Requested configuration: QUIET REQUIRED -- Found boost_headers 1.70.0 at /bioenv/lib/cmake/boost_headers-1.70.0 -- Found Boost: /bioenv/lib/cmake/Boost-1.70.0/BoostConfig.cmake (found version "1.70.0") ……………… -- Performing Test malloc_usable_size_const -- Performing Test malloc_usable_size_const - Failed ……………… -- Performing Test JEMALLOC_HAVE_MACH_ABSOLUTE_TIME -- Performing Test JEMALLOC_HAVE_MACH_ABSOLUTE_TIME - Failed ……………… -- Looking for memalign -- Looking for memalign - not found ……………… -- Looking for issetugid -- Looking for issetugid - not found -- Looking for _malloc_thread_cleanup -- Looking for _malloc_thread_cleanup - not found -- Looking for _pthread_mutex_init_calloc_cb -- Looking for _pthread_mutex_init_calloc_cb - not found ……………… -- Performing Test HAS_MADVISE_MADV_FREE -- Performing Test HAS_MADVISE_MADV_FREE - Failed ……………… -- Performing Test JEMALLOC_OS_UNFAIR_LOCK -- Performing Test JEMALLOC_OS_UNFAIR_LOCK - Failed ……………… -- Performing Test JEMALLOC_OSATOMIC -- Performing Test JEMALLOC_OSATOMIC - Failed ……………… -- Performing Test _Wshorten_64_to_32 -- Performing Test _Wshorten_64_to_32 - Failed ……………… -- Looking for include file cxxabi.h -- Looking for include file cxxabi.h - not found ……………… -- Looking for include file mach/mach.h -- Looking for include file mach/mach.h - not found ……………… -- Looking for shm_open -- Looking for shm_open - not found ……………… -- Looking for erfc -- Looking for erfc - not found ………………

weiting-liang commented 3 years ago

Hi, chrisquince! I installed needed packages by using conda, but there are another problem: `

[ 91%] Linking CXX executable ../../bin/spades-ionhammer /envs/install/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: ../../ext/jemalloc/src/libjemalloc.a(nstime.c.o): undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5' /envs/install/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /envs/install/bin/../x86_64-conda-linux-gnu/sysroot/lib64/librt.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: [projects/ionhammer/CMakeFiles/spades-ionhammer.dir/build.make:311: bin/spades-ionhammer] Error 1 make[1]: [CMakeFiles/Makefile2:2613: projects/ionhammer/CMakeFiles/spades-ionhammer.dir/all] Error 2 make: *** [Makefile:171: all] Error 2 `

what should I do ?