Modify

Opened 10 years ago

Closed 9 years ago

#40 closed task (wontfix)

pbs_python compilation error message

Reported by: vipin@… Owned by: bas
Priority: major Milestone:
Component: pbs Version: 4.4.0
Keywords: Cc:

Description

Hi pbs_python team,

I am trying to compile pbs_python module locally (not the system-wide
distribution), downloaded a recent stable version pbs_python-4.4.0.

In my side I am using, RHEL Linux local 2.6.32-279.14.1.el6.x86_64,
python 2.6 and torque version 4.2.5.
The configure step gives me a warning message, I think that looks ok.

*pbs_python/pbs_python-4.4.0$ ./configure --prefix=/share/software/*
checking for pbs-config... /opt/torque/bin//pbs-config
Found torque version: 4.2.5
checking for python... /usr/bin/python
checking for python version... 2.6
checking for python platform... linux2
checking for python script directory...
${prefix}/lib/python2.6/site-packages
checking for python extension module directory...
${exec_prefix}/lib64/python2.6/site-packages
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir
setting
config.status: creating setup.py

Next I went to provide "make" command and which throws me an error
message as follows:

pbs_python/pbs_python-4.4.0$ make
#(cd src; make)
python setup.py build
Failed to find log.h in inlcude dir /opt/torque/include/. (Set incude
dir via PBS_PYTHON_INCLUDEDIR variable)
make: *** [pythonlib] Error 2

I have set the env PBS_PYTHON_INCLUDEDIR to /opt/torque/include/ where
my torque include files. I haven't seen the log.h file in that path but
I can see /opt/torque/include/log_event.h /opt/torque/include/pbs_log.h

With the /opt/torque/include/pbs_log.h file I updated the setup.py file
and run the "make" command, this time it was successful.

*pbs_python/pbs_python-4.4.0$ make *
#(cd src; make)
python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
copying src/pbs.py -> build/lib.linux-x86_64-2.6
copying src/PBSQuery.py -> build/lib.linux-x86_64-2.6
running build_ext
building '_pbs' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/src
creating build/temp.linux-x86_64-2.6/src/C++
g++ -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -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
-fwrapv -I/opt/torque/include/ -fPIC -DTORQUE_4 -I/usr/include/python2.6
-c src/C++/pbs_wrap.cxx -o build/temp.linux-x86_64-2.6/src/C++/pbs_wrap.o
g++ -pthread -shared -I/opt/torque/include/
build/temp.linux-x86_64-2.6/src/C++/pbs_wrap.o -L/opt/torque/lib
-L/usr/lib64 -ltorque -lpython2.6 -o build/lib.linux-x86_64-2.6/_pbs.so
-L/opt/torque/lib -ltorque -Wl,-rpath -Wl,/opt/torque/lib

then I proceed further and gave make install command

*/pbs_python/pbs_python-4.4.0$ make install*
#(cd src; make)
python setup.py build
running build
running build_py
running build_ext
python ./setup.py install --prefix //share/software ;
running install
running build
running build_py
running build_ext
running install_lib
creating //share/software/lib64/python2.6/site-packages/pbs
copying build/lib.linux-x86_64-2.6/pbs.py ->
//share/software/lib64/python2.6/site-packages/pbs
copying build/lib.linux-x86_64-2.6/PBSQuery.py ->
//share/software/lib64/python2.6/site-packages/pbs
copying build/lib.linux-x86_64-2.6/_pbs.so ->
//share/software/lib64/python2.6/site-packages/pbs
byte-compiling //share/software/lib64/python2.6/site-packages/pbs/pbs.py
to pbs.pyc
byte-compiling
//share/software/lib64/python2.6/site-packages/pbs/PBSQuery.py to
PBSQuery.pyc
running install_egg_info
Writing
//share/software/lib64/python2.6/site-packages/pbs/pbs_python-4.4.0-py2.6
.egg-info
creating //share/software/lib64/python2.6/site-packages/pbs.pth
install -D LICENSE.openpbs //share/doc/ /LICENSE.openpbs
install: target `/LICENSE.openpbs' is not a directory
make: *** [install] Error 1

By looking at the Makefile, I have fixed manually the install -D steps,
which I believe the Makefile was not able to get the right path from the
defined variables. Of course they are not going to effect much in the
core installation of pbs_python, because the steps
consists of mainly the licenses and example scripts. The pbs_python
installation was successful and I tried to use the "pbs" module and
which was not working and throwing me an error message.

*In [1]: import pbs*
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/home/vipin/codebase/TaskManager/<ipython console> in <module>()

/share/software/lib64/python2.6/site-packages/pbs/pbs.py in <module>()
      24                 fp.close()
      25             return _mod
---> 26     _pbs = swig_import_helper()
      27     del swig_import_helper
      28 else:

/share/software/lib64/python2.6/site-packages/pbs/pbs.py in
swig_import_helper()
      20         if fp is not None:
      21             try:
---> 22                 _mod = imp.load_module('_pbs', fp, pathname,
description)
      23             finally:
      24                 fp.close()

ImportError: /share/software/lib64/python2.6/site-packages/pbs/_pbs.so:
undefined symbol: _Z13log_availablei

I have also checked the files associated with the shared object _pbs.so,
which looks everything fine as here

*pbs_python/pbs_python-4.4.0$ ldd
/share/software/lib64/python2.6/site-packages/pbs/_pbs.so*
         linux-vdso.so.1 =>  (0x00007fff1fff0000)
         libtorque.so.2 => /opt/torque/lib64/libtorque.so.2
(0x00007f18b85aa000)
         libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0
(0x00007f18b8203000)
         libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f18b7efd000)
         libm.so.6 => /lib64/libm.so.6 (0x00007f18b7c79000)
         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f18b7a62000)
         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f18b7845000)
         libc.so.6 => /lib64/libc.so.6 (0x00007f18b74b2000)
         libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f18b715f000)
         libz.so.1 => /lib64/libz.so.1 (0x00007f18b6f49000)
         libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f18b6baf000)
         libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f18b6951000)
         librt.so.1 => /lib64/librt.so.1 (0x00007f18b6749000)
         libdl.so.2 => /lib64/libdl.so.2 (0x00007f18b6545000)
         libutil.so.1 => /lib64/libutil.so.1 (0x00007f18b6341000)
         /lib64/ld-linux-x86-64.so.2 (0x000000306f000000)
         libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2
(0x00007f18b60fd000)
         libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f18b5e16000)
         libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f18b5c12000)
         libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f18b59e6000)
         libkrb5support.so.0 => /lib64/libkrb5support.so.0
(0x00007f18b57da000)
         libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f18b55d7000)
         libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f18b53bd000)
         libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f18b519d000)

Is there anything you can help the situation with me, I am happy to
provide more details from my side. I don't know if I am missing
to put the libs to be the last args at the end of the g++ command line
in make step?

many thanks in advance for the module,
Vipin

Attachments (0)

Change History (10)

comment:1 Changed 10 years ago by bas

  • Status changed from new to assigned
  • Type changed from defect to task

The quick answer is to copy the provided log.h from the pbs_python package to /opt/torque/include/. log.h will be included in a next release of torque.

The compilation/installation errors will be fixed

comment:2 follow-up: Changed 10 years ago by vipin@…

Thanks! There are two log.h files under pbs_python package. Which one should I take to move to /opt/torque/include.

./pbs_python-4.4.0/src/C/log.h ./pbs_python-4.4.0/src/C++/log.h

comment:3 in reply to: ↑ 2 Changed 10 years ago by bas

Replying to vipin@…:

Thanks! There are two log.h files under pbs_python package. Which one should I take to move to /opt/torque/include.

./pbs_python-4.4.0/src/C/log.h ./pbs_python-4.4.0/src/C++/log.h

The C++ one this is for torque version 4 and higher, C is for torque version 2

comment:4 Changed 10 years ago by vipin@…

Hi, I have tried to compile pbs_python package after copying ./pbs_python-4.4.0/src/C++/log.h to /opt/torque/include. The make step was successful. Then the make install step was partially successful (as described above, some manual editing is needed, till the below line it was fine) creating //share/software/lib64/python2.6/site-packages/pbs.pth

Now when I try to import the pbs module it shows the same error message as reported before. /share/software/lib/python2.6/site-packages/pbs/_pbs.so: undefined symbol: _Z13log_availablei In conclusion the copying of log.h didn't help much.

I have suspicion in the make step that somehow missed the ordering of libraries

comment:5 Changed 10 years ago by bas

Did you a make:

  • make distclean
  • make
  • cd build/lib.linux-x86_64-*
  • python/ipython
  • import pbs

comment:6 Changed 10 years ago by vipin@…

Yes I did that, still no luck.

In [1]: import pbs


ImportError? Traceback (most recent call last)

/share/software/pbs_python/pbs_python-4.4.0/build/lib.linux-x86_64-2.6/<ipython console> in <module>()

/share/software/pbs_python/pbs_python-4.4.0/build/lib.linux-x86_64-2.6/pbs.py in <module>()

24 fp.close() 25 return _mod

---> 26 _pbs = swig_import_helper()

27 del swig_import_helper 28 else:

/share/software/pbs_python/pbs_python-4.4.0/build/lib.linux-x86_64-2.6/pbs.py in swig_import_helper()

20 if fp is not None: 21 try:

---> 22 _mod = imp.load_module('_pbs', fp, pathname, description)

23 finally: 24 fp.close()

ImportError?: ./_pbs.so: undefined symbol: _Z13log_availablei

comment:7 Changed 10 years ago by bas

I am on holiday from 15 Feb till 23 Feb. The test that i run was with torque version 4.2.6 and higher.

comment:8 follow-up: Changed 10 years ago by anonymous

I am working on Version: 4.2.5

comment:9 in reply to: ↑ 8 Changed 10 years ago by bas

Replying to anonymous:

I am working on Version: 4.2.5

I know. I have read your logs ;-)

comment:10 Changed 9 years ago by bas

  • Cc basv@… removed
  • Resolution set to wontfix
  • Status changed from assigned to closed

Will close this ticket. The main effort will be for 5.X versions.

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.