acxz / pkgbuilds

PKGBUILDs for Arch Linux
25 stars 43 forks source link

[orocos-kdl-python] build fails if both ros1 and ros2 are present #259

Open lprobsth opened 9 months ago

lprobsth commented 9 months ago

The build fails with an error that ROS_DISTRO was set to a different value before.

Should we invoke clear-ros-env.sh before building? (this solved the error for me)

AUR Explicit (1): orocos-kdl-python-1.5.1-2
:: PKGBUILD up to date, skipping download: orocos-kdl-python
  1 orocos-kdl-python                        (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
  1 orocos-kdl-python                        (Installed) (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> N
==> Making package: orocos-kdl-python 1.5.1-2 (Do 05 Okt 2023 19:59:53 CEST)
==> Retrieving sources...
  -> Found v1.5.1.tar.gz
  -> Found pybind11.tar.gz
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha512sums...
    v1.5.1.tar.gz ... Passed
    pybind11.tar.gz ... Passed
:: (1/1) Parsing SRCINFO: orocos-kdl-python
==> Making package: orocos-kdl-python 1.5.1-2 (Do 05 Okt 2023 19:59:55 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found v1.5.1.tar.gz
  -> Found pybind11.tar.gz
==> Validating source files with sha512sums...
    v1.5.1.tar.gz ... Passed
    pybind11.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting v1.5.1.tar.gz with bsdtar
  -> Extracting pybind11.tar.gz with bsdtar
==> Starting prepare()...
==> Sources are ready.
==> Making package: orocos-kdl-python 1.5.1-2 (Do 05 Okt 2023 19:59:58 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:24 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.11.5", minimum required is "3") 
CMake Warning (dev) at CMakeLists.txt:25 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonLibs: /usr/lib/libpython3.11.so (found suitable version "3.11.5", minimum required is "3.11") 
-- Using CATKIN_DEVEL_PREFIX: /home/lprobsth/.cache/yay/orocos-kdl-python/src/orocos_kinematics_dynamics-1.5.1/python_orocos_kdl/build/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros2/galactic;/opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
CMake Warning (dev) at /opt/ros/noetic/share/catkin/cmake/python.cmake:4 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  /opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)
  /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:32 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using default Python package layout
-- Found PY_em: /usr/lib/python3.11/site-packages/em.py  
-- Using empy: /usr/lib/python3.11/site-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/lprobsth/.cache/yay/orocos-kdl-python/src/orocos_kinematics_dynamics-1.5.1/python_orocos_kdl/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found Python3: /usr/bin/python3.11 (found version "3.11.5") found components: Interpreter 
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests-3.11
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
Traceback (most recent call last):
  File "/home/lprobsth/.cache/yay/orocos-kdl-python/src/orocos_kinematics_dynamics-1.5.1/python_orocos_kdl/build/catkin_generated/generate_cached_setup.py", line 22, in <module>
    code = generate_environment_script('/home/lprobsth/.cache/yay/orocos-kdl-python/src/orocos_kinematics_dynamics-1.5.1/python_orocos_kdl/build/devel/env.sh')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ros/noetic/lib/python3.11/site-packages/catkin/environment_cache.py", line 63, in generate_environment_script
    env_after = ast.literal_eval(output.decode('utf8'))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ast.py", line 64, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<unknown>", line 1
    ROS_DISTRO was set to 'galactic' before. Please make sure that the environment does not mix paths from different distributions.
               ^^^
SyntaxError: invalid syntax
CMake Error at /opt/ros/noetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python3
  "/home/lprobsth/.cache/yay/orocos-kdl-python/src/orocos_kinematics_dynamics-1.5.1/python_orocos_kdl/build/catkin_generated/generate_cached_setup.py")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/noetic/share/catkin/cmake/all.cmake:208 (safe_execute_process)
  /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:32 (find_package)

-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: orocos-kdl-python-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
orocos-kdl-python - exit status 4