-
Notifications
You must be signed in to change notification settings - Fork 60
Error library linking libtf2.so from libtf2_ros.so ?? #201
Comments
Are you using the legacy instructions? |
I have the docker and qemu installed previously following the "legacy" instructions; But here i was simply lost trying to follow the instructions here; after the line what do i do next? Invoking ros_cross_compile just return with command not found. ros_cross_compile /path/to/my/workspace --arch aarch64 --os ubuntu --rosdistro eloquent |
It sounds like you do not have the pip bin directory on your PATH. On Ubuntu, it is likely to be |
Ok, i have exported the path, more errors encountered.. something is missing, but i couldn't figure out what it is see attached output; |
Is the Docker daemon (
|
Note that I have opened #202 to track an enhancement to fix the need for the above ^ troubleshooting in the future. |
Hi, I am very sure my docker service was running (i had been building docker images successfully), and i had added myself to the docker group as well as per the installation steps. Btw, i am running WSL with ubuntu bionic on Windows 10; now that you mentioned about dockerd (docker daemon), as i know it, docker daemon doen't work on WSL, so that could be the reason? Since i can build and run docker images here in WSL, if docker daemon is the issue, is there a way for the ros_cross_compile to work as well using the same logic as? What need to be done for it to work, since i can build and run docker images and containers in WSL . As i understand it, the command will create the necessary docker image(s) and do ros2 download and setup inside the image, cross compile to arm etc and all that. I have initially tried to follow the 0.0.1 instructions which lead me to the library linking error as mentioned in the title. |
It sounds like you need to explicitly specify the socket connection for Docker since it listens by default to a Unix socket (something like Maybe this SO answer might help. |
Hi, i think docker has no problem. It runs correctly and connect to daemon on the Windows 10 host, From my understanding, if DOCKER_HOST is set, then both docker and docker-compose will use that instead of /var/run/docker.sock. It connects to the Daemon in Windows Docker Dekstop without problem, For instance, command docker -info gave me the required info, this command will not run if the docker can't connect to daemon. So on my WSL ubuntu, docker is definitely working correctly. Is the ros_cross_compile trying to check if the dockerd is running in the WSL, or trying to start the dockerd on WSL ? or Was it trying to connect to the docker daemon on WSL or something like that ? Because i don't think there is any dockerd running in WSL, as Docker daemon cannot run directly on WSL, instead it uses the Docker CLI to connect to a remote Docker daemon running through Docker for Windows. As ros_cross_compile is running on WSL, is there anything to skip the docker check if that is the issue? Because i am sure i can build and run docker images in WSL without problem, and my docker is connecting successfully to the docker daemon on Windows host. |
Sorry that we probably won't be able to provide any support with the legacy workflow. It is however a legitimate way of going about cross-compiling ROS code - the intent of this tool is to move towards automating that approach in a user friendly way. To this issue:
We're using the low level I've opened #204 to try and address this - I'm not sure yet if it works quite right, it would be useful if you could try it out and let me know if it helps with your situation. |
This works. However, i have another issue on WSL, which seemed to be related to mounting of directory. see below output: Command: kk@xxxx:~/ros2_dashing$ ros_cross_compile $(pwd) --rosdistro dashing --arch armhf --os ubuntu And yes, my src/ exists in ros2_dashing/ INFO:Docker Client: ---> bca57682f623 INFO:Docker Client:Step 7/10 : COPY gather_rosdeps.sh /root/ INFO:Docker Client: ---> Using cache INFO:Docker Client: ---> c6e9b7235fdf INFO:Docker Client:Step 8/10 : RUN mkdir -p /ws INFO:Docker Client: ---> Using cache INFO:Docker Client: ---> 485a72388d4f INFO:Docker Client:Step 9/10 : WORKDIR /ws INFO:Docker Client: ---> Using cache INFO:Docker Client: ---> 0ebda28db54a INFO:Docker Client:Step 10/10 : ENTRYPOINT ["/root/gather_rosdeps.sh"] INFO:Docker Client: ---> Using cache INFO:Docker Client: ---> 8d703e0fd24b INFO:Docker Client:Successfully built 8d703e0fd24b INFO:Docker Client:Successfully tagged ros_cross_compile:rosdep INFO:Rosdep Gatherer:Running rosdep collector image on workspace /home/kk/ros2_dashing INFO:Docker Client:+ '[' '!' -d ./src ']' INFO:Docker Client:++ pwd INFO:Docker Client:+ echo 'No src/ directory found at /ws, did you remember to mount your workspace?' INFO:Docker Client:+ exit 1 INFO:Docker Client:No src/ directory found at /ws, did you remember to mount your workspace? Traceback (most recent call last): File "/home/kk/.local/bin/ros_cross_compile", line 11, in load_entry_point('ros-cross-compile', 'console_scripts', 'ros_cross_compile')() File "/home/kk/cc_src/cross_compile/ros_cross_compile/ros_cross_compile.py", line 172, in main cross_compile_pipeline(args) File "/home/kk/cc_src/cross_compile/ros_cross_compile/ros_cross_compile.py", line 163, in cross_compile_pipeline custom_data_dir=custom_data_dir) File "/home/kk/cc_src/cross_compile/ros_cross_compile/dependencies.py", line 84, in gather_rosdeps volumes=volumes, File "/home/kk/cc_src/cross_compile/ros_cross_compile/docker_client.py", line 142, in run_container image_name, exit_code, '', image_name, 'See above ^') docker.errors.ContainerError: Command '' in image 'ros_cross_compile:rosdep' returned non-zero exit status 1: See above ^ Is the script trying to mount the specified ros2 workspace (the src/ and all its sub-directories) on the host into the docker image and the src/ failed to be mounted into the ws/ ? |
Yes, the script tries to mount the workspace onto the running container, but it appears that maybe it's not being successful. You can try this manual test, which is exactly what's happening under the hood
And if that doesn't work, perhaps simply
|
Description
**
i followed the instructions here (installed docker etc..)
https://index.ros.org/doc/ros2/Tutorials/Cross-compilation/#cross-compiling-examples-for-arm
and got what seemed to be the library linking error
**
Expected Behavior
** successfull built **
Actual Behavior
**
[172.192s] /usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libtf2.so, needed by /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so, not found (try using -rpath or -rpath-link)
[172.193s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::canTransform(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const' [172.195s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::canTransform(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >*) const'[172.196s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::~BufferCore()' [172.196s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
typeinfo for tf2::BufferCore'[172.198s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::lookupTransform(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' [172.201s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::clear()'[172.202s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::setTransform(geometry_msgs::msg::TransformStamped_<std::allocator<void> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)' [172.203s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::allFramesAsYAMLabi:cxx11 const'[172.203s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::BufferCore(std::chrono::duration<long, std::ratio<1l, 1000000000l> >)' [172.203s] /home/kk/cc_ws/ros2_ws/install/lib/libtf2_ros.so: undefined reference to
tf2::BufferCore::lookupTransform(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) const'[172.205s] collect2: error: ld returned 1 exit status
**
To Reproduce
**
colcon build --merge-install
--cmake-force-configure
--cmake-args
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DCMAKE_TOOLCHAIN_FILE="$(pwd)/src/ros2/cross_compile/cmake-toolchains/generic_linux.cmake"
-DSECURITY=ON
**
System (please complete the following information)
Additional context
** i searched libtf2.so and it actually can be found in the install/lib and the build directory **
The text was updated successfully, but these errors were encountered: