Skip to content

Build error when a static OpenIGTLink library is used. #5

Description

@tokjun

When the ROS-IGTL-Bridge is built with a static OpenIGTLink library, the following error occurs:

[ 37%] Linking CXX shared library /home/junichi/catkin_ws/devel/lib/libros_igtl_bridge_lib.so
/usr/bin/ld: /home/junichi/igtdev/igtl/OpenIGTLink-build/lib/libOpenIGTLink.a(igtlClientSocket.cxx.o): relocation R_X86_64_32 against `_ZTVN4igtl12ClientSocketE' can not be used when making a shared object; recompile with -fPIC
/home/junichi/igtdev/igtl/OpenIGTLink-build/lib/libOpenIGTLink.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
ROS-IGTL-Bridge/CMakeFiles/ros_igtl_bridge_lib.dir/build.make:546: recipe for target '/home/junichi/catkin_ws/devel/lib/libros_igtl_bridge_lib.so' failed
make[2]: *** [/home/junichi/catkin_ws/devel/lib/libros_igtl_bridge_lib.so] Error 1
CMakeFiles/Makefile2:670: recipe for target 'ROS-IGTL-Bridge/CMakeFiles/ros_igtl_bridge_lib.dir/all' failed
make[1]: *** [ROS-IGTL-Bridge/CMakeFiles/ros_igtl_bridge_lib.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1 -l1" failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions