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 fails to find 'sh' environment variables on Python 3.11.1 #545

Closed
notalltim opened this issue Dec 24, 2022 · 13 comments
Closed

Colcon fails to find 'sh' environment variables on Python 3.11.1 #545

notalltim opened this issue Dec 24, 2022 · 13 comments

Comments

@notalltim
Copy link

notalltim commented Dec 24, 2022

after following the instructions on docs.ros.org to install from source I am getting the following error when running. I have tried with both bash and fish. Any help would be appreciated.

VERBOSE=1 colcon build --symlink-install --packages-skip-by-dep python_qt_binding --cmake-args -DTHIRDPARTY_Asio=ON -- no-warn-unused-cli

Starting >>> ament_package
Starting >>> ament_lint
Starting >>> gtest_vendor
Starting >>> fastcdr
Starting >>> ament_cppcheck
Starting >>> iceoryx_hoofs
Starting >>> osrf_pycommon
[1.406s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

Starting >>> osrf_testing_tools_cpp
Starting >>> google_benchmark_vendor
[1.406s] colcon.colcon_ros.task.ament_python.build ERROR Could not find a shell extension for the command environment
Starting >>> urdfdom_headers
[1.407s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

Starting >>> ament_pycodestyle
[1.407s] colcon.colcon_ros.task.ament_python.build ERROR Could not find a shell extension for the command environment
[1.407s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

Failed   <<< ament_package [0.00s, exited with code 1]
[1.407s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< ament_lint [0.00s, exited with code 1]
[1.412s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

Failed   <<< gtest_vendor [0.01s, exited with code 1]
[1.412s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
[1.412s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

[1.412s] colcon.colcon_ros.task.ament_python.build ERROR Could not find a shell extension for the command environment
[1.412s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

Failed   <<< fastcdr [0.01s, exited with code 1]
[1.412s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< ament_cppcheck [0.01s, exited with code 1]
[1.415s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

Failed   <<< iceoryx_hoofs [0.01s, exited with code 1]
[1.415s] colcon.colcon_ros.task.ament_python.build ERROR Could not find a shell extension for the command environment
[1.415s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

[1.415s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< osrf_pycommon [0.01s, exited with code 1]
[1.418s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

Failed   <<< osrf_testing_tools_cpp [0.01s, exited with code 1]
[1.418s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
[1.420s] colcon.colcon_core.shell ERROR Exception in shell extension 'sh': The environment shouldn't be empty
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 298, in get_command_environment
    return await extension.generate_command_environment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/sh.py", line 147, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/colcon_core/shell/__init__.py", line 364, in get_environment_variables
    assert len(env) > 0, "The environment shouldn't be empty"
AssertionError: The environment shouldn't be empty

Failed   <<< google_benchmark_vendor [0.01s, exited with code 1]
[1.420s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< urdfdom_headers [0.01s, exited with code 1]
Aborted  <<< ament_pycodestyle [0.29

This command worked before the most recent update including package list in case it is helpful

Packages Altered:
    Install       abseil-cpp-20220623.1-2.fc37.x86_64                  @fedora
    Install       libmd-1.0.4-2.fc37.x86_64                            @fedora
    Install       kernel-6.0.14-300.fc37.x86_64                        @updates
    Install       kernel-core-6.0.14-300.fc37.x86_64                   @updates
    Install       kernel-devel-6.0.14-300.fc37.x86_64                  @updates
    Install       kernel-modules-6.0.14-300.fc37.x86_64                @updates
    Install       kernel-modules-extra-6.0.14-300.fc37.x86_64          @updates
    Upgrade       aardvark-dns-1.4.0-1.fc37.x86_64                     @updates
    Upgraded      aardvark-dns-1.3.0-1.fc37.x86_64                     @@System
    Upgrade       amd-gpu-firmware-20221214-145.fc37.noarch            @updates
    Upgraded      amd-gpu-firmware-20221109-144.fc37.noarch            @@System
    Upgrade       container-selinux-2:2.195.1-1.fc37.noarch            @updates
    Upgraded      container-selinux-2:2.193.0-1.fc37.noarch            @@System
    Upgrade       crun-1.7.2-2.fc37.x86_64                             @updates
    Upgraded      crun-1.7.2-1.fc37.x86_64                             @@System
    Upgrade       distribution-gpg-keys-1.80-1.fc37.noarch             @updates
    Upgraded      distribution-gpg-keys-1.79-1.fc37.noarch             @@System
    Upgrade       elfutils-0.188-3.fc37.x86_64                         @updates
    Upgraded      elfutils-0.187-8.fc37.x86_64                         @@System
    Upgrade       elfutils-debuginfod-client-0.188-3.fc37.x86_64       @updates
    Upgraded      elfutils-debuginfod-client-0.187-8.fc37.x86_64       @@System
    Upgrade       elfutils-debuginfod-client-devel-0.188-3.fc37.x86_64 @updates
    Upgraded      elfutils-debuginfod-client-devel-0.187-8.fc37.x86_64 @@System
    Upgrade       elfutils-default-yama-scope-0.188-3.fc37.noarch      @updates
    Upgraded      elfutils-default-yama-scope-0.187-8.fc37.noarch      @@System
    Upgrade       elfutils-devel-0.188-3.fc37.x86_64                   @updates
    Upgraded      elfutils-devel-0.187-8.fc37.x86_64                   @@System
    Upgrade       elfutils-libelf-0.188-3.fc37.x86_64                  @updates
    Upgraded      elfutils-libelf-0.187-8.fc37.x86_64                  @@System
    Upgrade       elfutils-libelf-devel-0.188-3.fc37.x86_64            @updates
    Upgraded      elfutils-libelf-devel-0.187-8.fc37.x86_64            @@System
    Upgrade       elfutils-libs-0.188-3.fc37.x86_64                    @updates
    Upgraded      elfutils-libs-0.187-8.fc37.x86_64                    @@System
    Upgrade       firefox-108.0.1-3.fc37.x86_64                        @updates
    Upgraded      firefox-108.0-2.fc37.x86_64                          @@System
    Upgrade       firefox-langpacks-108.0.1-3.fc37.x86_64              @updates
    Upgraded      firefox-langpacks-108.0-2.fc37.x86_64                @@System
    Upgrade       gnome-online-accounts-3.46.0-3.fc37.x86_64           @updates
    Upgraded      gnome-online-accounts-3.46.0-2.fc37.x86_64           @@System
    Upgrade       gnome-remote-desktop-43.2-1.fc37.x86_64              @updates
    Upgraded      gnome-remote-desktop-43.1-1.fc37.x86_64              @@System
    Upgrade       grub2-common-1:2.06-72.fc37.noarch                   @updates
    Upgraded      grub2-common-1:2.06-70.fc37.noarch                   @@System
    Upgrade       grub2-efi-ia32-1:2.06-72.fc37.x86_64                 @updates
    Upgraded      grub2-efi-ia32-1:2.06-70.fc37.x86_64                 @@System
    Upgrade       grub2-efi-ia32-cdboot-1:2.06-72.fc37.x86_64          @updates
    Upgraded      grub2-efi-ia32-cdboot-1:2.06-70.fc37.x86_64          @@System
    Upgrade       grub2-efi-x64-1:2.06-72.fc37.x86_64                  @updates
    Upgraded      grub2-efi-x64-1:2.06-70.fc37.x86_64                  @@System
    Upgrade       grub2-efi-x64-cdboot-1:2.06-72.fc37.x86_64           @updates
    Upgraded      grub2-efi-x64-cdboot-1:2.06-70.fc37.x86_64           @@System
    Upgrade       grub2-pc-1:2.06-72.fc37.x86_64                       @updates
    Upgraded      grub2-pc-1:2.06-70.fc37.x86_64                       @@System
    Upgrade       grub2-pc-modules-1:2.06-72.fc37.noarch               @updates
    Upgraded      grub2-pc-modules-1:2.06-70.fc37.noarch               @@System
    Upgrade       grub2-tools-1:2.06-72.fc37.x86_64                    @updates
    Upgraded      grub2-tools-1:2.06-70.fc37.x86_64                    @@System
    Upgrade       grub2-tools-efi-1:2.06-72.fc37.x86_64                @updates
    Upgraded      grub2-tools-efi-1:2.06-70.fc37.x86_64                @@System
    Upgrade       grub2-tools-extra-1:2.06-72.fc37.x86_64              @updates
    Upgraded      grub2-tools-extra-1:2.06-70.fc37.x86_64              @@System
    Upgrade       grub2-tools-minimal-1:2.06-72.fc37.x86_64            @updates
    Upgraded      grub2-tools-minimal-1:2.06-70.fc37.x86_64            @@System
    Upgrade       intel-gpu-firmware-20221214-145.fc37.noarch          @updates
    Upgraded      intel-gpu-firmware-20221109-144.fc37.noarch          @@System
    Upgrade       iwl100-firmware-39.31.5.1-145.fc37.noarch            @updates
    Upgraded      iwl100-firmware-39.31.5.1-144.fc37.noarch            @@System
    Upgrade       iwl1000-firmware-1:39.31.5.1-145.fc37.noarch         @updates
    Upgraded      iwl1000-firmware-1:39.31.5.1-144.fc37.noarch         @@System
    Upgrade       iwl105-firmware-18.168.6.1-145.fc37.noarch           @updates
    Upgraded      iwl105-firmware-18.168.6.1-144.fc37.noarch           @@System
    Upgrade       iwl135-firmware-18.168.6.1-145.fc37.noarch           @updates
    Upgraded      iwl135-firmware-18.168.6.1-144.fc37.noarch           @@System
    Upgrade       iwl2000-firmware-18.168.6.1-145.fc37.noarch          @updates
    Upgraded      iwl2000-firmware-18.168.6.1-144.fc37.noarch          @@System
    Upgrade       iwl2030-firmware-18.168.6.1-145.fc37.noarch          @updates
    Upgraded      iwl2030-firmware-18.168.6.1-144.fc37.noarch          @@System
    Upgrade       iwl3160-firmware-1:25.30.13.0-145.fc37.noarch        @updates
    Upgraded      iwl3160-firmware-1:25.30.13.0-144.fc37.noarch        @@System
    Upgrade       iwl3945-firmware-15.32.2.9-145.fc37.noarch           @updates
    Upgraded      iwl3945-firmware-15.32.2.9-144.fc37.noarch           @@System
    Upgrade       iwl4965-firmware-228.61.2.24-145.fc37.noarch         @updates
    Upgraded      iwl4965-firmware-228.61.2.24-144.fc37.noarch         @@System
    Upgrade       iwl5000-firmware-8.83.5.1_1-145.fc37.noarch          @updates
    Upgraded      iwl5000-firmware-8.83.5.1_1-144.fc37.noarch          @@System
    Upgrade       iwl5150-firmware-8.24.2.2-145.fc37.noarch            @updates
    Upgraded      iwl5150-firmware-8.24.2.2-144.fc37.noarch            @@System
    Upgrade       iwl6000-firmware-9.221.4.1-145.fc37.noarch           @updates
    Upgraded      iwl6000-firmware-9.221.4.1-144.fc37.noarch           @@System
    Upgrade       iwl6000g2a-firmware-18.168.6.1-145.fc37.noarch       @updates
    Upgraded      iwl6000g2a-firmware-18.168.6.1-144.fc37.noarch       @@System
    Upgrade       iwl6000g2b-firmware-18.168.6.1-145.fc37.noarch       @updates
    Upgraded      iwl6000g2b-firmware-18.168.6.1-144.fc37.noarch       @@System
    Upgrade       iwl6050-firmware-41.28.5.1-145.fc37.noarch           @updates
    Upgraded      iwl6050-firmware-41.28.5.1-144.fc37.noarch           @@System
    Upgrade       iwl7260-firmware-1:25.30.13.0-145.fc37.noarch        @updates
    Upgraded      iwl7260-firmware-1:25.30.13.0-144.fc37.noarch        @@System
    Upgrade       iwlax2xx-firmware-20221214-145.fc37.noarch           @updates
    Upgraded      iwlax2xx-firmware-20221109-144.fc37.noarch           @@System
    Upgrade       libarchive-3.6.1-3.fc37.x86_64                       @updates
    Upgraded      libarchive-3.6.1-2.fc37.x86_64                       @@System
    Upgrade       libbsd-0.11.7-2.fc37.x86_64                          @updates
    Upgraded      libbsd-0.10.0-10.fc37.x86_64                         @@System
    Upgrade       libertas-usb8388-firmware-2:20221214-145.fc37.noarch @updates
    Upgraded      libertas-usb8388-firmware-2:20221109-144.fc37.noarch @@System
    Upgrade       libipa_hbac-2.8.2-1.fc37.x86_64                      @updates
    Upgraded      libipa_hbac-2.8.1-1.fc37.x86_64                      @@System
    Upgrade       libphonenumber-8.12.57-3.fc37.x86_64                 @updates
    Upgraded      libphonenumber-8.12.11-15.fc37.x86_64                @@System
    Upgrade       librepo-1.15.1-1.fc37.x86_64                         @updates
    Upgraded      librepo-1.14.4-1.fc37.x86_64                         @@System
    Upgrade       libshumate-1.0.3-1.fc37.x86_64                       @updates
    Upgraded      libshumate-1.0.2-1.fc37.x86_64                       @@System
    Upgrade       libsmbclient-2:4.17.4-0.fc37.x86_64                  @updates
    Upgraded      libsmbclient-2:4.17.3-0.fc37.x86_64                  @@System
    Upgrade       libsss_certmap-2.8.2-1.fc37.x86_64                   @updates
    Upgraded      libsss_certmap-2.8.1-1.fc37.x86_64                   @@System
    Upgrade       libsss_idmap-2.8.2-1.fc37.x86_64                     @updates
    Upgraded      libsss_idmap-2.8.1-1.fc37.x86_64                     @@System
    Upgrade       libsss_nss_idmap-2.8.2-1.fc37.x86_64                 @updates
    Upgraded      libsss_nss_idmap-2.8.1-1.fc37.x86_64                 @@System
    Upgrade       libsss_sudo-2.8.2-1.fc37.x86_64                      @updates
    Upgraded      libsss_sudo-2.8.1-1.fc37.x86_64                      @@System
    Upgrade       libwbclient-2:4.17.4-0.fc37.x86_64                   @updates
    Upgraded      libwbclient-2:4.17.3-0.fc37.x86_64                   @@System
    Upgrade       libxcrypt-4.4.33-4.fc37.x86_64                       @updates
    Upgraded      libxcrypt-4.4.33-3.fc37.x86_64                       @@System
    Upgrade       libxcrypt-compat-4.4.33-4.fc37.x86_64                @updates
    Upgraded      libxcrypt-compat-4.4.33-3.fc37.x86_64                @@System
    Upgrade       libxcrypt-devel-4.4.33-4.fc37.x86_64                 @updates
    Upgraded      libxcrypt-devel-4.4.33-3.fc37.x86_64                 @@System
    Upgrade       linux-firmware-20221214-145.fc37.noarch              @updates
    Upgraded      linux-firmware-20221109-144.fc37.noarch              @@System
    Upgrade       linux-firmware-whence-20221214-145.fc37.noarch       @updates
    Upgraded      linux-firmware-whence-20221109-144.fc37.noarch       @@System
    Upgrade       lua-5.4.4-7.fc37.x86_64                              @updates
    Upgraded      lua-5.4.4-4.fc37.x86_64                              @@System
    Upgrade       lua-libs-5.4.4-7.fc37.x86_64                         @updates
    Upgraded      lua-libs-5.4.4-4.fc37.x86_64                         @@System
    Upgrade       mesa-dri-drivers-22.3.1-1.fc37.x86_64                @updates
    Upgraded      mesa-dri-drivers-22.2.3-1.fc37.x86_64                @@System
    Upgrade       mesa-filesystem-22.3.1-1.fc37.x86_64                 @updates
    Upgraded      mesa-filesystem-22.2.3-1.fc37.x86_64                 @@System
    Upgrade       mesa-libEGL-22.3.1-1.fc37.x86_64                     @updates
    Upgraded      mesa-libEGL-22.2.3-1.fc37.x86_64                     @@System
    Upgrade       mesa-libEGL-devel-22.3.1-1.fc37.x86_64               @updates
    Upgraded      mesa-libEGL-devel-22.2.3-1.fc37.x86_64               @@System
    Upgrade       mesa-libGL-22.3.1-1.fc37.x86_64                      @updates
    Upgraded      mesa-libGL-22.2.3-1.fc37.x86_64                      @@System
    Upgrade       mesa-libGL-devel-22.3.1-1.fc37.x86_64                @updates
    Upgraded      mesa-libGL-devel-22.2.3-1.fc37.x86_64                @@System
    Upgrade       mesa-libgbm-22.3.1-1.fc37.x86_64                     @updates
    Upgraded      mesa-libgbm-22.2.3-1.fc37.x86_64                     @@System
    Upgrade       mesa-libglapi-22.3.1-1.fc37.x86_64                   @updates
    Upgraded      mesa-libglapi-22.2.3-1.fc37.x86_64                   @@System
    Upgrade       mesa-libxatracker-22.3.1-1.fc37.x86_64               @updates
    Upgraded      mesa-libxatracker-22.2.3-1.fc37.x86_64               @@System
    Upgrade       mesa-vulkan-drivers-22.3.1-1.fc37.x86_64             @updates
    Upgraded      mesa-vulkan-drivers-22.2.3-1.fc37.x86_64             @@System
    Upgrade       netavark-1.4.0-1.fc37.x86_64                         @updates
    Upgraded      netavark-1.3.0-1.fc37.x86_64                         @@System
    Upgrade       ntfs-3g-2:2022.10.3-1.fc37.x86_64                    @updates
    Upgraded      ntfs-3g-2:2022.5.17-2.fc37.x86_64                    @@System
    Upgrade       ntfs-3g-libs-2:2022.10.3-1.fc37.x86_64               @updates
    Upgraded      ntfs-3g-libs-2:2022.5.17-2.fc37.x86_64               @@System
    Upgrade       ntfsprogs-2:2022.10.3-1.fc37.x86_64                  @updates
    Upgraded      ntfsprogs-2:2022.5.17-2.fc37.x86_64                  @@System
    Upgrade       nvidia-gpu-firmware-20221214-145.fc37.noarch         @updates
    Upgraded      nvidia-gpu-firmware-20221109-144.fc37.noarch         @@System
    Upgrade       openal-soft-1.22.2-6.fc37.x86_64                     @updates
    Upgraded      openal-soft-1.22.2-2.fc37.x86_64                     @@System
    Upgrade       pciutils-3.9.0-2.fc37.x86_64                         @updates
    Upgraded      pciutils-3.9.0-1.fc37.x86_64                         @@System
    Upgrade       pciutils-devel-3.9.0-2.fc37.x86_64                   @updates
    Upgraded      pciutils-devel-3.9.0-1.fc37.x86_64                   @@System
    Upgrade       pciutils-libs-3.9.0-2.fc37.x86_64                    @updates
    Upgraded      pciutils-libs-3.9.0-1.fc37.x86_64                    @@System
    Upgrade       python-unversioned-command-3.11.1-1.fc37.noarch      @updates
    Upgraded      python-unversioned-command-3.11.0-1.fc37.noarch      @@System
    Upgrade       python3-3.11.1-1.fc37.x86_64                         @updates
    Upgraded      python3-3.11.0-1.fc37.x86_64                         @@System
    Upgrade       python3-devel-3.11.1-1.fc37.x86_64                   @updates
    Upgraded      python3-devel-3.11.0-1.fc37.x86_64                   @@System
    Upgrade       python3-libs-3.11.1-1.fc37.x86_64                    @updates
    Upgraded      python3-libs-3.11.0-1.fc37.x86_64                    @@System
    Upgrade       python3-tkinter-3.11.1-1.fc37.x86_64                 @updates
    Upgraded      python3-tkinter-3.11.0-1.fc37.x86_64                 @@System
    Upgrade       samba-client-2:4.17.4-0.fc37.x86_64                  @updates
    Upgraded      samba-client-2:4.17.3-0.fc37.x86_64                  @@System
    Upgrade       samba-client-libs-2:4.17.4-0.fc37.x86_64             @updates
    Upgraded      samba-client-libs-2:4.17.3-0.fc37.x86_64             @@System
    Upgrade       samba-common-2:4.17.4-0.fc37.noarch                  @updates
    Upgraded      samba-common-2:4.17.3-0.fc37.noarch                  @@System
    Upgrade       samba-common-libs-2:4.17.4-0.fc37.x86_64             @updates
    Upgraded      samba-common-libs-2:4.17.3-0.fc37.x86_64             @@System
    Upgrade       sssd-2.8.2-1.fc37.x86_64                             @updates
    Upgraded      sssd-2.8.1-1.fc37.x86_64                             @@System
    Upgrade       sssd-ad-2.8.2-1.fc37.x86_64                          @updates
    Upgraded      sssd-ad-2.8.1-1.fc37.x86_64                          @@System
    Upgrade       sssd-client-2.8.2-1.fc37.x86_64                      @updates
    Upgraded      sssd-client-2.8.1-1.fc37.x86_64                      @@System
    Upgrade       sssd-common-2.8.2-1.fc37.x86_64                      @updates
    Upgraded      sssd-common-2.8.1-1.fc37.x86_64                      @@System
    Upgrade       sssd-common-pac-2.8.2-1.fc37.x86_64                  @updates
    Upgraded      sssd-common-pac-2.8.1-1.fc37.x86_64                  @@System
    Upgrade       sssd-ipa-2.8.2-1.fc37.x86_64                         @updates
    Upgraded      sssd-ipa-2.8.1-1.fc37.x86_64                         @@System
    Upgrade       sssd-kcm-2.8.2-1.fc37.x86_64                         @updates
    Upgraded      sssd-kcm-2.8.1-1.fc37.x86_64                         @@System
    Upgrade       sssd-krb5-2.8.2-1.fc37.x86_64                        @updates
    Upgraded      sssd-krb5-2.8.1-1.fc37.x86_64                        @@System
    Upgrade       sssd-krb5-common-2.8.2-1.fc37.x86_64                 @updates
    Upgraded      sssd-krb5-common-2.8.1-1.fc37.x86_64                 @@System
    Upgrade       sssd-ldap-2.8.2-1.fc37.x86_64                        @updates
    Upgraded      sssd-ldap-2.8.1-1.fc37.x86_64                        @@System
    Upgrade       sssd-nfs-idmap-2.8.2-1.fc37.x86_64                   @updates
    Upgraded      sssd-nfs-idmap-2.8.1-1.fc37.x86_64                   @@System
    Upgrade       sssd-proxy-2.8.2-1.fc37.x86_64                       @updates
    Upgraded      sssd-proxy-2.8.1-1.fc37.x86_64                       @@System
    Upgrade       systemd-251.10-588.fc37.x86_64                       @updates
    Upgraded      systemd-251.9-587.fc37.x86_64                        @@System
    Upgrade       systemd-container-251.10-588.fc37.x86_64             @updates
    Upgraded      systemd-container-251.9-587.fc37.x86_64              @@System
    Upgrade       systemd-libs-251.10-588.fc37.x86_64                  @updates
    Upgraded      systemd-libs-251.9-587.fc37.x86_64                   @@System
    Upgrade       systemd-networkd-251.10-588.fc37.x86_64              @updates
    Upgraded      systemd-networkd-251.9-587.fc37.x86_64               @@System
    Upgrade       systemd-oomd-defaults-251.10-588.fc37.noarch         @updates
    Upgraded      systemd-oomd-defaults-251.9-587.fc37.noarch          @@System
    Upgrade       systemd-pam-251.10-588.fc37.x86_64                   @updates
    Upgraded      systemd-pam-251.9-587.fc37.x86_64                    @@System
    Upgrade       systemd-resolved-251.10-588.fc37.x86_64              @updates
    Upgraded      systemd-resolved-251.9-587.fc37.x86_64               @@System
    Upgrade       systemd-udev-251.10-588.fc37.x86_64                  @updates
    Upgraded      systemd-udev-251.9-587.fc37.x86_64                   @@System
    Upgrade       tpm2-tools-5.4-1.fc37.x86_64                         @updates
    Upgraded      tpm2-tools-5.3-1.fc37.x86_64                         @@System
    Upgrade       vim-data-2:9.0.1054-1.fc37.noarch                    @updates
    Upgraded      vim-data-2:9.0.1006-1.fc37.noarch                    @@System
    Upgrade       vim-filesystem-2:9.0.1054-1.fc37.noarch              @updates
    Upgraded      vim-filesystem-2:9.0.1006-1.fc37.noarch              @@System
    Upgrade       vim-minimal-2:9.0.1054-1.fc37.x86_64                 @updates
    Upgraded      vim-minimal-2:9.0.1006-1.fc37.x86_64                 @@System
    Upgrade       wireplumber-0.4.13-1.fc37.x86_64                     @updates
    Upgraded      wireplumber-0.4.12-1.fc37.x86_64                     @@System
    Upgrade       wireplumber-libs-0.4.13-1.fc37.x86_64                @updates
    Upgraded      wireplumber-libs-0.4.12-1.fc37.x86_64                @@System
    Upgrade       xmlrpc-c-1.51.08-1.fc37.x86_64                       @updates
    Upgraded      xmlrpc-c-1.51.0-14.fc36.x86_64                       @@System
    Upgrade       xmlrpc-c-client-1.51.08-1.fc37.x86_64                @updates
    Upgraded      xmlrpc-c-client-1.51.0-14.fc36.x86_64                @@System
    Upgrade       xorg-x11-drv-intel-2.99.917-54.20210115.fc37.x86_64  @updates
    Upgraded      xorg-x11-drv-intel-2.99.917-53.20200205.fc37.x86_64  @@System
    Upgrade       xorg-x11-server-Xorg-1.20.14-12.fc37.x86_64          @updates
    Upgraded      xorg-x11-server-Xorg-1.20.14-11.fc37.x86_64          @@System
    Upgrade       xorg-x11-server-Xwayland-22.1.6-1.fc37.x86_64        @updates
    Upgraded      xorg-x11-server-Xwayland-22.1.5-1.fc37.x86_64        @@System
    Upgrade       xorg-x11-server-common-1.20.14-12.fc37.x86_64        @updates
    Upgraded      xorg-x11-server-common-1.20.14-11.fc37.x86_64        @@System
    Upgrade       mesa-va-drivers-freeworld-22.3.1-1.fc37.x86_64       @rpmfusion-free-updates
    Upgraded      mesa-va-drivers-freeworld-22.2.3-1.fc37.x86_64       @@System
    Upgrade       code-1.74.2-1671533504.el7.x86_64                    @vscode
    Upgraded      code-1.74.1-1671015385.el7.x86_64                    @@System
    Reason Change Box2D-2.4.1-8.fc37.x86_64                            @anaconda
    Removed       kernel-6.0.9-300.fc37.x86_64                         @@System
    Removed       kernel-core-6.0.9-300.fc37.x86_64                    @@System
    Removed       kernel-devel-6.0.9-300.fc37.x86_64                   @@System
    Removed       kernel-modules-6.0.9-300.fc37.x86_64                 @@System
    Removed       kernel-modules-extra-6.0.9-300.fc37.x86_64           @@System
@cottsay
Copy link
Member

cottsay commented Dec 24, 2022

I recall having similar issues a few years ago, and the problem was related to parsing elaborate environment variables. Could you please dump your environment (using env) and either post it here or send it to me? Be sure to sanitize any sensitive information before sharing it.

@notalltim
Copy link
Author

env.txt
env_kitty.txt
Here you go

@cottsay
Copy link
Member

cottsay commented Dec 27, 2022

Shoot, I'm not seeing any problems. I've updated my Fedora 37 machine as well, and I still can't reproduce this behavior.

Can you try posting your command environment script files from build/ament_package/colcon_command_prefix_*?

@notalltim
Copy link
Author

# generated from colcon_core/shell/template/command_prefix.sh.em

does not generate anything but the comment

@notalltim
Copy link
Author

notalltim commented Dec 27, 2022

weirdly ament_pycodestlye did generate a colcon_command_prefix_setup_py.sh.env here it is

CHROME_DESKTOP=code-url-handler.desktop
COLCON=1
COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=gnome
DISPLAY=:0
EDITOR=/usr/bin/nano
GDK_BACKEND=x11
GDMSESSION=gnome
GDM_LANG=en_US.UTF-8
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/code.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=5768
GIT_ASKPASS=/usr/share/code/resources/app/extensions/git/dist/askpass.sh
GJS_DEBUG_OUTPUT=stderr
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
GNOME_SETUP_DISPLAY=:1
HOME=/home/tgallion
INVOCATION_ID=c5c9ac6e0ea74d0bb4ebacda0e005884
JOURNAL_STREAM=8:29595
LANG=en_US.UTF-8
LOGNAME=tgallion
MANAGERPID=2250
NO_AT_BRIDGE=1
ORIGINAL_XDG_CURRENT_DESKTOP=GNOME
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin
POSH_THEME=/home/tgallion/.poshthemes/star.omp.json
PWD=/home/tgallion/ros2_humble/build/ament_pycodestyle
QT_IM_MODULE=ibus
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2343,unix/unix:/tmp/.ICE-unix/2343
SHELL=/usr/bin/fish
SHLVL=2
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
SYSTEMD_EXEC_PID=2394
TERM=xterm-256color
TERM_PROGRAM=vscode
TERM_PROGRAM_VERSION=1.74.2
USER=tgallion
USERNAME=tgallion
VSCODE_GIT_ASKPASS_EXTRA_ARGS=--ms-enable-electron-run-as-node
VSCODE_GIT_ASKPASS_MAIN=/usr/share/code/resources/app/extensions/git/dist/askpass-main.js
VSCODE_GIT_ASKPASS_NODE=/usr/share/code/code
VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-61af660bed.sock
WAYLAND_DISPLAY=wayland-0
XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.WXOHX1
XDG_CURRENT_DESKTOP=GNOME
XDG_DATA_DIRS=/home/tgallion/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/home/tgallion/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/home/tgallion/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/home/tgallion/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=gnome
XDG_SESSION_TYPE=wayland
XMODIFIERS=@im=ibus
_=/usr/bin/env
omp_last_status_generation=3
omp_lastcommand=rm -rf build/ install/ log/

@notalltim
Copy link
Author

don't know why I did not think to try this earlier but the following works for individual packages and builds fine it just fails when building a set of packages

colcon build --symlink-install --packages-up-to ament_lint --cmake-args -DTHIRDPARTY_Asio=ON --no-warn-unused-cli

@notalltim
Copy link
Author

notalltim commented Dec 27, 2022

using the sequential executor seems to fix it so it seems to be related to parallel builds. Also parallel builds with --parallel-workers 1 seem to work

@cottsay
Copy link
Member

cottsay commented Dec 31, 2022

I was finally able to reproduce this. The regression is caused by python3.11-3.11.1-1.fc37. You can dnf downgrade python3.11 for now as a workaround.

@cottsay
Copy link
Member

cottsay commented Jan 1, 2023

I'm now moderately confident that this is python/cpython#100133. It really doesn't look like there is a trivial workaround, so my advice is to avoid Python 3.11.1. The ticket says that we should expect the fix to be part of 3.11.2.

@cottsay cottsay changed the title Colcon fails to find 'sh' environment variables on Fedora 37 Colcon fails to find 'sh' environment variables on Python 3.11.1 Jan 1, 2023
@yashi
Copy link

yashi commented Feb 7, 2023

Just adding a confirmation that Debian version of python3 3.11.1-3 is also affected. Using 3.10.9-1 works fine.

@cottsay
Copy link
Member

cottsay commented Feb 9, 2023

It looks like Python v3.11.2 was released this week.

@yashi
Copy link

yashi commented Feb 9, 2023

And on Debian python3.11 3.11.2-2 fixed the issue. (3.11.2-1 had an issue)

@cottsay
Copy link
Member

cottsay commented Sep 20, 2023

This Python regression was fixed a while back and I've heard nothing of re-occurrence, so I'm going to close this. Feel free to reopen if you encounter this again.

@cottsay cottsay closed this as completed Sep 20, 2023
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

3 participants