Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake-error: The "debug" argument must be followed by a library. #321

Closed
thorstink opened this issue May 25, 2020 · 2 comments
Closed

CMake-error: The "debug" argument must be followed by a library. #321

thorstink opened this issue May 25, 2020 · 2 comments

Comments

@thorstink
Copy link
Contributor

thorstink commented May 25, 2020

Hi,

Maybe not a bug (yet) but a compatibility issue:

Description

Using the current master (342f30d), running cmake .. from a build-folder, using Ubuntu 20.04 and CMake version 3.16.3 results in:
note: I also tried with the latest release tag 4.0.2, same issue.

Environment

Ubuntu 20.04,
CMake version 3.16.3
Boost 1.71
Happens with master and v4.0.2

Additional information

11:32 $ cmake ..
-- GTSAM_SOURCE_ROOT_DIR: [/home/thomas/Libraries/gtsam]
-- GTSAM_BOOST_LIBRARIES: optimized;/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0;optimized;/usr/lib/x86_64-linux-gnu/libboost_system.so.1.71.0;optimized;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0;optimized;/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.71.0;optimized;/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.71.0;optimized;/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0;debug;debug;debug;debug;debug;debug
-- Could NOT find MKL (missing: MKL_INCLUDE_DIR MKL_LIBRARIES) 
-- Found Eigen version: 3.3.7
CMake Error at wrap/CMakeLists.txt:32 (target_link_libraries):
  The "debug" argument must be followed by a library.


-- Configuring incomplete, errors occurred!
See also "/home/thomas/Libraries/gtsam/build/CMakeFiles/CMakeOutput.log".
See also "/home/thomas/Libraries/gtsam/build/CMakeFiles/CMakeError.log".

i tried the trick mentioned here: https://stackoverflow.com/a/39663388, which allows cmake to configure (after changing debug to libdebug.so in several cmakelists.txt).. But however fails on compiling:

...
Scanning dependencies of target wrap
[ 10%] Building CXX object wrap/CMakeFiles/wrap.dir/wrap.cpp.o
[ 10%] Linking CXX executable wrap
/usr/bin/ld: cannot find -ldebug
collect2: error: ld returned 1 exit status
make[2]: *** [wrap/CMakeFiles/wrap.dir/build.make:88: wrap/wrap] Error 1
make[1]: *** [CMakeFiles/Makefile2:3108: wrap/CMakeFiles/wrap.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

but makes sense as the approach feels kind of hacky.

I'm not a cmake-wizard, but maybe @jlblancoc can give some guidance for a desired solution (if agreed this is a bug/want to fix thing) and I can put on a pull request.

@thorstink
Copy link
Contributor Author

related to #145 I guess..

@thorstink
Copy link
Contributor Author

thorstink commented May 25, 2020

False alarm.

Gitflow mistake here.. develop is not master. Master doesn't have the cmake-fix, develop does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant