Menu

#276 Fails to build with GCC 14 as the default C/C++ compiler

OpenGLContext v2.0
open
nobody
None
5
2024-05-30
2024-05-30
No

PyOpenGL fails to build when using GCC 14 as the default C/C++ compiler:

[   61s] gcc -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -IVendor/ -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -IVendor/ -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DGLX_GLXEXT_LEGACY -fPIC -I/home/abuild/rpmbuild/BUILD/PyOpenGL-accelerate-3.1.7/src -I/home/abuild/rpmbuild/BUILD/PyOpenGL-accelerate-3.1.7 -I/usr/lib64/python3.10/site-packages/numpy/core/include -I/usr/include/python3.10 -c src/numpy_formathandler.c -o build/temp.linux-x86_64-cpython-310/src/numpy_formathandler.o
[   61s] In file included from /usr/lib64/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
[   61s]                  from /usr/lib64/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
[   61s]                  from /usr/lib64/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5,
[   61s]                  from src/numpy_formathandler.c:1251:
[   61s] /usr/lib64/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
[   61s]    17 | #warning "Using deprecated NumPy API, disable it with " \
[   61s]       |  ^~~~~~~
[   61s] src/numpy_formathandler.c: In function __pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler_c_asArray:
[   61s] src/numpy_formathandler.c:6434:43: error: passing argument 1 of (int (*)(PyArrayObject *, PyObject *))*(PyArray_API + 832) from incompatible pointer type [-Wincompatible-pointer-types]
[   61s]  6434 |     __pyx_v_res = PyArray_FillWithScalar(((PyObject *)__pyx_v_working), __pyx_v_instance);
[   61s]       |                                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   61s]       |                                           |
[   61s]       |                                           PyObject * {aka struct _object *}
[   61s] src/numpy_formathandler.c:6434:43: note: expected PyArrayObject * {aka struct tagPyArrayObject_fields *} but argument is of type PyObject * {aka struct _object *}
[   61s] src/numpy_formathandler.c: In function __pyx_pymod_exec_numpy_formathandler:
[   61s] src/numpy_formathandler.c:9826:3: error: returning void * from a function with return type int makes integer from pointer without a cast [-Wint-conversion]
[   61s]  9826 |   import_array();
[   61s]       |   ^~~~~~~~~~~~
[   61s] error: command '/usr/bin/gcc' failed with exit code 1

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.