Linux Version: 2.6.18-238.19.1.el5 / CentOS release 5.8 (Final) Since changeset 71704:89e92e684b37 , I have the following compilation error: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o ./Modules/posixmodule.c: In function ‘cpu_set_dealloc’: ./Modules/posixmodule.c:4769: attention : implicit declaration of function ‘CPU_FREE’ ./Modules/posixmodule.c: In function ‘make_new_cpu_set’: ./Modules/posixmodule.c:4786: attention : implicit declaration of function ‘CPU_ALLOC_SIZE’ ./Modules/posixmodule.c:4787: attention : implicit declaration of function ‘CPU_ALLOC’ ./Modules/posixmodule.c:4787: attention : assignment makes pointer from integer without a cast ./Modules/posixmodule.c:4793: attention : implicit declaration of function ‘CPU_ZERO_S’ ./Modules/posixmodule.c: In function ‘cpu_set_set’: ./Modules/posixmodule.c:4847: attention : implicit declaration of function ‘CPU_SET_S’ ./Modules/posixmodule.c: In function ‘cpu_set_count’: ./Modules/posixmodule.c:4858: attention : implicit declaration of function ‘CPU_COUNT_S’ ./Modules/posixmodule.c: In function ‘cpu_set_clear’: ./Modules/posixmodule.c:4871: attention : implicit declaration of function ‘CPU_CLR_S’ ./Modules/posixmodule.c: In function ‘cpu_set_isset’: ./Modules/posixmodule.c:4885: attention : implicit declaration of function ‘CPU_ISSET_S’ ./Modules/posixmodule.c: In function ‘cpu_set_richcompare’: ./Modules/posixmodule.c:4910: attention : implicit declaration of function ‘CPU_EQUAL_S’ ./Modules/posixmodule.c: In function ‘do_cpu_set_and’: ./Modules/posixmodule.c:4946: attention : implicit declaration of function ‘CPU_AND_S’ ./Modules/posixmodule.c: In function ‘do_cpu_set_or’: ./Modules/posixmodule.c:4947: attention : implicit declaration of function ‘CPU_OR_S’ ./Modules/posixmodule.c: In function ‘do_cpu_set_xor’: ./Modules/posixmodule.c:4948: attention : implicit declaration of function ‘CPU_XOR_S’ ... gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython3.3m.a -lpthread -ldl -lutil -lm libpython3.3m.a(posixmodule.o): In function `cpu_set_zero': /home/proexp/cpython2/./Modules/posixmodule.c:4897: undefined reference to `CPU_ZERO_S' libpython3.3m.a(posixmodule.o): In function `cpu_set_count': /home/proexp/cpython2/./Modules/posixmodule.c:4858: undefined reference to `CPU_COUNT_S' libpython3.3m.a(posixmodule.o): In function `cpu_set_clear': /home/proexp/cpython2/./Modules/posixmodule.c:4871: undefined reference to `CPU_CLR_S' libpython3.3m.a(posixmodule.o): In function `make_new_cpu_set': /home/proexp/cpython2/./Modules/posixmodule.c:4786: undefined reference to `CPU_ALLOC_SIZE' /home/proexp/cpython2/./Modules/posixmodule.c:4787: undefined reference to `CPU_ALLOC' /home/proexp/cpython2/./Modules/posixmodule.c:4793: undefined reference to `CPU_ZERO_S' libpython3.3m.a(posixmodule.o): In function `do_cpu_set_or': /home/proexp/cpython2/./Modules/posixmodule.c:4947: undefined reference to `CPU_OR_S' libpython3.3m.a(posixmodule.o): In function `do_cpu_set_xor': /home/proexp/cpython2/./Modules/posixmodule.c:4948: undefined reference to `CPU_XOR_S' libpython3.3m.a(posixmodule.o): In function `do_cpu_set_and': /home/proexp/cpython2/./Modules/posixmodule.c:4946: undefined reference to `CPU_AND_S' libpython3.3m.a(posixmodule.o): In function `cpu_set_richcompare': /home/proexp/cpython2/./Modules/posixmodule.c:4910: undefined reference to `CPU_EQUAL_S' libpython3.3m.a(posixmodule.o): In function `cpu_set_dealloc': /home/proexp/cpython2/./Modules/posixmodule.c:4769: undefined reference to `CPU_FREE' libpython3.3m.a(posixmodule.o): In function `do_cpu_set_xor': /home/proexp/cpython2/./Modules/posixmodule.c:4948: undefined reference to `CPU_XOR_S' libpython3.3m.a(posixmodule.o): In function `do_cpu_set_and': /home/proexp/cpython2/./Modules/posixmodule.c:4946: undefined reference to `CPU_AND_S' libpython3.3m.a(posixmodule.o): In function `do_cpu_set_or': /home/proexp/cpython2/./Modules/posixmodule.c:4947: undefined reference to `CPU_OR_S' libpython3.3m.a(posixmodule.o): In function `cpu_set_set': /home/proexp/cpython2/./Modules/posixmodule.c:4847: undefined reference to `CPU_SET_S' libpython3.3m.a(posixmodule.o): In function `cpu_set_isset': /home/proexp/cpython2/./Modules/posixmodule.c:4885: undefined reference to `CPU_ISSET_S'
I still have the exact same error Maybe change should be: #if !defined(CPU_ALLOC) && defined(HAVE_SCHED_SETAFFINITY) #undef HAVE_SCHED_SETAFFINITY #endif it seems CPU_ALLOC first appeared in glibc 2.7
2012/3/16 Hervé Coatanhay <report@bugs.python.org>: > > Hervé Coatanhay <herve.coatanhay@gmail.com> added the comment: > > I still have the exact same error > > Maybe change should be: > > #if !defined(CPU_ALLOC) && defined(HAVE_SCHED_SETAFFINITY) > #undef HAVE_SCHED_SETAFFINITY > #endif Right you are. Try now.
You can consider it fixed, compilation runs OK now. However I have an error on building _posixsubprocess.o when I do `make test`, I'll report it in another ticket.
History
Date
User
Action
Args
2022-04-11 14:57:27
admin
set
github: 58504
2012-03-19 18:41:13
neologix
set
status: open -> closedresolution: fixedstage: needs patch -> resolved