ricochet-refresh's build is failing with a DSO missing from command line error, on Arch Linux (binutils 2.42), when liking the final binary.
/usr/bin/ld: ../libtego/libtego.a(ControlChannel.pb.cc.o): undefined reference to symbol '_ZN4absl12lts_2023080212log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/libabsl_log_internal_check_op.so.2308.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [ricochet-refresh/CMakeFiles/ricochet-refresh.dir/build.make:440: ricochet-refresh/ricochet-refresh/ricochet-refresh] Error 1
make[1]: *** [CMakeFiles/Makefile2:363: ricochet-refresh/CMakeFiles/ricochet-refresh.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
libabsl_log_internal_check_op.so is needed to build libtego.a because protobuf depends on it. Setting the linker flags to -Wl,--copy-dt-needed-entries as I did on the AUR PKGBUILD works around the issue. However it goes against the now default behaviour of binutils of not recursively fetching dependencies for libs when linking.
Adding an explicit link to Abseil as I am doing in this PR fixes the error in the manner binutils now deems proper. On the other hand, it makes libtego build files depend on the internals of protobuf. As such I am unsure if this is the proper way to go. Reviews and comments are gladly welcomed.
ricochet-refresh's build is failing with a
DSO missing from command line
error, on Arch Linux (binutils 2.42), when liking the final binary.libabsl_log_internal_check_op.so is needed to build libtego.a because protobuf depends on it. Setting the linker flags to
-Wl,--copy-dt-needed-entries
as I did on the AUR PKGBUILD works around the issue. However it goes against the now default behaviour of binutils of not recursively fetching dependencies for libs when linking.Adding an explicit link to Abseil as I am doing in this PR fixes the error in the manner binutils now deems proper. On the other hand, it makes libtego build files depend on the internals of protobuf. As such I am unsure if this is the proper way to go. Reviews and comments are gladly welcomed.