marbl/MashMap

Installation issue with cmake --build build

JGriffin17 opened this issue · 3 comments

I am unable to execute the code 'cmake --build build' - I receive the following error:
Please could you suggest how I can install this program?

16%] Linking CXX executable bin/mashmap
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:183: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:308: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:183: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:308: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:176: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o:/usr/local/include/c++/8.2.0/bits/fs$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:1054: undefined reference to std::fil$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:176: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:544: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:824: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:183: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:1054: undefined reference to std::fil$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:176: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:544: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:824: undefined reference to std::file$
/usr/local/include/c++/8.2.0/bits/fs_path.h:824: undefined reference to std::file$ /usr/local/include/c++/8.2.0/bits/fs_path.h:824: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::__cxx$ /usr/local/include/c++/8.2.0/bits/fs_path.h:183: undefined reference to std::file$
CMakeFiles/mashmap.dir/src/map/mash_map.cpp.o: In function std::filesystem::exist$ /usr/local/include/c++/8.2.0/bits/fs_ops.h:121: undefined reference to std::files$
collect2: error: ld returned 1 exit status
CMakeFiles/mashmap.dir/build.make:112: recipe for target 'bin/mashmap' failed
make[2]: *** [bin/mashmap] Error 1
CMakeFiles/Makefile2:84: recipe for target 'CMakeFiles/mashmap.dir/all' failed
make[1]: *** [CMakeFiles/mashmap.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2

bkille commented

Hi! Sorry for the delayed response. My guess is that your compiler doesn't have support for the std::filesystem library. Can you show the output of cmake as well? It should look something like this...

-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-11 - 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/g++-11 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE: Release
-- Configuring done
-- Generating done
jmwara commented

Hi, I think this is what was causing the above build error. When I download the most recent tar file and try to compile it with the given instructions in the INSTALL.txt file, there seems to be a problem where the compiler is expecting the install location to be a git repository.

-- The C compiler identification is GNU 8.5.0
-- The CXX compiler identification is GNU 8.5.0
-- 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
-- CMAKE_BUILD_TYPE: Release
fatal: not a git repository (or any parent up to mount point /storage)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

-- Configuring done
-- Generating done

bkille commented

Hi @jmwara!

I think the issue you are facing is separate from the @JGriffin17. In your case, there is no git found on the system, which the current CMakeLists.txt uses to create a header file w/ the current git tag.

I've updated the master branch so that you can opt-out of this functionality with cmake -DSKIP_VERSION_FILE=ON