source compilation error: undefined references
Josh Warner
silvertrumpet999 at gmail.com
Wed Jun 12 23:04:55 EDT 2013
Did you use ATLAS/LAPACK installed from your distro's repo, or a personally
compiled version? I'm wondering if something in your system environment
might not quite be right, especially suspicious about LD_LIBRARY_PATH.
On Wednesday, June 12, 2013 7:33:22 AM UTC-5, Evan wrote:
>
> Hi, I get the below compilation error when compiling from source on a
> Linux system.
>
> Linux marula 2.6.39.4-5.1-server #1 SMP Wed Jan 4 15:15:54 UTC 2012 x86_64
> x86_64 x86_64 GNU/Linux
>
> @marula scikit-image-0.8.2]$ python setup.py build
> non-existing path in 'skimage/_shared': 'tests'
> running build
> running config_cc
> ...
> ...
> build/temp.linux-x86_64-2.7/skimage/_shared/interpolation.o: In function
> `__pyx_f_7skimage_7_shared_13interpolation_bilinear_interpolation':
> /opt/python2.7/scikit/scikit-image-0.8.2/skimage/_shared/interpolation.c:559:
> undefined reference to `floor'
> /opt/python2.7/scikit/scikit-image-0.8.2/skimage/_shared/interpolation.c:568:
> undefined reference to `floor'
> /opt/python2.7/scikit/scikit-image-0.8.2/skimage/_shared/interpolation.c:577:
> undefined reference to `ceil'
> /opt/python2.7/scikit/scikit-image-0.8.2/skimage/_shared/interpolation.c:586:
> undefined reference to `ceil'
> collect2: ld returned 1 exit status
> error: Command "gcc -pthread -shared -Wl,--as-needed -Wl,--no-undefined
> -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags
> build/temp.linux-x86_64-2.7/skimage/_shared/interpolation.o -L/usr/lib64
> -lpython2.7 -o build/lib.linux-x86_64-2.7/skimage/_shared/interpolation.so"
> failed with exit status 1
>
> On the command line, I seem to avoid the errors by adding the math
> library, -lm, at the end:
> @marula scikit-image-0.8.2]$ gcc -pthread -shared -Wl,--as-needed
> -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id
> -Wl,--enable-new-dtags
> build/temp.linux-x86_64-2.7/skimage/_shared/interpolation.o -L/usr/lib64
> -lpython2.7 -o build/lib.linux-x86_64-2.7/skimage/_shared/interpolation.so
> -lm
> @marula scikit-image-0.8.2]$
>
> However, i don't know how to introduce this flag into the overall
> compilation process.
>
> I'd be grateful for any help, thanks in advance.
>
> Evan
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130612/ad76b81d/attachment.html>
More information about the scikit-image
mailing list