Hi,

On 29/05/2020 13:24, Riccardo Mottola wrote:
Hi!

I am trying to build libobjc2 on NetBSD

Linking fails (standard system linker)

[  0%] Linking C shared library libobjc.so
/usr/bin/ld: /usr/lib/libsupc++.a(eh_globals.o): relocation

We shouldn't be linking libsupc++.a into libobjc.so. It sounds as if NetBSD ships a separate C++ runtime library for static linking, but not for dynamic linking. You can work around this by explicitly setting libstdc++ as your C++ runtime library in the libobjc2 cmake config.

The correct fix it so tweak the C++ runtime library check in CMake so that it looks only for dynamic libraries.

David

Reply via email to