pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MesaLib fails to compile on Linux



On 10/29/26 8:59 PM, leeplusplus%protonmail.com@localhost wrote:
Hello everyone,

I'm still getting used to pkgsrc, so I apologize if my question seems silly. I have been testing out pkgsrc recently, and I tried compiling SuperTux as a test. However, it (and a few other games) depends on MesaLib, which won't compile for me.

I keep getting these errors when it tries to compile it:

../include/c11/threads_posix.h:69:25: error: conflicting types for 'once_flag'; have 'pthread_once_t' {aka 'int'}
    69 | typedef pthread_once_t  once_flag;
       |                         ^~~~~~~~~

../include/c11/threads_posix.h:94:1: error: conflicting types for 'call_once'; have 'void(int *, void (*)(void))'
    94 | call_once(once_flag *flag, void (*func)(void))
       | ^~~~~~~~~

Does anyone have any idea why? I am using a pretty standard Gentoo install with OpenRC.

I'm using the attached bad hack for now.

Joerg
diff -r d07381775725 -r 2085143ba33e graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile	Fri Oct 16 15:31:03 2026 +0200
+++ b/graphics/MesaLib/Makefile	Fri Oct 16 22:02:21 2026 +0200
@@ -146,6 +146,7 @@
 
 CPPFLAGS+=	-DHAVE_NOATEXIT
 CPPFLAGS+=	-DSYSCONFDIR=${PKG_SYSCONFDIR}
+CPPFLAGS+=	-D_ISOC11_SOURCE -include ${.CURDIR}/glibc-isoc23.h
 
 TOOL_DEPENDS+=	${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
 
diff -r d07381775725 -r 2085143ba33e graphics/MesaLib/glibc-isoc23.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib/glibc-isoc23.h	Fri Oct 16 22:02:21 2026 +0200
@@ -0,0 +1,3 @@
+#include <features.h>
+#undef __GLIBC_USE_ISOC23
+#define __GLIBC_USE_ISOC23	0


Home | Main Index | Thread Index | Old Index