[Pkg-exppsy-pynifti] pynifti compilation error

Michael Hanke michael.hanke at gmail.com
Tue Dec 22 02:12:38 UTC 2009


Hi,

On Tue, Dec 22, 2009 at 07:01:28AM +0800, Shengwei Zhang wrote:
> To whom it may concern,
> 
> I'm trying to compile pynifti-0.20080710.1 from source, but have trouble compiling it.

Any reason why you do not use the latest version? I'd advice you to use
the lastest available one to not unnecesarily suffer from known bugs.

> First, the version of my computer is linux fc10. Is there any binary package for this specific version of pynifti? If so, how can i access it?

Yes, there is:

http://niftilib.sourceforge.net/pynifti/#binary-packages

Klick on 'Fedora' and choose your version.

> Second, I have installed some prerequisites like SWIG1.3.39, Numpy 1.3.0 and Nifticlib1.1.0. Everything seems to be smooth. Then I try 'python setup.py build' under the root directory of the downloaded source. But here's what it returns:
> 
> running build
> running build_py
> copying nifti/nifticlib.py -> build/lib.linux-x86_64-2.5/nifti
> running build_ext
> building 'nifti._nifticlib' extension
> swigging nifti/nifticlib.i to nifti/nifticlib_wrap.c
> swig -python -I/usr/lib64/python2.5/site-packages/numpy/core/include -I3rd/nifticlibs -o nifti/nifticlib_wrap.c nifti/nifticlib.i
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/lib64/python2.5/site-packages/numpy/core/include -I3rd/nifticlibs -I/usr/include/python2.5 -c nifti/nifticlib_wrap.c -o build/temp.linux-x86_64-2.5/nifti/nifticlib_wrap.o
> gcc -pthread -shared build/temp.linux-x86_64-2.5/nifti/nifticlib_wrap.o -L3rd/nifticlibs -L/usr/lib64 -lniftiio -lznz -lz -lpython2.5 -o build/lib.linux-x86_64-2.5/nifti/_nifticlib.so
> /usr/bin/ld: cannot find -lniftiio
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
> Any clue about what is going wrong? Your help is highly appreciated!

It cannot find the niftiio library -- are you sure you installed the
corresponding devel package?


Michael


-- 
GPG key:  1024D/3144BE0F Michael Hanke
http://mih.voxindeserto.de



More information about the Pkg-exppsy-pynifti mailing list