pkgsrc-Bugs archive

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

pkg/58475: devel/py-cython build fails due to lang/python312 includes using C99 features



>Number:         58475
>Category:       pkg
>Synopsis:       devel/py-cython build fails due to lang/python312 includes using C99 features
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 27 13:30:00 +0000 2024
>Originator:     Phil Krylov
>Release:        pkgsrc-current
>Organization:
krylov.eu
>Environment:
Linux localhost.localdomain 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
>Description:
When building py312-cython on CentOS 7, the build fails with the message:

/home/pbulk/build/devel/py-cython/work/.buildlink/include/python3.12/internal/pycore_frame.h:134:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int i = null_locals_from; i < code->co_nlocalsplus; i++) {
     ^
/home/pbulk/build/devel/py-cython/work/.buildlink/include/python3.12/internal/pycore_frame.h:134:5: note: use option -std=c99 or -std=gnu99 to compile your code

Adding FORCE_C_STD+=	c99 to python312's buildlink3.mk seems sufficient.
>How-To-Repeat:
bmake -C devel/py-cython PYTHON_VERSION_DEFAULT=312
>Fix:
Index: lang/python312/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python312/buildlink3.mk,v
retrieving revision 1.3
diff -p -u -r1.3 buildlink3.mk
--- lang/python312/buildlink3.mk	3 May 2024 19:03:21 -0000	1.3
+++ lang/python312/buildlink3.mk	27 Jul 2024 13:15:19 -0000
@@ -16,6 +16,10 @@ BUILDLINK_INCDIRS.python312+=	include/py
 BUILDLINK_LIBDIRS.python312+=	lib/python3.12/config
 BUILDLINK_TRANSFORM+=		l:python:python3.12
 
+# .buildlink/include/python3.12/internal/pycore_frame.h:134:5:
+# error: 'for' loop initial declarations are only allowed in C99 mode
+FORCE_C_STD+=	c99
+
 .if !${BUILDLINK_DEPMETHOD.python312:U:Mbuild}
 .include "../../mk/dlopen.buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"


Home | Main Index | Thread Index | Old Index