colcon build /bin/sh: 1: env: Argument list too long
I am trying to compile a ros2 workspace using colcon build, and everytime I try there are some packages where I do get this error messages:
colcon build --packages-select tier4_auto_msgs_converter
Starting >>> tier4_auto_msgs_converter
[1.036s] ERROR:colcon.colcon_core.shell:Exception in shell extension 'sh': Expected ['.', '/home/dcanton/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/autoware/build/tier4_auto_msgs_converter/colcon_command_prefix_build.sh', '&&', 'env'] to pass: /bin/sh: 1: env: Argument list too long
[1.036s] ERROR:colcon.colcon_cmake.task.cmake.build:Could not find a shell extension for the command environment
Failed <<< tier4_auto_msgs_converter [0.62s, exited with code 1]
Summary: 0 packages finished [0.94s]
1 package failed: tier4_auto_msgs_converter
Anyone knows how to solve this?
Asked by Dcannt on 2023-05-31 05:32:31 UTC
Comments
I believe this could be a duplicate of #q411506.
@Dcannt: did you also open colcon/colcon-core#558?
Asked by gvdhoorn on 2023-06-02 03:33:06 UTC
Hi!,
Yeah I've opened that issue but is not the same, I have Python 3.8.10 installed in this computer, I've tried to upgrade it to 3.10 and I does not work as well, but with the same configuration in my laptop and it works perfectly, but not in the computer I am trying to install it
Asked by Dcannt on 2023-06-02 04:22:57 UTC