[torqueusers] Problem usage pbs_version (ImportError: libtorque.so.0)

Garrick Staples garrick at clusterresources.com
Fri Feb 9 12:16:25 MST 2007


On Fri, Feb 09, 2007 at 03:50:30PM +0100, Bas van der Vlies alleged:
> Filippo Spiga wrote:
> >root at scilx:/opt/pbs_python-2.9.0# ./configure
> >checking for python... /usr/bin/python
> >checking for python version... 2.3
> >checking for python platform... linux2
> >checking for python script directory... ${prefix}/lib/python2.3/site
> >-packages
> >checking for python extension module directory... 
> >${exec_prefix}/lib/python2.3/site-packages
> >configure: creating ./config.status
> >config.status: creating Makefile
> >config.status: creating setup.py
> >root at scilx :/opt/pbs_python-2.9.0# make
> >#(cd src; make)
> >python setup.py build
> >running build
> >running build_py
> >creating build
> >creating build/lib.linux-i686-2.3
> >copying src/pbs.py -> build/lib.linux-i686-2.3
> >copying src/PBSQuery.py -> build/lib.linux-i686-2.3
> >running build_ext
> >building '_pbs' extension
> >creating build/temp.linux-i686-2.3
> >creating build/temp.linux-i686-2.3/src
> >gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
> >-Wstrict-prototypes -fPIC -I/usr/include/python2.3 -c src/pbs_wrap.c -o 
> >build/temp.linux- i686-2.3/src/pbs_wrap.o
> >src/pbs_wrap.c:703: warning: function declaration isn't a prototype
> >src/pbs_wrap.c:885: warning: function declaration isn't a prototype
> >src/pbs_wrap.c:1288: warning: function declaration isn't a prototype
> >src/pbs_wrap.c:1310: warning: function declaration isn't a prototype
> >In file included from src/pbs_wrap.c:1346:
> >src/pbs_ifl.h:357: warning: function declaration isn't a prototype
> >In file included from src/pbs_wrap.c:1347:
> >src/pbs_error.h:204: warning: function declaration isn't a prototype
> >src/pbs_wrap.c: In function `Get_List_Size':
> >src/pbs_wrap.c:1372: warning: control reaches end of non-void function
> >src/pbs_wrap.c: At top level:
> >src/pbs_wrap.c:1451: warning: function declaration isn't a prototype
> >src/pbs_wrap.c:1459: warning: function declaration isn't a prototype
> >src/pbs_wrap.c:1698: warning: function declaration isn't a prototype
> >src/pbs_wrap.c:5185: warning: function declaration isn't a prototype
> >src/pbs_wrap.c:214: warning: `SWIG_TypeDynamicCast' defined but not used
> >src/pbs_wrap.c:402: warning: `SWIG_UnpackDataName' defined but not used
> >src/pbs_wrap.c:482: warning: `SWIG_PropagateClientData' defined but not 
> >used
> >src/pbs_wrap.c:1181: warning: `SWIG_Python_MustGetPtr' defined but not used
> >src/pbs_wrap.c:1195: warning: `SWIG_Python_ConvertPacked' defined but 
> >not used
> >src/pbs_wrap.c:1480: warning: `SWIG_CheckLongInRange' defined but not used
> >src/pbs_wrap.c:1570: warning: `SWIG_Check_int' defined but not used
> >src/pbs_wrap.c:1732: warning: `SWIG_CheckUnsignedLongInRange' defined 
> >but not used
> >src/pbs_wrap.c:1816: warning: `SWIG_Check_unsigned_SS_int' defined but 
> >not used
> >gcc -pthread -shared build/temp.linux-i686-2.3/src/pbs_wrap.o 
> >-L/usr/local/lib -ltorque -o build/lib.linux-i686-2.3/_pbs.so
> >root at scilx :/opt/pbs_python-2.9.0# make install
> >#(cd src; make)
> >python setup.py build
> >running build
> >running build_py
> >running build_ext
> >#mkdir -p //usr/local/lib/python2.3/site-packages //usr/local/bin
> >#install build/lib*/* //usr/local/lib/python2.3/site-packages
> >#(cd examples; for i in *py; do install $i  
> >//usr/share/doc/pbs-python/examples/${i//.py/}; done)
> >#python ./setup.py install --prefix 
> >//usr/local/lib/python2.3/site-packages ;
> >python ./setup.py install --prefix //usr/local ;
> >running install
> >running build
> >running build_py
> >running build_ext
> >running install_lib
> >copying build/lib.linux-i686-2.3/_pbs.so -> 
> >//usr/local/lib/python2.3/site-packages/pbs
> >creating //usr/local/lib/python2.3/site-packages/pbs.pth
> >install -D LICENSE.SARA //usr/share/doc/pbs-python/LICENSE.SARA
> >(cd examples; for i in *py; do install -D $i  
> >//usr/share/doc/pbs-python/examples/${i}; done)
> >root at scilx:/opt/pbs_python-2.9.0# 
> >/usr/share/doc/pbs-python/examples/pbs_version.py
> >Traceback (most recent call last):
> >  File "/usr/share/doc/pbs-python/examples/pbs_version.py", line 11, in ?
> >    import pbs
> >  File "/usr/local/lib/python2.3/site-packages/pbs/pbs.py", line 5, in ?
> >    import _pbs
> >ImportError: libtorque.so.0: cannot open shared object file: No such 
> >file or directory
> >
> >BUT the file exists!
> >
> >root at scilx:/opt/pbs_python-2.9.0# locate libtorque.so.0
> >/opt/torque-2.1.6 /tpackages/clients/usr/local/lib/libtorque.so.0
> >/opt/torque-2.1.6/tpackages/clients/usr/local/lib/libtorque.so.0.0.0
> >/opt/torque-2.1.6/tpackages/devel/usr/local/lib/libtorque.so.0
> >/opt/torque-2.1.6/tpackages/devel/usr/local/lib/libtorque.so.0.0.0
> >/opt/torque-2.1.6/tpackages/mom/usr/local/lib/libtorque.so.0
> >/opt/torque-2.1.6/tpackages/mom/usr/local/lib/libtorque.so.0.0.0
> >/opt/torque-2.1.6/tpackages/server/usr/local/lib/libtorque.so.0
> >/opt/torque-2.1.6 /tpackages/server/usr/local/lib/libtorque.so.0.0.0
> >/usr/local/lib/libtorque.so.0
> >/usr/local/lib/libtorque.so.0.0.0
> >root at scilx:/usr/local/lib/python2.3/site-packages/pbs# ls -al 
> >/usr/local/lib/libtorque.*
> >-rw-r--r--  1 root staff 2402642 2006-12-12 21:14 
> >/usr/local/lib/libtorque.a
> >-rwxr-xr-x  1 root staff     720 2006-12-12 21:14 
> >/usr/local/lib/libtorque.la
> >lrwxrwxrwx  1 root staff      18 2006-12-12 21:14 
> >/usr/local/lib/libtorque.so -> libtorque.so.0.0.0
> >lrwxrwxrwx  1 root staff      18 2006-12-12 21:14 
> >/usr/local/lib/libtorque.so.0 -> libtorque.so.0.0.0
> >-rwxr-xr-x  1 root staff 1122905 2006-12-12 21:14 
> >/usr/local/lib/libtorque.so.0.0.0
> >
> >Finally I try to import directly from 
> >/usr/local/lib/python2.3/site-packages/pbs but the error prestist
> >
> >root at scilx:/usr/local/lib/python2.3/site-packages/pbs# python2.3
> >Python 2.3.5 (#2, Oct 16 2006, 19:19:48)
> >[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
> >Type "help", "copyright", "credits" or "license" for more information.
> > >>> import pbs
> >Traceback (most recent call last):
> >  File "<stdin>", line 1, in ?
> >  File "/usr/local/lib/python2.3/site-packages/pbs/pbs.py", line 5, in ?
> >    import _pbs
> >ImportError: libtorque.so.0: cannot open shared object file: No such 
> >file or directory
> >
> >What's wrong?
> >
> 
> There is a website to report problems:
>  * https://subtrac.sara.nl/oss/pbs_python
>  * email i just fix an error in the email address:
>      pbs_python at sara dot  nl
> 
> You have to set LD_LIBRARY_PATH:
>  export LD_LIBRARY_PATH=/usr/local/lib

LD_LIBRARY_PATH is bad bad baaad.

Use LD_RUN_PATH and recompile pbs_python.

Bas, this wouldn't be an issue if you used 'pbs-config --libs'



More information about the torqueusers mailing list