Repository navigation
pip install fails on AIX #160
Copy link
Copy link
Open
Description
Pip install is failing on AIX due to undefined symbol.
Log:
building '_cffi_backend' extension
creating build/temp.aix-7105-9988-64-cpython-39
creating build/temp.aix-7105-9988-64-cpython-39/src
creating build/temp.aix-7105-9988-64-cpython-39/src/c
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -O2 -Wall -I/opt/freeware/include -I/usr/include -DAIX_GENUINE_CPLUSCPLUS -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -I/opt/freeware/include -I/usr/include -DAIX_GENUINE_CPLUSCPLUS -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -maix64 -I/usr/local/include -I/opt/freeware/include -DFFI_BUILDING=1 -DUSE__THREAD -I/opt/freeware/include -I/opt/freeware/include/python3.9 -c src/c/_cffi_backend.c -o build/temp.aix-7105-9988-64-cpython-39/src/c/_cffi_backend.o
src/c/_cffi_backend.c: In function 'cdata_call':
src/c/_cffi_backend.c:3240:30: warning: comparison of integer expressions of different signedness: 'Py_ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
3240 | if (fresult->ct_size < sizeof(ffi_arg))
| ^
In file included from src/c/cffi1_module.c:20,
from src/c/_cffi_backend.c:8027:
src/c/call_python.c: In function 'cffi_call_python':
src/c/call_python.c:203:28: warning: implicit declaration of function '__lwsync' [-Wimplicit-function-declaration]
203 | # define read_barrier() __lwsync()
| ^~~~~~~~
src/c/call_python.c:252:5: note: in expansion of macro 'read_barrier'
252 | read_barrier();
| ^~~~~~~~~~~~
/opt/freeware/lib64/python3.9/config-3.9/ld_so_aix gcc -maix64 -fPIC -pthread -O2 -bI:/opt/freeware/lib64/python3.9/config-3.9/python.exp -L/opt/freeware/lib/pthread -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib -Wl,-blibpath:/opt/freeware/lib/pthread:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib -L/opt/freeware/lib/pthread -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib -Wl,-blibpath:/opt/freeware/lib/pthread:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib -L/opt/freeware/lib64 -L/opt/freeware/lib -lgcc -maix64 -I/usr/local/include -I/opt/freeware/include build/temp.aix-7105-9988-64-cpython-39/src/c/_cffi_backend.o -L/opt/freeware/lib64 -L/opt/freeware/lib64 -lffi -o build/lib.aix-7105-9988-64-cpython-39/_cffi_backend.cpython-39.so
ld: 0711-317 ERROR: Undefined symbol: .__lwsync
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
pip install fails on AIX
pip install fails on AIX
arigo commentedon Apr 4, 2025
This function comes from a block a few lines above that was copied from somewhere long ago:
Apparently you're using a C compiler (is that really gcc?) that for some reason doesn't have either __sync_synchronize() nor __lwsync(). Or maybe it does have __sync_synchronize() but the HAVE_SYNC_SYNCHRONIZE is not defined for some reason?
shubhamhii commentedon Apr 8, 2025
Hi,
Thanks for the suggestion. By including HAVE_SYNC_SYNCHRONIZE in CFLAGS we are able to build with pip.
However, we are able to build without setting explicitly HAVE_SYNC_SYNCHRONIZE in setup.py build.
Regards,
Shubham