Skip to content

πŸ§‘β€πŸŒΎ Gz-transport main shows duplicate symbol error for zenoh compilation in MacOS Β #737

@Crola1702

Description

@Crola1702

Environment

  • OS Version: Mac Sonoma arm64 and amd64
  • Source and binary build, Main

Description

  • Expected behavior: Job should build successfully
  • Actual behavior: Job is failing to build due to a duplicate symbol error

Steps to reproduce

  1. Run a build in https://build.osrfoundation.org/job/gz_transport-ci-main-homebrew-amd64
  2. See the build fail

Output

Reference builds:

Log output:

[ 12%] Linking CXX shared library ../lib/libgz-transport.dylib
duplicate symbol 'zenoh::PrecomputedLayout::PrecomputedLayout(zenoh::ShmProvider const&, unsigned long, z_alloc_alignment_t, signed char*)' in:
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/Discovery.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/RepHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/ReqHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/SubscriptionHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/Node.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/NodeShared.cc.o
duplicate symbol 'zenoh::PrecomputedLayout::PrecomputedLayout(zenoh::ShmProvider const&, unsigned long, signed char*)' in:
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/Discovery.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/RepHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/ReqHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/SubscriptionHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/Node.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/NodeShared.cc.o
duplicate symbol 'zenoh::PrecomputedLayout::PrecomputedLayout(zenoh::ShmProvider const&, unsigned long, signed char*)' in:
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/Discovery.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/RepHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/ReqHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/SubscriptionHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/Node.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/NodeShared.cc.o
duplicate symbol 'zenoh::PrecomputedLayout::PrecomputedLayout(zenoh::ShmProvider const&, unsigned long, z_alloc_alignment_t, signed char*)' in:
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/Discovery.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/RepHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/ReqHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/SubscriptionHandler.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/Node.cc.o
    /Users/jenkins/jenkins-agent/workspace/gz_transport-ci-main-homebrew-amd64/build/src/CMakeFiles/gz-transport.dir/NodeShared.cc.o
ld: 4 duplicate symbols
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libgz-transport.15.0.0~pre1.dylib] Error 1
make[1]: *** [src/CMakeFiles/gz-transport.dir/all] Error 2

The last commit on gz-transport main was on Oct 13, 2025 (0b4899b), but this passed on the build 197. This suggest it was an upstream change that broke the build.

Also, when comparing changes between 197 and 198, we see that build 198 has several library bumps:

Libraries in 197
gz-cmake3
gz-cmake4
gz-common6
gz-fuel-tools10
gz-gui9
gz-ionic
gz-launch8
gz-math8
gz-msgs11
gz-physics8
gz-plugin3
gz-rendering9
gz-sensors9
gz-sim9
gz-tools2
gz-transport14
gz-utils3
Libraries in 198
gz-cmake3
gz-cmake5
gz-common7
gz-fuel-tools11
gz-gui10
gz-math9
gz-msgs12
gz-physics9
gz-plugin4
gz-rendering10
gz-sensors10
gz-sim10
gz-tools2
gz-transport15
gz-utils4

There is a bump in the libzenohc library:

- 🍺  /usr/local/Cellar/libzenohc/1.5.1: 18 files, 36.4MB, built in 1 second
+ 🍺  /usr/local/Cellar/libzenohc/1.6.2: 18 files, 36.7MB, built in 1 second

As well as a warning to install libzenoh bottle:

Warning: 'eclipse-zenoh/zenoh/libzenohc' formula is unreadable: No available formula with the name "libzenohc". Did you mean libzen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions