On Fri, Jun 15, 2012 at 10:54 AM, Thomas Keller
<
thomas....@gmail.com> wrote:
> Hello all! I've been using Cython now for a couple years and it has been a
> great help. I recently, however, ran into a bit of a snag when I tried
> compiling some bindings I had used in the past on a new server. It works
> fine on my home laptop and on our cluster, just not this partilcular server,
> which leads me to believe something is missing or configured incorrectly.
>
> The error I get is "/usr/bin/ld: cannot find -lRNA" . In the setup_pyfold.py
> file, the ext_module line is:
>
> ext_modules=[
> Extension("pyfold",
> ["pyfold.pyx"],library_dirs=['/home/thomas/ViennaRNA-1.7/lib'],libraries=['RNA'],include_dirs=['/home/thomas/ViennaRNA-1.7/H',numpy.get_include()]),
>
> ]
>
> Now, I had thought that the libraries option didn't really matter unless you
> were linking to a system library (obviously I was wrong), but having
> "libraries=['RNA']" in that bit of code has never mattered before.
>
> Any thoughts as to what might be going on?
>
> Cheers,
> Thomas
>
> Here is the full output when I try compiling the cython module.
>
> [2003] lja485@Anu $ python setup_pyfold.py build_ext -i
> running build_ext
> cythoning pyfold.pyx to pyfold.c
> building 'pyfold' extension
> creating build
> creating build/temp.linux-x86_64-2.7
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -I/home/lja485/ViennaRNA-1.8.
> 5/H
> -I/usr/lib/pymodules/python2.7/numpy/core/include
> -I/usr/include/python2.7 -c pyfold.c -o
> build/temp.linux-x86_64-2.7/pyfold.o
> /usr/lib/pymodules/python2.7/numpy/core/include/numpy/__multiarray_api.h:1187:
> warning: ‘_import_array’ defined but not used
> /usr/lib/pymodules/python2.7/numpy/core/include/numpy/__ufunc_api.h:196:
> warning: ‘_import_umath’ defined but not used
> gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
> -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.7/pyfold.o
> -L/home/lja485/ViennaRNA-1.8.5/lib -lRNA -o /home/lja485/dir/pyfold.so
> /usr/bin/ld: cannot find -lRNA
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
It can't find your library. What is the contents of
/home/thomas/ViennaRNA-1.7/lib? Are you sure your library is in there
and named appropriately and the right architecture?
- Robert