eclipse-zenoh/zenoh-cpp

Issues compiling examples with zenoh-0.10.0-rc

maxikrie opened this issue · 1 comments

Describe the bug

There is a pedantic warning issue when compiling the examples:

In file included from zenoh-cpp/include/zenohpico.hxx:30,
from zenoh-cpp/examples/simple/zenohpico/zp_simple.cxx:19:
enoh-cpp/include/zenohcxx/impl.hxx:329:2: error: extra ‘;’ [-Werror=pedantic]
329 | };
| ^
zenoh-cpp/include/zenohcxx/impl.hxx:577:2: error: extra ‘;’ [-Werror=pedantic]
577 | };
| ^

Also, on my system there is an undefined reference issue on my system:

/usr/bin/ld: CMakeFiles/z_ping_zenohc.dir/universal/z_ping.cxx.o: undefined reference to symbol 'pthread_cond_clockwait@@GLIBC_2.30'
/usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line

The latter can be resolved by including target_link_libraries(${target} PRIVATE Threads::Threads) in the CMakeLists.txt (not sure how this should be done properly, so I am not creating a pull request).

To reproduce

Follow the instructions for compiling the examples.

System info

  • Debian 11
  • zenoh-0.10.0-rc