-
Notifications
You must be signed in to change notification settings - Fork 18
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
Failed to cross-compile CPU binaries - kr260 #59
Comments
The errors related to aarch64-linux-gnu-g++ and aarch64-linux-gnu-gcc are resolved after installing Pull request to modify docs: #60 |
For resolving the error with package "ament_cmake_core", I cross-compiled the ament_cmake,
Now, I am seeing a similar issue but with ament_cmake_ros
Added ament_cmake_ros to cross-compile and observed a new error
|
ament_cmake_core should be installed in the Ubuntu sysroot if deployed appropriately. Check it it’s there please and otherwise report what went wrong in the deployment process (and posterior patching). Also, to help assess the issues, it’d be useful to get the whole commands with their corresponding errors, as well as instructions on how to reproduce the errors. Otherwise providing help is hard. |
Hi @vmayoral I can't seem to find any ROS related CMake files in the ubuntu sysroot
I found this patch which seems to be installing ROS onto sysroot, can you confirm? |
That's correct, but the patching and install should be automated by the CMake logic of Try the following: # clean up your overlay workspace
rm -rf ~/krs_src
# re-start instructions according to https://xilinx.github.io/KRS/sphinx/build/html/docs/install.html#cross-compilation-development
###################################################
# 1. install some dependencies you might be missing
#
# NOTE: gcc-multilib conflicts with Yocto/PetaLinux 2022.1 dependencies
# so you can't have both paths simultaneously enabled in a single
# development machine
###################################################
sudo apt-get -y install curl build-essential libssl-dev git wget \
ocl-icd-* opencl-headers python3-vcstool \
python3-colcon-common-extensions python3-colcon-mixin \
kpartx u-boot-tools pv gcc-multilib
###################################################
# 2. create a new ROS 2 workspace with examples and
# firmware for KR260
###################################################
mkdir -p ~/krs_ws/src; cd ~/krs_ws
###################################################
# 3. Create file with KRS 1.0 additional repos
###################################################
cat << 'EOF' > krs_humble.repos
repositories:
perception/image_pipeline:
type: git
url: https://github.com/ros-acceleration/image_pipeline
version: ros2
tracing/tracetools_acceleration:
type: git
url: https://github.com/ros-acceleration/tracetools_acceleration
version: humble
firmware/acceleration_firmware_kr260:
type: zip
url: https://github.com/ros-acceleration/acceleration_firmware_kr260/releases/download/v1.0.0/acceleration_firmware_kr260.zip
acceleration/adaptive_component:
type: git
url: https://github.com/ros-acceleration/adaptive_component
version: humble
acceleration/ament_acceleration:
type: git
url: https://github.com/ros-acceleration/ament_acceleration
version: humble
acceleration/ament_vitis:
type: git
url: https://github.com/ros-acceleration/ament_vitis
version: humble
acceleration/colcon-hardware-acceleration:
type: git
url: https://github.com/colcon/colcon-hardware-acceleration
version: main
acceleration/ros2_kria:
type: git
url: https://github.com/ros-acceleration/ros2_kria
version: main
acceleration/ros2acceleration:
type: git
url: https://github.com/ros-acceleration/ros2acceleration
version: humble
acceleration/vitis_common:
type: git
url: https://github.com/ros-acceleration/vitis_common
version: humble
acceleration/acceleration_examples:
type: git
url: https://github.com/ros-acceleration/acceleration_examples
version: main
EOF
###################################################
# 4. import repos of KRS 1.0 release
###################################################
vcs import src --recursive < krs_humble.repos # about 3 mins in an AMD Ryzen 5 PRO 4650G
###################################################
# 5. build the workspace and deploy firmware for hardware acceleration
###################################################
source /tools/Xilinx/Vitis/2022.1/settings64.sh # source Xilinx tools
source /opt/ros/humble/setup.bash # Sources system ROS 2 installation.
# Note: The path above is valid if one installs ROS 2 from a pre-built debian
# packages. If one builds ROS 2 from the source the directory might
# vary (e.g. ~/ros2_humble/ros2-linux).
export PATH="/usr/bin":$PATH # FIXME: adjust path for CMake 3.5+
colcon build --merge-install # about 18 mins in an AMD Ryzen 5 PRO 4650G (this has been dumped directly from https://xilinx.github.io/KRS/sphinx/build/html/docs/install.html#cross-compilation-development) |
Hi @vmayoral I tried rebuilding the KRS as you mentioned, and found the chroot failed and so the ros packages didn't install to sysroot
But, after installing qemu on the Ubuntu host, the chroot worked, and I don't see any of the above ros package dependency issues.
I have the vitis installed, but qemu is not part of it. I believe qemu is part of petalinux and not Vitis |
gcc-multilib is conflicting with gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu packages. Which are required: Xilinx#59 (comment)
Hi @vmayoral @mohammedrafi-sk, I have encountered the same chroot error when trying to cross-compile the CPU binaries for kr260.
Unfortunately, the fix So far I have not been able to find a fix, except to compute the CPU binaries on target. I have tried it on a Windows machine with wsl2 and a Linux machine (Ubuntu 22.04), and both of them result in the same chroot error, so it doesn't seem to be a wsl2 issue. Any insight would be appreciated, thanks. |
This thread has been very helpful! I'm building KRS using Docker and it turns out that when launching the container, I did not enable the
...script to silently fail during the
Posting this in case anyone else runs into this in the future. So, the fix for me was to simply launch via |
@verderog Could you please explain more clearly about how you fix this issue ?? I met the same issue as you mentioned. |
For context, I've created a Docker container in order to build KRS. This Docker container performs the operations that the KRS build instructions call out (see more here). It turns out that within a Docker container running the More info on the Docker privileged flag here. One of the key take-aways:
@lanyangyang I hope this helps! |
Right, this requires sudo privileges to successfully install ROS 2 in the chroot. The reason why some people is experiencing failures is because these privileges are not being given appropriately (either inside or outside of the container). By adding the Outside of the container folks should pay attention to this (and/or |
The following errors are seen while building the cross-compile CPU binaries for kr260
KRS1.0_kr260_crosscompile_cpu.txt
Steps to reproduce the issue:
I am trying out the kr260 cross-compilation-development. The setup of KRS went fine without any issues (steps 1-6).
While running step 7A, I am seeing the above-mentioned dependency errors.
The text was updated successfully, but these errors were encountered: