Hi all, I've just subscribed this mailing list, I've seen several
messages on pycuda and errors in linking libraries on OS X.
I've seen that many libraries in /usr/local/cuda/lib are installed in
wrong way. Instead of changing your DYLD_LIBRARY_PATH it is better to
fix linking with the "install_name_tool" command. As example consider
libcufft.dylib:
$ cd /usr/local/cuda/lib
$ otool -L libcufft.dylib
libcufft.dylib:
@rpath/libcufft.dylib (compatibility version 1.1.0, current version
2.0.0)
@rpath/libtlshook.dylib (compatibility version 1.1.0, current version
2.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
@rpath/libcudart.dylib (compatibility version 1.1.0, current version
2.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
the first step is changing the ID for this library (the first entry in
the list):
$ sudo install_name_tool -id /usr/local/cuda/lib/libcufft.dylib
libcufft.dylib
after that:
$ otool -L libcufft.dylib
libcufft.dylib:
/usr/local/cuda/lib/libcufft.dylib (compatibility version 1.1.0,
current version 2.0.0)
@rpath/libtlshook.dylib (compatibility version 1.1.0, current version
2.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
@rpath/libcudart.dylib (compatibility version 1.1.0, current version
2.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
the id is now correct. The next step is changing the linking for all
wrong entries (i.e. the ones with @rpath/libname...):
$ sudo install_name_tool -change @rpath/libtlshook.dylib /usr/local/
cuda/lib/libtlshook.dylib libcufft.dylib
$ sudo install_name_tool -change @rpath/libcudart.dylib /usr/local/
cuda/lib/libcudart.dylib libcufft.dylib
$ otool -L libcufft.dylib
libcufft.dylib:
/usr/local/cuda/lib/libcufft.dylib (compatibility version 1.1.0,
current version 2.0.0)
/usr/local/cuda/lib/libtlshook.dylib (compatibility version 1.1.0,
current version 2.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
/usr/local/cuda/lib/libcudart.dylib (compatibility version 1.1.0,
current version 2.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
Now this library has been fixed. You have to repeat this for all
libraries that are wrongly linked.
HTH
d
---
Davide Cittaro
[EMAIL PROTECTED]
http://daweonline.googlepages.com
_______________________________________________
PyCuda mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net