Compile-time error with numba 0.11.0: "np_datetime.o: requires dynamic R_X86_64_PC32 reloc...'
alimuldal opened this issue · comments
Hi guys,
I'm having trouble compiling numba 0.11.0 from source. While executing python setup.py build_ext --inplace
I hit this linker error:
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -Wall -Wstrict-prototypes -fPIC -I/home/alistair/build/numba/numba/include -Inumba/pyextensibletype/include -I/home/alistair/.venvs/numba/local/lib/python2.7/site-packages/numpy/core/include -I/home/alistair/.venvs/numba/local/lib/python2.7/site-packages/llvmmath/mathcode/private -I/usr/include/python2.7 -c numba/external/utilities/datetime/np_datetime_strings.c -o build/temp.linux-x86_64-2.7/numba/external/utilities/datetime/np_datetime_strings.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/numba/external/utilities/utilities.o build/temp.linux-x86_64-2.7/numba/external/utilities/datetime/np_datetime.o build/temp.linux-x86_64-2.7/numba/external/utilities/datetime/np_datetime_strings.o -o /home/alistair/build/numba/numba/external/utilities/utilities.so
/usr/bin/ld: error: build/temp.linux-x86_64-2.7/numba/external/utilities/datetime/np_datetime.o: requires dynamic R_X86_64_PC32 reloc against 'PyDatetimeArrType_Type' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: hidden symbol 'PyDatetimeArrType_Type' is not defined locally
/usr/bin/ld: error: hidden symbol 'PyDatetimeArrType_Type' is not defined locally
/usr/bin/ld: error: hidden symbol 'PyArray_Type' is not defined locally
/usr/bin/ld: error: hidden symbol 'PyArray_Type' is not defined locally
/usr/bin/ld: error: hidden symbol 'PyTimedeltaArrType_Type' is not defined locally
/usr/bin/ld: error: hidden symbol 'PyTimedeltaArrType_Type' is not defined locally
/usr/bin/ld: error: hidden symbol 'PyArray_Type' is not defined locally
/usr/bin/ld: error: hidden symbol 'PyArray_Type' is not defined locally
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I'm running Ubuntu 13.04 (3.8.0-31-generic) and using Python 2.4.7 and GCC 4.8.1. I compiled LLVM 3.3 from source in a temporary directory, using REQUIRES_RTTI=1
.
I am trying to install numba in a clean virtualenv with no system site packages, containing:
- Cython==0.19.2
- argparse==1.2.1
- cffi==0.7.2
- distribute==0.6.34
- ipython==1.1.0
- llvmmath==0.1.1
- llvmpy==0.12.0-55-g18d3b48
- nose==1.3.0
- numpy==1.9.0.dev-84c52d8
- pycparser==2.10
- wsgiref==0.1.2
Both llvmpy and llvmmath seem to be installed properly and working fine - they pass all of their respective nose tests. There's a single failure with numpy somewhere in test_io
, nothing that looks critically important.
What's more, using the same virtualenv I am able to build and install numba 0.10.2 successfully, and it passes almost all of its nose tests (I get two failures, one in test_datetime
and one in test_nosource
.
Any ideas where the problem might lie?
Haha, spent ages working on a bug report, then I manage to post it on the wrong repo. This was meant for the numba guys, please totally ignore it. I should probably sleep now...