Skip to content

Macos -latomic from rcutils #217

@gftabor

Description

@gftabor

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Trying to build ros2_control package (specifically here https://github.com/gftabor/pixi_test ) on macOS fails with make -latomic call.

(mqp) gftabor@x86_64-apple-darwin13 pixi_test % colcon build --symlink-install  --cmake-args -DBUILD_TESTING=OFF
dyld[49989]: symbol '_iconv_close' missing from root that overrides /usr/lib/libiconv.2.dylib. Use of that symbol in /usr/lib/libcups.2.dylib is being set to 0xBAD4007.
dyld[49989]: symbol '_iconv_open' missing from root that overrides /usr/lib/libiconv.2.dylib. Use of that symbol in /usr/lib/libcups.2.dylib is being set to 0xBAD4007.
dyld[49989]: symbol '_iconv' missing from root that overrides /usr/lib/libiconv.2.dylib. Use of that symbol in /usr/lib/libcups.2.dylib is being set to 0xBAD4007.
Starting >>> joint_limits
[0.390s] colcon.colcon_ros.prefix_path.ament WARNING The path '/Users/gftabor/Documents/pixi_test/install/rcutils' in the environment variable AMENT_PREFIX_PATH doesn't exist
[0.390s] colcon.colcon_ros.prefix_path.catkin WARNING The path '/Users/gftabor/Documents/pixi_test/install/rcutils' in the environment variable CMAKE_PREFIX_PATH doesn't exist
Starting >>> ros2_control_test_assets
Starting >>> controller_manager_msgs
[0.774s] colcon.colcon_cmake.task.cmake.build WARNING Unable to determine CMake version, building the installtarget instead of invoking 'cmake --install'
Finished <<< ros2_control_test_assets [0.96s]
--- stderr: controller_manager_msgs
ld: library not found for -latomic
x86_64-apple-darwin13.4: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/controller_manager_msgs__rosidl_generator_c.dir/build.make:1340: libcontroller_manager_msgs__rosidl_generator_c.dylib] Error 1
make[1]: *** [CMakeFiles/Makefile2:293: CMakeFiles/controller_manager_msgs__rosidl_generator_c.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
---
Failed   <<< controller_manager_msgs [1.03s, exited with code 2]
Aborted  <<< joint_limits [3.72s]

Summary: 1 package finished [3.85s]
  1 package failed: controller_manager_msgs
  1 package aborted: joint_limits
  2 packages had stderr output: controller_manager_msgs joint_limits
  11 packages not processed
(mqp) gftabor@x86_64-apple-darwin13 pixi_test % 

This seems to be caused by installed version of rcutils

pixi_test/.pixi/envs/default/share/rcutils/cmake/ament_cmake_export_link_flags-extras.cmake

# generated from ament_cmake_export_link_flags/cmake/ament_cmake_export_link_flags-extras.cmake.in

set(_exported_link_flags "-latomic")

# append link_flags to rcutils_LINK_FLAGS
if(NOT "${_exported_link_flags} " STREQUAL " ")
  foreach(_link_flag ${_exported_link_flags})
    list(APPEND rcutils_LINK_FLAGS "${_link_flag}")
  endforeach()
endif()

I am not sure if there is a trick the CI server is doing to ignore this error? Seems like any building from source that links with rcutils would fail.

Installed packages

ros-jazzy-rcutils                                 6.7.5               np2py312hb847498_16     115.70 KiB  conda  https://prefix.dev/robostack-jazzy
ros2-distro-mutex                                 0.14.0              jazzy_16                  2.26 KiB  conda  https://prefix.dev/robostack-jazzy

Environment info

Pixi version: 0.63.1
        TLS backend: rustls
           Platform: osx-arm64
   Virtual packages: __unix=0=0
                   : __osx=15.5=0
                   : __archspec=1=m1
          Cache dir: /Users/gftabor/Library/Caches/rattler/cache
       Auth storage: /Users/gftabor/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /Users/gftabor/.pixi/bin
    Environment dir: /Users/gftabor/.pixi/envs
       Manifest dir: /Users/gftabor/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: mqp
            Version: 0.1.0
      Manifest file: /Users/gftabor/Documents/pixi_test/pixi.toml
       Last updated: 14-05-2026 13:06:46

Environments
------------
        Environment: default
           Features: default
           Channels: https://prefix.dev/conda-forge, https://prefix.dev/robostack-jazzy
   Dependency count: 37
       Dependencies: compilers, cmake, pkg-config, make, ninja, pip, ros-jazzy-desktop, python, setuptools, colcon-common-extensions, rosdep, numpy, ros-jazzy-ament-cmake-google-benchmark, ros-jazzy-performance-test-fixture, ros-jazzy-mimick-vendor, ros-jazzy-ament-cmake-vendor-package, ros-jazzy-ament-cmake-clang-format, ros-jazzy-test-msgs, ros-jazzy-navigation2, ros-jazzy-ros-gz-sim, ros-jazzy-ackermann-msgs, filelock, tinyxml2, ros-jazzy-realtime-tools, ros-jazzy-control-msgs, ros-jazzy-pal-statistics, ros-jazzy-rsl, ros-jazzy-generate-parameter-library, ros-jazzy-xacro, ros2-distro-mutex, ros-jazzy-ros2-control, ros-jazzy-joint-limits, ros-jazzy-ros2-control-cmake, ros-jazzy-control-toolbox, ros-jazzy-ros-gz-bridge, ros-jazzy-gz-ros2-control-demos, ros-jazzy-hardware-interface-testing
   Target platforms: linux-64, osx-64, win-64
    Prefix location: /Users/gftabor/Documents/pixi_test/.pixi/envs/default

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions