On Fri, 8 Nov 2019 16:30:58 +0100
Antoine Jacoutot wrote:

> On Fri, Nov 08, 2019 at 04:09:50PM +0100, Charlene Wendling wrote:
> > Hi,
> > 
> > > http://build-failures.rhaalovely.net//sparc64/last/x11/xkbcommon.log
> > > https://bin.charlenew.xyz/xkbcommon.fail.log
> > (no bulk report yet on macppc)
> > 
> > ld.bfd is unable to find libraries again. The issue here is that
> > a few hundreds ports are depending on it.
> > 
> > Because meson is used, i tried at first to disable
> > "-Wl,--as-needed", as it saved the day on some other ports, without
> > any success.
> > 
> > I'm proposing to manually add proper LDFLAGS for libs that cannot
> > be found. Because it hides something, i did it in a way the issue
> > is still known for further work on it. I don't like it, but given
> > the importance of this port, i think this change should go in, this
> > way or another.
> > 
> > With the following diff, i was able to fix the build [0], build qt5
> > and use qtfm without issues.
> > 
> > Comments/feedback are welcome,
> > 
> > Charlène.
> > 
> > 
> > [0] https://bin.charlenew.xyz/xkbcommon.log
>
> 
> Would this work? (it's simpler imho):
> CONFIGURE_ENV=        LDFLAGS="-L${X11BASE}/lib"

It sure works [1]!

Charlène.


[1] https://bin.charlenew.xyz/xkbcommon.simpler.log


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/xkbcommon/Makefile,v
retrieving revision 1.17
diff -u -p -u -p -r1.17 Makefile
--- Makefile    23 Oct 2019 08:18:36 -0000      1.17
+++ Makefile    8 Nov 2019 15:50:40 -0000
@@ -3,6 +3,7 @@
 COMMENT=               library to handle keyboard descriptions
 
 DISTNAME=              libxkbcommon-0.9.1
+REVISION=              0
 SHARED_LIBS += xkbcommon            1.5      # unknown
 SHARED_LIBS += xkbcommon-x11        1.2      # unknown
 CATEGORIES=            x11 inputmethods
@@ -30,6 +31,12 @@ CONFIGURE_ARGS +=    -Denable-docs=false \
 TEST_DEPENDS =         devel/bison \
                        shells/bash
 TEST_IS_INTERACTIVE=   x11
+
+# Fix undefined references errors
+.include <bsd.port.arch.mk>
+.if !${PROPERTIES:Mlld}
+CONFIGURE_ENV +=       LDFLAGS="-L${X11BASE}/lib"
+.endif
 
 # XXX: This test still fails
 pre-test:


Reply via email to