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

Linking errors for client_fixture and service_fixture tests #52

Closed
dhood opened this issue Apr 26, 2016 · 9 comments · Fixed by #55
Closed

Linking errors for client_fixture and service_fixture tests #52

dhood opened this issue Apr 26, 2016 · 9 comments · Fixed by #55
Assignees

Comments

@dhood
Copy link
Member

dhood commented Apr 26, 2016

The service_fixture and client_fixture tests are not linking properly on my machine. The rest work fine.

Linking CXX executable client_fixture__rmw_connext_cpp
cd /home/dhood/src/rcl/build/rcl/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/client_fixture__rmw_connext_cpp.dir/link.txt --verbose=1
/usr/bin/c++    -std=c++11 -Wall -Wextra    CMakeFiles/client_fixture__rmw_connext_cpp.dir/rcl/client_fixture.cpp.o  -o client_fixture__rmw_connext_cpp  -L/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2 -rdynamic ../librcl__rmw_connext_cpp.so -ldl memory_tools/librcl_memory_tools.so /home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib/librmw_connext_shared_cpp.so /home/dhood/ros2_ws/install_isolated/rmw/lib/librmw.so /home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib/librosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rosidl_typesupport_connext_cpp/lib/librosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/rmw_connext_cpp/lib/librmw_connext_cpp.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_connext_c.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_opensplice_c.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_opensplice_cpp.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_connext_c.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_opensplice_c.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_opensplice_cpp.so -lnddsc -lnddscore -lnddscpp -lrticonnextmsgcpp -lcmxml -lcommonserv -ldcpsgapi -ldcpssac -lddsconfparser -lddsconf -lddsdatabase -lddsi2 -lddskernel -lddsosnet -lddsos -lddsserialization -lddsuser -lddsutil -ldurability -lspliced -ldcpssacpp -lpthread -ldl /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_connext_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_opensplice_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_opensplice_cpp.so /home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib/librmw_connext_shared_cpp.so /home/dhood/ros2_ws/install_isolated/rmw/lib/librmw.so /home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib/librosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rosidl_typesupport_connext_cpp/lib/librosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/rmw_connext_cpp/lib/librmw_connext_cpp.so -ldl -lnddsc -lnddscore -lnddscpp -lrticonnextmsgcpp -lcmxml -lcommonserv -ldcpsgapi -ldcpssac -lddsconfparser -lddsconf -lddsdatabase -lddsi2 -lddskernel -lddsosnet -lddsos -lddsserialization -lddsuser -lddsutil -ldurability -lspliced -ldcpssacpp -lpthread -ldl -Wl,-rpath,/home/dhood/src/rcl/build/rcl:/home/dhood/src/rcl/build/rcl/test/memory_tools:/home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib:/home/dhood/ros2_ws/install_isolated/rmw/lib:/home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib:/home/dhood/ros2_ws/install_isolated/rosidl_typesupport_connext_cpp/lib:/home/dhood/ros2_ws/install_isolated/rmw_connext_cpp/lib:/home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib:/home/dhood/ros2_ws/install_isolated/example_interfaces/lib:/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2:/home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib 
/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2/libnddscore.so: undefined reference to `dlopen'
/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2/libnddscore.so: undefined reference to `dlclose'
/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2/libnddscore.so: undefined reference to `dlerror'
/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2/libnddscore.so: undefined reference to `dlsym'

-ldl is in the linking output, but I think it might be something similar to this issue
I'm on Trusty with gcc version 4.8.4. I think the buildfarm has 4.6.3.

I have seen that the memory_tools tests are doing something specific with dl which might be relevant to these tests as well?

@jacquelinekay
Copy link
Contributor

https://github.com/ros2/rcl/blob/master/rcl/test/rcl_add_custom_executable.cmake#L41-Lundefined

It could be that the macro used the build these executables, rcl_add_custom_executables, does not link ${_ARG_APPEND_LIBRARY_DIRS} to the executable, and the missing symbols are passed to the executable through memory tools, which is specified through that argument.

@jacquelinekay
Copy link
Contributor

I'm going to fix up various issues with the cmake infrastructure of rcl tests in an upcoming PR, I'll let you know when it's ready so you can test it locally.

@jacquelinekay jacquelinekay self-assigned this Apr 26, 2016
@jacquelinekay jacquelinekay added the in progress Actively being worked on (Kanban column) label Apr 26, 2016
@dirk-thomas
Copy link
Member

dirk-thomas commented Apr 26, 2016

The build farm is using Docker images with Trusty and therefore g++ 4.8. It should be exactly the same as your version locally.

Therefore I would guess that there must be a difference in:

  • either what exactly code you compile (double check that everything is up-to-date and using the right branches)
  • or how its build (try a clean build).

@dhood
Copy link
Member Author

dhood commented Apr 26, 2016

I get this even after

vcs pull
rm -r build_isolated install_isolated
src/ament/ament_tools/scripts/ament.py build --build-tests --isolated

Is this outdated? https://github.com/ros2/ros2/blob/ci_scripts/ros2_batch_job/linux_batch/__init__.py#L54 the jobs output that warning.

I did not install connext from debian packages. I'll try that.
Are they still available somewhere so I can update the broken links here https://github.com/ros2/ros2/wiki/Linux-Development-Setup#debian-packages-built-by-osrf (I grabbed them off the buildfarm)

@dhood
Copy link
Member Author

dhood commented Apr 26, 2016

had also done vcs custom --args checkout master by the way

@dirk-thomas
Copy link
Member

The latest release from RTI was built with that compiler version and they embed that into the shell file (since they build many different combinations).

There is no public Debian package available since we are not allowed to distribute the package we built for internal use.

@dhood
Copy link
Member Author

dhood commented Apr 27, 2016

update: I changed from the official connext packages (rti_connext_dds-5.2.0-eval-x64Linux3gcc4.8.2.run) to the debian ones and now my linking errors are gone. the debian packages might be using different version of connext

And I will remove that section from wiki entirely since it doesn't sound like it should be there

@dirk-thomas
Copy link
Member

The wiki section makes sense for us since it describes what to install if you have access. Therefore I would propose to keep it - eventually improve the note.

@dhood
Copy link
Member Author

dhood commented Apr 27, 2016

ah ok then I'll just explain that it's only for OSRF (assuming that link is still right? I can't access that repo but might just not have the privileges)

@wjwwood wjwwood removed the in progress Actively being worked on (Kanban column) label Apr 28, 2016
emersonknapp pushed a commit to aws-ros-dev/rcl that referenced this issue Jun 3, 2019
Don't require logging users to manually initialise before setting severity
ivanpauno pushed a commit that referenced this issue Jan 2, 2020
rename message_type_support{_struct}.h
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

Successfully merging a pull request may close this issue.

4 participants