Bug #1533
Errorneous library name on MacOS
Status: | Resolved | Start date: | 06/06/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | S. Wrede | % Done: | 100% | |
Category: | cmake | |||
Target version: | Robotics Service Bus - rsb-0.9 |
Description
This error popped up after updating (today) to the newest HEAD version of RSC. The sympton is as follows:
Linking CXX static library build/libgmock.a [ 55%] Building CXX object src/CMakeFiles/rstconverters.dir/rst/converters/rci/PoseConverter.cpp.o brew: superenv removed: -Wall -Wextra [ 55%] Built target gmock [ 61%] Building CXX object src/CMakeFiles/rstconverters.dir/rst/converters/rci/PressureConverter.cpp.o brew: superenv removed: -Wall -Wextra [ 66%] Building CXX object src/CMakeFiles/rstconverters.dir/rst/converters/rci/TranslationConverter.cpp.o brew: superenv removed: -Wall -Wextra [ 72%] Building CXX object src/CMakeFiles/rstconverters.dir/rst/converters/rci/DoublesConverter.cpp.o brew: superenv removed: -Wall -Wextra Linking CXX shared library ../build/librstconverters.dylib ld: library not found for -lrsc clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [build/librstconverters.0.9.dylib] Error 1 make[1]: *** [src/CMakeFiles/rstconverters.dir/all] Error 2 make: *** [all] Error 2
rsc0.9.pc looks as follows:
Sebastians-MacBook-Air:~ swrede$ cat /usr/local/lib/pkgconfig/rsc0.9.pc prefix=/usr/local/Cellar/rsc/HEAD libdir=${prefix}/lib includedir=${prefix}/include/rsc0.9 Name: Robotics Systems Commons Description: RSC is a Code.CoR-Lab project focused on all aspects of reusable library functions in robotics systems. Version: 0.9.0 Libs: -L${libdir} -lrsc0.9 Cflags: -I${includedir} -I/usr/local/include -I/usr/local/include
Which looks fine to me. However, the library name looks broken in several regards:
Sebastians-MacBook-Air:~ swrede$ ls -lah /usr/local/lib/librsc0.9. librsc0.9.0.9.dylib librsc0.9.dylib
First, I wonder if 0.9.0.9 is correct?
Second, there must be a dot between library name and version suffix such as: librsc.0.9.dylib
History
#1 Updated by Anonymous almost 11 years ago
- Category set to cmake
- Status changed from New to Feedback
- Assignee set to S. Wrede
Sebastian Wrede wrote:
Which looks fine to me. However, the library name looks broken in several regards:
First, I wonder if 0.9.0.9 is correct?
Second, there must be a dot between library name and version suffix such as:librsc.0.9.dylib
This should be fine AFAIR. The rsc library name is now rsc0.9
(without a dot in between), see #1498. MAC seems to attach the SO version before the dylib library suffix, resulting in the suffix .0.9.dylib
(as opposed to .so.0.9
on linux).
Regarding the linker issue. I guess that you updated rsc (that comes with the new library name rsc0.9
), but did not update the rsc downstream projects (rsb, rst), so that they are still exporting the old rsc library name as dependency.
Updating rsb and rst probably does the trick. If this doesn`t help, you might still have some old installation artifacts (some old RSBDepends-*
or RSTDepends-*
in share/
) with the old rsc library name.
#2 Updated by S. Wrede almost 11 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100
Updating rci solved the issue. It had an outdated imported library reference to just rsc
.