Zed Hub application could not excute locally


I modified the code in zed hub tutorials 2, like replace all ‘iot’ with ‘hub’. Now it can be complied successfully using command:
cmake -DCMAKE_CXX_FLAGS=“-Wl,–allow-shlib-undefined”.
However, it occurs error while running with:
./ZED_Hub_Tutorial_2: symbol lookup error: /usr/local/sl_hub/lib/libsl_hub.so: undefined symbol: _ZN2sl14InitParametersC1ENS_10RESOLUTIONEibNS_10DEPTH_MODEENS_4UNITENS_17COORDINATE_SYSTEMEbiffbibNS_6StringEiP8CUctx_stNS_9InputTypeES5_bbS5_fb.

If I don’t add any additional parameters to the cmake, it occurs error durcing the making:
/usr/bin/ld: /usr/local/sl_hub/lib/libsl_hub.so: undefined reference to `sl::InitParameters::InitParameters(sl::RESOLUTION, int, bool, sl::DEPTH_MODE, sl::UNIT, sl::COORDINATE_SYSTEM, bool, int, float, float, bool, int, bool, sl::String, int, CUctx_st*, sl::InputType, sl::String, bool, bool, sl::String, float, bool)’
collect2: error: ld returned 1 exit status.

I am using JetPack5.1.1 (also JetPack 5.0, met the same problem), ZED SDK 4.0.5 and the edge_cli version is 0.73.

My guess is that sl_hub and sl do not match becacse I can see in the SDK’ api, the last three parameters of InitParameters functions are float, bool, float. Can you help me resolve it?



You are right in your analysis. Since the 4.0 is in early access and the API breaks between patches, we get these kind of issues. sl_hub 0.73 is compatible with ZED SDK 4.0.3, which is not ideal. We’ll deploy the newest version ASAP

In the meantime, there is a workaround. If you install the ZED SDK after the Edge Agent, it will propose to install Hub module. Say yes, this version is up to date. It’s the same code, but it was linked with the version it comes with.