ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Building from source, rqt fails

asked 2022-04-04 09:02:46 -0500

mechaniputer gravatar image

Hi,

I am attempting to install ROS 2 Galactic from source on Ubuntu 20.04 x86_64 according to the instructions here: https://docs.ros.org/en/galactic/Inst...

I have reached this step:

colcon build --symlink-install

The build fails with the following output:

--- stderr: rqt                                                                                                                                             
error: Multiple top-level packages discovered in a flat-layout: ['share', 'resource'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.
---
Failed   <<< rqt [13.0s, exited with code 1]

Why is this happening? What can be done to fix it? Thanks.

edit retag flag offensive close merge delete

Comments

I think the directory it's upset with is src/ros-visualization/rqt/rqt The error says that there are two packages in a flat listing, but I don't see that. I see "resource", but not "share". Here are the files I see in that directory:

CHANGELOG.rst  package.xml  resource/  setup.py
mechaniputer gravatar image mechaniputer  ( 2022-04-06 08:05:41 -0500 )edit

This is not galactic or Ubuntu 20.04 specific. It's rqt issue with newer version of setuptools. Please fix the tags if possible.

yashi gravatar image yashi  ( 2023-02-12 08:48:14 -0500 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2023-02-12 08:35:43 -0500

yashi gravatar image

updated 2023-02-12 08:44:42 -0500

Looks like a feature added to setuptools v61. https://github.com/pypa/setuptools/co...

And here is a thread discussing it. https://discuss.python.org/t/help-tes...

The following patch fixes it.

diff --git a/rqt/setup.py b/rqt/setup.py
index 9f46641..2353d7a 100644
--- a/rqt/setup.py
+++ b/rqt/setup.py
@@ -29,4 +29,5 @@ setup(
         'rqt_gui - that enables multiple `rqt` widgets to be docked in a single window.'
     ),
     license='BSD',
+    py_modules=[],
 )
edit flag offensive delete link more

Comments

yashi gravatar image yashi  ( 2023-02-12 21:15:06 -0500 )edit
0

answered 2023-01-10 05:02:54 -0500

Jörg gravatar image

Hi, just went into the same problem.

I'm using Debian/bookworm as of (01.2023) and wanted to compile the ros2 humble distribution and ran into the same error from above.

The Debian Package of setuptools (python3-setuptools) seems to be the problem. Older versions work.

You can install python-setuptools with pip for your user. It will override the default installation.

pip install setuptools==58.2.0 worked for me.

edit flag offensive delete link more
0

answered 2022-04-07 09:39:48 -0500

mechaniputer gravatar image

Lacking any other options, I deleted the repo, tried again, and got a new error from running out of memory. I did it yet again, and it worked. Still no idea what the problem really is, but I have managed to build it.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-04-04 09:02:46 -0500

Seen: 627 times

Last updated: Feb 12 '23