Robotics StackExchange | Archived questions

Error building Foxy: relocation R_X86_64_PC32 against symbol `_PyRuntime' (Focal)

I'm installing ROS2 Foxy, and when a run the command:

> cd ~/ros2_foxy/
> colcon build --symlink-install

I had the error:

What can I do to solve this error??

Asked by Jose-Araujo on 2021-08-25 17:04:14 UTC

Comments

How did you install python3.8? I think you don't use apt.

Also, it is recommended to attach the error as text, not as an image.

Asked by miura on 2021-08-25 19:13:06 UTC

Did you download from apt on ros2?

what happen after you type this in terminal /source /opt/ros/foxy/setup.bash?

also whats the output of python3 --version?

Asked by kak13 on 2021-08-25 20:15:36 UTC

When I update the Ubuntu 18 to Ubuntu 20, the python3 it was install.

source /opt/ros/foxy/setup.bash => bash: /opt/ros/foxy/setup.bash: No such file or directory python3 --version => Python 3.8.10

Asked by Jose-Araujo on 2021-08-25 21:45:58 UTC

bash: /opt/ros/foxy/setup.bash: No such file or directory

THis means you don't have foxy installed. Try re-install foxy

Asked by kak13 on 2021-08-25 21:47:19 UTC

@Jose-Araujo: could you clarify why you want to build Foxy from source? There isn't really any immediate need when you are running Ubuntu 20.04. Or is this non amd64?

@kak13:

bash: /opt/ros/foxy/setup.bash: No such file or directory

THis means you don't have foxy installed. Try re-install foxy

I'm sort-of assuming @Jose-Araujo knows that. His build is failing, that would seem to be the main problem here.

Additionally, the default install location for a from-source build would be $colcon_ws/install, not /opt/ros.

Asked by gvdhoorn on 2021-08-26 01:44:31 UTC

I must be confused with colcon build then.

I assume that colcon build relies on /opt/ros/foxy/setup.bash to continue the colcon build.

My bad, Jose haha

Asked by kak13 on 2021-08-26 02:02:35 UTC

Well, what is your purpose?

You could have a good reason for wanting to compile everything from sources, but if you can't think of any, you'd probably be better of with an installation using apt. So that would indeed be the second link you shared.

Asked by gvdhoorn on 2021-08-27 01:40:48 UTC

Answers