Index | Thread | Search

From:
Jonathan Gray <jsg@jsg.id.au>
Subject:
Re: print/texlive/texmf depending on qt5 (was Re: sparc64 bulk build report)
To:
Theo Buehler <tb@theobuehler.org>
Cc:
Kurt Mosiejczuk <kmos@openbsd.org>, ports@openbsd.org, jca@openbsd.org
Date:
Tue, 1 Jul 2025 16:03:28 +1000

Download raw body.

Thread
On Mon, Jun 30, 2025 at 09:52:46PM +0200, Theo Buehler wrote:
> On Mon, Jun 30, 2025 at 06:58:07PM +0200, Theo Buehler wrote:
> > On Mon, Jun 30, 2025 at 05:10:55PM +0100, Stuart Henderson wrote:
> > > On 2025/06/29 16:20, Kurt Mosiejczuk wrote:
> > > > So at some point texmf has managed to sprout a roundabout dependency on
> > > > qt5 via the following chains originating with print/psutils
> > > > 
> > > > print/texlive/base not installable print/psutils -> graphics/py-wand -> graphics/ImageMagick -> multimedia/libheif -> multimedia/libde265 -> x11/qt5/qtbase
> > > 
> > > That isn't a circular dep, it's a build (packaging) failure in qtbase.
> > > 
> > > checksumming|**********************************************               | 75%
> > > Error: /usr/obj/ports/qtbase-5.15.16pl130/fake-sparc64/usr/local/lib/qt5/cmake/Qt5Gui/Qt5Gui_QEglFSKmsGbmIntegrationPlugin.cmake does not exist
> > > Error: /usr/obj/ports/qtbase-5.15.16pl130/fake-sparc64/usr/local/lib/qt5/plugins/egldeviceintegrations/libqeglfs-kms-integration.so does not exist
> > > pkg_create: can't continue
> > > 
> > 
> > This is missing because GBM isn't detected. Without looking very closely
> > this seems another pthread-related issue in the mesa update:
> > 
> > > g++ -Wl,-O1 -Wl,-rpath,/usr/X11R6/lib -o gbm main.o   -L/usr/X11R6/lib -lgbm -L/usr/local/lib  -L/usr/obj/ports/qtbase-5.15.16pl130/qtbase-2529f7f0c2333d437089c775c9c30f624d1fd5bc/build-sparc64/config.tests/gbm 
> > > /usr/X11R6/lib/libgbm.so.0.6: warning: rand() may return deterministic values, is that what you want?
> > > /usr/X11R6/lib/libdrm.so.7.13: warning: sprintf() is often misused, please use snprintf()
> > > /usr/X11R6/lib/libgbm.so.0.6: undefined reference to `pthread_create'
> > > /usr/X11R6/lib/libgbm.so.0.6: undefined reference to `pthread_detach'
> > > /usr/X11R6/lib/libgbm.so.0.6: undefined reference to `pthread_join'
> > > collect2: error: ld returned 1 exit status
> > > gmake: *** [Makefile:71: gbm] Error 1
> >  => source failed verification.
> > test config.qtbase_gui.libraries.gbm FAILED
> > 
> 
> So the real problem is that on amd64, libgbm has these:
> 
> Dynamic Section:
>   NEEDED      libm.so.10.1
>   NEEDED      libpthread.so.27.1
>   NEEDED      libdrm.so.7.13
>   SONAME      libgbm.so.0.6
> 
> whereas on sparc64 libpthread is missing:
> 
> Dynamic Section:
>   NEEDED      libm.so.10.1
>   NEEDED      libdrm.so.7.13
>   SONAME      libgbm.so.0.6
> 
> I suspect this is due to a difference in behavior between ld.bfd and
> ld.lld, but I currently don't know how to fix it.

moving -lpthread outside of the group gives a NEEDED
entry for libpthread on sparc64

Index: lib/mesa/mk/libgbm/Makefile
===================================================================
RCS file: /cvs/xenocara/lib/mesa/mk/libgbm/Makefile,v
diff -u -p -r1.13 Makefile
--- lib/mesa/mk/libgbm/Makefile	6 Jun 2025 13:03:06 -0000	1.13
+++ lib/mesa/mk/libgbm/Makefile	1 Jul 2025 05:52:32 -0000
@@ -27,14 +27,15 @@ LDADD+=	-Wl,--as-needed -Wl,--start-grou
 	${.CURDIR}/../libmesa_util_c11/${__objdir}/libmesa_util_c11.a \
 	${.CURDIR}/../libxmlconfig/${__objdir}/libxmlconfig.a \
 	-Wl,--gc-sections \
-	-lz -lm -lexpat -lpthread -lxcb -lxcb-randr
+	-lz -lm -lexpat -lxcb -lxcb-randr
 
 .if ${XENOCARA_BUILD_DRI:L} == "yes"
 LDADD+= -L${X11BASE}/lib -ldrm \
 	-L${.CURDIR}/../libgallium_dri/${__objdir} -lgallium_dri
 .endif
 
-LDADD+=	-Wl,--end-group
+LDADD+=	-Wl,--end-group \
+	-lpthread
 
 NOPROFILE=