-
Notifications
You must be signed in to change notification settings - Fork 486
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
Fix pkg-config boost entries for Ubuntu Focal (gazebo9) #2751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed this issue for a while on homebrew since it has had a newer boost version for a while. Unfortunately, this doesn't fix the issue on homebrew because those libraries have an extra -mt
(for multithreaded I believe).
$ ls /usr/local/opt/boost/lib | grep thread
libboost_thread-mt.a
libboost_thread-mt.dylib
The homebrew CI build is gone now, but I saw the following in an email about it:
399: ld: library not found for -lboost_thread
In my previous debugging, I tried to use a generator expression to extract the boost library names from cmake targets. For example, the following patch is able to write the absolute path of the library for each target:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8659ff1707..e90e868a23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -383,6 +383,7 @@ else (build_errors)
string (REPLACE ";" " -L" Boost_PKGCONFIG_LIBS "${Boost_PKGCONFIG_LIBS}")
foreach (b ${Boost_LIBRARIES})
+ file(GENERATE OUTPUT generated_${b}.txt CONTENT $<TARGET_LINKER_FILE:${b}>\n)
get_filename_component(bname ${b} NAME_WE)
# Prefix -l if not already prefixed
string(FIND ${bname} "-l" lprefix)
$ cat generated_Boost\:\:thread.txt
/usr/local/lib/libboost_thread-mt.dylib
cmake has a different generator expression that seems like it would be perfect for this case: TARGET_LINKER_FILE_BASE_NAME
, but that been reported as a known issue for these boost targets (boostorg/boost_install#41, and cmake issue 20611)
so I'll approve this because it seems to work for ubuntu 20.04, but it doesn't fix homebrew
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
I've updated the changelog and also bumped the version to 9.13.2 in anticipation of an upcoming release |
I filed #2790 to capture the issues with homebrew that I discussed in that comment |
Partial fix for #2735 . Need another PR for Gazebo11