Skip to content
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

Colcon build -> env: Argument list too long #558

Open
danicannt opened this issue Jun 1, 2023 · 2 comments
Open

Colcon build -> env: Argument list too long #558

danicannt opened this issue Jun 1, 2023 · 2 comments

Comments

@danicannt
Copy link

Hi,

I am trying to compile Autoware in a computer that uses ROS2 Galactic and Ubuntu20,
The computer is using Python 3.8.10
I've been able to make it work successfully in other computers that we have around but I have two where I tried and I am getting the exact same errors when I try.


[6.152s] ERROR:colcon.colcon_core.shell:Exception in shell extension 'sh': Expected ['.', '/home/dcanton/source/external/autoware/build/tier4_auto_msgs_converter/colcon_command_prefix_build.sh', '&&', 'env'] to pass: /bin/sh: 1: env: Argument list too long

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/shell/__init__.py", line 302, in get_command_environment
    return await extension.generate_command_environment(
  File "/usr/lib/python3/dist-packages/colcon_core/shell/sh.py", line 154, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "/usr/lib/python3/dist-packages/colcon_core/shell/__init__.py", line 338, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "/usr/lib/python3/dist-packages/colcon_core/subprocess.py", line 128, in check_output
    assert not rc, f'Expected {args} to pass: {stderr_data}'
AssertionError: Expected ['.', '/home/dcanton/source/external/autoware/build/tier4_auto_msgs_converter/colcon_command_prefix_build.sh', '&&', 'env'] to pass: /bin/sh: 1: env: Argument list too long


[6.152s] ERROR:colcon.colcon_cmake.task.cmake.build:Could not find a shell extension for the command environment

Have this happened to anyone before?.
Thanks!

@cottsay
Copy link
Member

cottsay commented Jun 2, 2023

Please take a look at #485, which exhibited the same symptom. In that case, the problem originated in the user's environment variable setup within their bash profile.

@danicannt
Copy link
Author

Could you please give me some more info?

I get that there is some problem with some environment variable ($PATH?) but I don't how did you be able to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants