nasa / HDTN

High-rate Delay Tolerant Network (HDTN) Software
https://www1.grc.nasa.gov/space/scan/acs/tech-studies/dtn/
Other
95 stars 24 forks source link

Problem when building with shared libraries #53

Closed BrianSipos closed 8 months ago

BrianSipos commented 1 year ago

When building HDTN with BUILD_SHARED_LIBS enabled there is a set of linker errors near the end of the build sequence. It looks like some internal libraries might not have their linker dependencies set properly, or there is some problem with public transitive link dependencies. All of the errors appear to come from the same two libraries and all seem to be related to *Telemetry_t classes not being exported properly.

The specific errors are:

/usr/bin/ld: deps/HDTN/common/outduct_manager/liboutduct_manager_lib.so: undefined reference to `vtable for StcpOutductTelemetry_t'
/usr/bin/ld: deps/HDTN/common/outduct_manager/liboutduct_manager_lib.so: undefined reference to `vtable for LtpOutductTelemetry_t'
/usr/bin/ld: deps/HDTN/common/induct_manager/libinduct_manager_lib.so: undefined reference to `vtable for StcpInductConnectionTelemetry_t'
/usr/bin/ld: deps/HDTN/common/induct_manager/libinduct_manager_lib.so: undefined reference to `vtable for TcpclV3InductConnectionTelemetry_t'
/usr/bin/ld: deps/HDTN/common/outduct_manager/liboutduct_manager_lib.so: undefined reference to `vtable for TcpclV4OutductTelemetry_t'
/usr/bin/ld: deps/HDTN/common/induct_manager/libinduct_manager_lib.so: undefined reference to `vtable for UdpInductConnectionTelemetry_t'
/usr/bin/ld: deps/HDTN/common/outduct_manager/liboutduct_manager_lib.so: undefined reference to `vtable for TcpclV3OutductTelemetry_t'
/usr/bin/ld: deps/HDTN/common/outduct_manager/liboutduct_manager_lib.so: undefined reference to `vtable for OutductTelemetry_t'
/usr/bin/ld: deps/HDTN/common/outduct_manager/liboutduct_manager_lib.so: undefined reference to `vtable for UdpOutductTelemetry_t'
/usr/bin/ld: deps/HDTN/common/induct_manager/libinduct_manager_lib.so: undefined reference to `vtable for InductConnectionTelemetry_t'
/usr/bin/ld: deps/HDTN/common/induct_manager/libinduct_manager_lib.so: undefined reference to `vtable for TcpclV4InductConnectionTelemetry_t'
/usr/bin/ld: deps/HDTN/common/induct_manager/libinduct_manager_lib.so: undefined reference to `vtable for LtpInductConnectionTelemetry_t'
eschweinsberg commented 1 year ago

@BrianSipos Thanks for capturing this issue. I'm also able to reproduce it. We'll look into a fix and will keep you updated.

briantomko commented 8 months ago

This issue has been resolved with commit d50cb0d3dbce44fce79554fe67c53faa83ab9599 in the development branch.