On Mon, Feb 14, 2022 at 12:44:39AM +0100, Theo Buehler wrote: > The committed version doesn't build for me on sparc64 due to undefined > references. The patch below (cribbed from cwen's patch to > gnome/x11/seahorse) partly fixes it. I see plenty of linker warnings > below which I'm not sure how to deal with. > > /usr/bin/ld: warning: libgmodule-2.0.so.4200.14, needed by > /usr/local/lib/libgio-2.0.so.4200.14, not found (try using -rpath or > -rpath-link) > /usr/bin/ld: warning: libffi.so.1.2, needed by > /usr/local/lib/libgobject-2.0.so.4200.14, not found (try using -rpath or > -rpath-link) > /usr/bin/ld: warning: libpcre.so.3.0, needed by > /usr/local/lib/libglib-2.0.so.4201.7, not found (try using -rpath or > -rpath-link) > /usr/bin/ld: warning: libiconv.so.7.0, needed by > /usr/local/lib/libglib-2.0.so.4201.7, not found (try using -rpath or > -rpath-link) > /usr/bin/ld: warning: libgupnp-1.2.so.1.0, needed by > /usr/local/lib/libgupnp-igd-1.0.so.1.0, not found (try using -rpath or > -rpath-link) > /usr/bin/ld: warning: libgssdp-1.2.so.2.3, needed by > /usr/local/lib/libgupnp-igd-1.0.so.1.0, not found (try using -rpath or > -rpath-link)
My first try at this was the following: > .if ${MACHINE_ARCH:Msparc64} > # XXX linking errors, with both base-gcc and ports-gcc, but only in tests: > # agent.c:(.text+0x1e24): undefined reference to `gupnp_simple_igd_get_type' > # stunhmac.c:(.text+0x114): undefined reference to `EVP_MD_CTX_new' > # rand.c:(.text+0xc): undefined reference to `RAND_bytes' > CONFIGURE_ARGS += -Dtests=disabled > NO_TEST = Yes > .endif but your approach is much cleaner, thanks! OK kn > Tests look like this, both SIGABRT are assertion failures. Yup, I'll look into this. > 8/40 test-bsd FAIL 0.30s killed by signal > 6 SIGABRT > 10/40 test-address FAIL 0.33s killed by signal > 6 SIGABRT > 23/40 test-fullmode-with-stun TIMEOUT 30.14s killed by signal > 15 SIGTERM > > Ok: 37 > Expected Fail: 0 > Fail: 2 > Unexpected Pass: 0 > Skipped: 0 > Timeout: 1 > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/net/libnice/Makefile,v > retrieving revision 1.40 > diff -u -p -r1.40 Makefile > --- Makefile 13 Feb 2022 18:13:31 -0000 1.40 > +++ Makefile 13 Feb 2022 22:38:37 -0000 > @@ -34,4 +34,11 @@ CONFIGURE_ARGS += -Dignored-network-inte > CONFIGURE_ARGS += -Dexamples=disabled \ > -Dgtk_doc=disabled > > +.include <bsd.port.arch.mk> > +# disable meson's default of using "-Wl,--as-needed" on ld.bfd arches; > +# build failures due to undefined references are often seen. > +.if !${PROPERTIES:Mlld} > +CONFIGURE_ARGS += -Db_asneeded=false > +.endif > + > .include <bsd.port.mk> >