Open sgvandijk opened 3 years ago
Thanks for this, it is a better solution than the current state of
ros_cross_compile
!
I wanted to merge this solution to the ros_cross_compile
, but I didn't find time to adapt everything. It would be nice merging this to the ros_cross_compile
.
I used
sshfs
to mount the rootfs, bothlibssl.so.1.1
andlibcrypto.so.1.1
are there under/home/develop/rootfs/lib/arm-linux-gnueabihf
The sshfs
may fail to deliver resources sometimes. In that case, simply running it again should solve the problem.
Have you tried installing those libraries on the Raspberry Pi (maybe sudo apt install libssl-dev libcrypto++-dev
)?
Another possibility is linking those libraries directly in: https://github.com/cyberbotics/epuck_ros2/blob/master/installation/cross_compile/toolchain.cmake
Or try with -rpath
as suggested in the error, but that will probably break other stuff.
Galactic is around the corner with CycloneDDS as a default middleware, so we should be prepared :)
As a workaround, for now I have just disabled building this package with:
touch src/eclipse-cyclonedds/COLCON_IGNORE
Thank you for pointing on the workaround! I am sure it will be useful to other users.
Thank you for the instruction, however, some package also build fail(one of them is libcurl_vendor
), and I can't figure out what is path_to_pi_puck_image.img
in this repo. So currently stuck here.
Target OS: Raspbian GNU/Linux 10 (buster)
my command
cross-colcon-build --skip-packages "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1"
This is a transitive library dependency -> libssl.so.1.1, needed by ../../../lib/libddsc.so.0.7.0
, -L
has no effect in this case, see man ld
on -rpath-link
, fixable with proper -rpath-link
parameters.
@asherikov Could you please make a PR about this?
Sorry, no, just passing by.
I have come back to this recently. I haven't been able to find the right incantation to add -rpath-link
in the correct place yet, but the following change is another workaround with which the cyclone-dds
package does build, but without SSL support:
--- a/installation/cross_compile/bashrc.sh
+++ b/installation/cross_compile/bashrc.sh
@@ -20,7 +20,8 @@ cross-colcon-build() {
-DCMAKE_TOOLCHAIN_FILE=/home/develop/toolchain.cmake \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DTHIRDPARTY=ON \
- -DBUILD_TESTING:BOOL=OFF
+ -DBUILD_TESTING:BOOL=OFF \
+ -DENABLE_SSL=OFF
}
It now fails on foonathan_memory_vendor
requiring a version of CMake that is too new, but that's separate from this issue.
I use your cross-compilation setup to build ROS 2 for my RPi Zero (on its own without an E-Puck) after seeing https://github.com/ros-tooling/cross_compile/issues/69#issuecomment-658865513. Thanks for this, it is a better solution than the current state of
ros_cross_compile
!However, when following the cross-compilation instructions here, the
cross-colcon-build
command fails when trying to build thecyclonedds
package with the following:followed by a further list of undefined references.
I used
sshfs
to mount the rootfs, bothlibssl.so.1.1
andlibcrypto.so.1.1
are there under/home/develop/rootfs/lib/arm-linux-gnueabihf
, so I'm not sure why they can't be found. Probably theADD_LIBRARY
warning has something to do with it, but I couldn't immediately figure out where that comes from.As a workaround, for now I have just disabled building this package with:
with which
cross-colcon-build
finishes successfully.