[Numpy-discussion] Python 3 porting

Xavier Gnata xavier.gnata@gmail....
Mon Feb 15 13:42:12 CST 2010


New try new error:
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
build/temp.linux-x86_64-3.1/numpy/core/src/multiarray/multiarraymodule_onefile.o
-Lbuild/temp.linux-x86_64-3.1 -lnpymath -lm -o
build/lib.linux-x86_64-3.1/numpy/core/multiarray.so
/usr/bin/ld:
build/temp.linux-x86_64-3.1/numpy/core/src/multiarray/multiarraymodule_onefile.o:
relocation R_X86_64_PC32 against undefined symbol
`_numpymemoryview_init' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
/usr/bin/ld:
build/temp.linux-x86_64-3.1/numpy/core/src/multiarray/multiarraymodule_onefile.o:
relocation R_X86_64_PC32 against undefined symbol
`_numpymemoryview_init' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
error: Command "gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
build/temp.linux-x86_64-3.1/numpy/core/src/multiarray/multiarraymodule_onefile.o
-Lbuild/temp.linux-x86_64-3.1 -lnpymath -lm -o
build/lib.linux-x86_64-3.1/numpy/core/multiarray.so" failed with exit
status 1

No clue why :(

Xavier


>> Ok!
>> git clone git://github.com/pv/numpy-work.git
>> git checkout origin/py3k
>> NPY_SEPARATE_BUILD=1 python3.1 setup.py build
>>
>> but now it fails during the build:
>>
>> In file included from numpy/core/src/multiarray/buffer.c:14,
>> from numpy/core/src/multiarray/multiarraymodule_onefile.c:36:
>> numpy/core/src/multiarray/buffer.h: At top level:
>> numpy/core/src/multiarray/buffer.h:14: error: conflicting types for
>> ‘_descriptor_from_pep3118_format’
>> numpy/core/src/multiarray/common.c:220: note: previous implicit
>> declaration of ‘_descriptor_from_pep3118_format’ was here
>> In file included from
>> numpy/core/src/multiarray/multiarraymodule_onefile.c:36:
>> numpy/core/src/multiarray/buffer.c: In function ‘_buffer_format_string’:
>> numpy/core/src/multiarray/buffer.c:151: warning: unused variable ‘repr’
>>     
> Hmm, I probably tested only the separate compilation properly as it
> seems the single-file build is failing. The environment variable is
> actually NPY_SEPARATE_COMPILATION=1, not *_BUILD.
>
>   



More information about the NumPy-Discussion mailing list