Closed evshary closed 1 year ago
Thanks for @JEnoch 's solution. It seems like I can't source ROS environment first. ROS environment includes CycloneDDS and iceoryx. If I built zenoh-bridge-dds with this, it'll try to build with iceoryx and will fail. However, I still fail to build zenoh-bridge-dds with the following error:
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/rustcsKR4eT/symbols.o" "/home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/ros/zenoh-plugin-dds/target/release/deps" "-L" "/home/ros/zenoh-plugin-dds/target/release/build/ring-b7127fa6e8b7f748/out" "-L" "/home/ros/zenoh-plugin-dds/target/release/build/blake3-60e3804d50dd7f29/out" "-L" "/home/ros/zenoh-plugin-dds/target/release/build/blake3-60e3804d50dd7f29/out" "-L" "/home/ros/zenoh-plugin-dds/target/release/build/cyclors-662b0f66ac098368/out/cyclonedds-build/lib" "-L" "/home/ros/zenoh-plugin-dds/target/release/build/cyclors-662b0f66ac098368/out/cyclocut-build/lib" "-L" "/home/ros/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcsKR4eT/libblake3-50e98199e1b8d584.rlib" "/tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib" "/tmp/rustcsKR4eT/libring-944069f5d5422c53.rlib" "/home/ros/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-272ca28f0b8538d5.rlib" "-Wl,-Bdynamic" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/ros/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
= note: /usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::dds_mgt::on_data':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds7dds_mgt7on_data17h090b60bcae13ba7aE+0x27): undefined reference to `dds_get_participant'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds7dds_mgt7on_data17h090b60bcae13ba7aE+0x43): undefined reference to `dds_get_instance_handle'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds7dds_mgt7on_data17h090b60bcae13ba7aE+0xf3): undefined reference to `dds_take'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds7dds_mgt7on_data17h090b60bcae13ba7aE+0x7d8): undefined reference to `dds_qget_reliability'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds7dds_mgt7on_data17h090b60bcae13ba7aE+0x984): undefined reference to `dds_qget_reliability'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds7dds_mgt7on_data17h090b60bcae13ba7aE+0xf4f): undefined reference to `dds_return_loan'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::qos::Qos::from_qos_native_with_reliability':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x38): undefined reference to `dds_qget_durability'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x128): undefined reference to `dds_qget_durability_service'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x203): undefined reference to `dds_qget_deadline'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x234): undefined reference to `dds_qget_latency_budget'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x267): undefined reference to `dds_qget_ownership'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x2d7): undefined reference to `dds_qget_liveliness'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x333): undefined reference to `dds_qget_destination_order'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x386): undefined reference to `dds_qget_history'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos32from_qos_native_with_reliability17h292227655b83d169E+0x40a): undefined reference to `dds_qget_partition'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::qos::Qos::to_qos_native':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x16): undefined reference to `dds_qos_create'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x2d): undefined reference to `dds_qset_reliability'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x3c): undefined reference to `dds_qset_durability'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x66): undefined reference to `dds_qset_durability_service'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x74): undefined reference to `dds_qset_deadline'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x82): undefined reference to `dds_qset_latency_budget'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x91): undefined reference to `dds_qset_ownership'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0xa5): undefined reference to `dds_qset_liveliness'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0xb4): undefined reference to `dds_qset_destination_order'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0xc8): undefined reference to `dds_qset_history'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x2a3): undefined reference to `dds_qset_partition'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds3qos3Qos13to_qos_native17h150d60e8dc07507fE+0x326): undefined reference to `dds_qset_ignorelocal'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `async_task::raw::RawTask<F,T,S>::run':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN10async_task3raw24RawTask$LT$F$C$T$C$S$GT$3run17hfa5511a7a16bfa70E+0x184): undefined reference to `dds_get_instance_handle'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN10async_task3raw24RawTask$LT$F$C$T$C$S$GT$3run17hfa5511a7a16bfa70E+0x24a6): undefined reference to `dds_get_instance_handle'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::ros_discovery::RosDiscoveryInfoMgr::write':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds13ros_discovery19RosDiscoveryInfoMgr5write17he1d9d531161f3257E+0xfaa): undefined reference to `dds_writecdr'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `async_task::raw::RawTask<F,T,S>::run':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN10async_task3raw24RawTask$LT$F$C$T$C$S$GT$3run17h7ece5f17c511e30eE+0xfdc): undefined reference to `dds_create_participant'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN10async_task3raw24RawTask$LT$F$C$T$C$S$GT$3run17h7ece5f17c511e30eE+0x101f): undefined reference to `dds_get_guid'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `core::ptr::drop_in_place<async_std::task::builder::SupportTaskLocals<core::future::from_generator::GenFuture<zplugin_dds::run::{{closure}}>>>':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN4core3ptr164drop_in_place$LT$async_std..task..builder..SupportTaskLocals$LT$core..future..from_generator..GenFuture$LT$zplugin_dds..run..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$$GT$17ha5126fbd98d56ee3E+0xdcf): undefined reference to `dds_delete'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN4core3ptr164drop_in_place$LT$async_std..task..builder..SupportTaskLocals$LT$core..future..from_generator..GenFuture$LT$zplugin_dds..run..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$$GT$17ha5126fbd98d56ee3E+0xfac): undefined reference to `dds_delete'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::DdsPluginRuntime::run::{{closure}}':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime3run28_$u7b$$u7b$closure$u7d$$u7d$17h4ab97d0a67fbf470E+0x2c44): undefined reference to `dds_create_listener'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime3run28_$u7b$$u7b$closure$u7d$$u7d$17h4ab97d0a67fbf470E+0x2c55): undefined reference to `dds_lset_data_available'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime3run28_$u7b$$u7b$closure$u7d$$u7d$17h4ab97d0a67fbf470E+0x2c65): undefined reference to `dds_create_reader'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime3run28_$u7b$$u7b$closure$u7d$$u7d$17h4ab97d0a67fbf470E+0x2c7e): undefined reference to `dds_create_listener'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `<core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h50f2113b0c43b380E+0xb71): undefined reference to `dds_create_writer'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h50f2113b0c43b380E+0xb7c): undefined reference to `dds_delete_qos'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h50f2113b0c43b380E+0xbba): undefined reference to `dds_strretcode'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h50f2113b0c43b380E+0xf22): undefined reference to `dds_get_guid'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `<core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x17d2): undefined reference to `dds_create_reader'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x1897): undefined reference to `dds_create_listener'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x18aa): undefined reference to `dds_lset_data_available'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x18cb): undefined reference to `dds_create_reader'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x18d6): undefined reference to `dds_delete_qos'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x18eb): undefined reference to `dds_reader_wait_for_historical_data'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x1b18): undefined reference to `dds_strretcode'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x23d8): undefined reference to `dds_get_guid'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h1d61367380beddafE+0x252e): undefined reference to `dds_strretcode'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `core::ptr::drop_in_place<zplugin_dds::ToDdsRoute>':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN4core3ptr44drop_in_place$LT$zplugin_dds..ToDdsRoute$GT$17h4992a23449199cbdE+0x1b): undefined reference to `dds_delete'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `core::ptr::drop_in_place<zplugin_dds::FromDdsRoute>':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN4core3ptr46drop_in_place$LT$zplugin_dds..FromDdsRoute$GT$17h8d431f88cf52e96bE+0x1b): undefined reference to `dds_delete'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::DdsPluginRuntime::run_fwd_discovery_mode::{{closure}}':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x1f10): undefined reference to `dds_qos_create'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x1f46): undefined reference to `dds_qget_reliability'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x1fea): undefined reference to `dds_create_reader'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x1ff6): undefined reference to `dds_delete_qos'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x2006): undefined reference to `dds_qos_create'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x203c): undefined reference to `dds_qget_reliability'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x206f): undefined reference to `dds_strretcode'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x21d5): undefined reference to `dds_create_writer'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x21e0): undefined reference to `dds_delete_qos'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x231d): undefined reference to `dds_strretcode'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x3434): undefined reference to `dds_get_guid'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x79ee): undefined reference to `dds_get_guid'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime22run_fwd_discovery_mode28_$u7b$$u7b$closure$u7d$$u7d$17he42e82f521725dd1E+0x88ee): undefined reference to `dds_get_guid'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::DdsPluginRuntime::remap_entities_info':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime19remap_entities_info17h2f9d3616a2123260E+0x44a): undefined reference to `dds_get_guid'
/usr/bin/ld: zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime19remap_entities_info17h2f9d3616a2123260E+0xdea): undefined reference to `dds_get_guid'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::DdsPluginRuntime::try_add_route_to_dds::{{closure}}::{{closure}}':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds16DdsPluginRuntime20try_add_route_to_dds28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h5bebed5c7510faa0E+0x4ab): undefined reference to `dds_writecdr'
/usr/bin/ld: /home/ros/zenoh-plugin-dds/target/release/deps/zenoh_bridge_dds-81ed62f3e2c6e910.zenoh_bridge_dds.ff90c0dd-cgu.0.rcgu.o: in function `zplugin_dds::serialize_entity_guid':
zenoh_bridge_dds.ff90c0dd-cgu.0:(.text._ZN11zplugin_dds21serialize_entity_guid17h6f4349ba8baf4c9dE+0x27): undefined reference to `dds_get_guid'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_serdata_to_typeless':
cdds_blob.c:(.text.cdds_serdata_to_typeless+0x28): undefined reference to `ddsi_serdata_init'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_serdata_from_ser_iov':
cdds_blob.c:(.text.cdds_serdata_from_ser_iov+0x38): undefined reference to `ddsi_serdata_init'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_serdata_from_ser':
cdds_blob.c:(.text.cdds_serdata_from_ser+0x2f): undefined reference to `ddsi_serdata_init'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_sertype_free':
cdds_blob.c:(.text.cdds_sertype_free+0x9): undefined reference to `ddsi_sertype_fini'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_ddsi_payload_create':
cdds_blob.c:(.text.cdds_ddsi_payload_create+0x2d): undefined reference to `ddsi_serdata_init'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_create_blob_sertype':
cdds_blob.c:(.text.cdds_create_blob_sertype+0x33): undefined reference to `ddsi_sertype_init'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_create_blob_topic':
cdds_blob.c:(.text.cdds_create_blob_topic+0x4f): undefined reference to `ddsi_sertype_init'
/usr/bin/ld: cdds_blob.c:(.text.cdds_create_blob_topic+0x64): undefined reference to `dds_create_topic_sertype'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_take_blob':
cdds_blob.c:(.text.cdds_take_blob+0x13): undefined reference to `dds_takecdr'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o): in function `cdds_sertype_unref':
cdds_blob.c:(.text.cdds_sertype_unref+0x5): undefined reference to `ddsi_sertype_unref'
/usr/bin/ld: /tmp/rustcsKR4eT/libcyclors-a3fe6eb29282c4bd.rlib(cdds_blob.c.o):(.data.rel.ro.cdds_sertype_ops+0x0): undefined reference to `ddsi_sertype_v0'
collect2: error: ld returned 1 exit status
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
error: could not compile `zenoh-bridge-dds` due to previous error
Analysing the differences of build flags between CycloneDDS 0.7.0 and 0.10.2 I found the cause are the new -flto -fno-fat-lto-objects
flags introduced in CycloneDDS 0.10.2 build.
Those can be deactivated configuring CycloneDDS CMake with ENABLE_LTO=no
. And doing this, the build succeeds.
This requires flag has to be set in cyclors build and a new version of it shall be released.
Thank you @JEnoch I can now build the latest zenoh-bridge-dds successfully! I'll close the issue.
Fixed by 11212d6b5e20947d643ab5547b0c1ef0c09c5323
Describe the bug
While building the latest version of zenoh-plugin-dds, it causes the following error:
I guess the error is from the commit Use new cyclors. If I use the previous commit, the error disappears.
To reproduce
System info