Modify

Opened 9 years ago

Closed 8 years ago

#51 closed defect (fixed)

Swig errors with pbs_python 4.4.0 and Torque 4.2.9

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

Description

Hi,

I've seen a few tickets already on errors with undefined symbols, and I've tried replacing the pbs.py and pbs_wrap.c files as well as the setup.py.in file while compiling, to no avail. I'm still having issues linking these libraries. I'm running CentOS 6.6 and compiling with gcc 4.4.7. Here's what I see:

# Set up a Torque Client
cd torque-4.2.9
./configure --prefix=$(pwd) --mandir=$(pwd)/man  --libdir=$(pwd)/lib64 CC="gcc -m64" --enable-drmaa 
make
make install_clients
export LD_LIBRARY_PATH=$(pwd)/lib64:$LD_LIBRARY_PATH
cd bin
export PATH=$(pwd):$PATH

# Set up pbs_python
cd ..
mkdir pbs_py_again
cd pbs_py_again/
wget ftp://ftp.surfsara.nl/pub/outgoing/pbs_python.tar.gz
tar -xzvf pbs_python.tar.gz 
cd pbs_python-4.4.0/
./configure --prefix=$(pwd) --with-pbsdir=/full/path/to/new/torque-4.2.9
make
emacs Makefile # Because the paths are all screwed up - is this ever going to be fixed?
make install
cd lib/python2.7/site-packages/pbs
export PYTHONPATH=$(pwd)
cd ~
python submit.py #Import pbs

#Traceback (most recent call last):
#  File "submit.py", line 5, in <module>
#    import pbs
#  File "/path/to/pbs/pbs.py", line 25, in <module>
#    _pbs = swig_import_helper()
#  File "/path/to/pbs/pbs.py", line 21, in #swig_import_helper
#    _mod = imp.load_module('_pbs', fp, pathname, description)
#ImportError: /path/to/pbs/_pbs.so: undefined symbol: log_remove_old

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by bas

I can not test the torque 5 version. Can you test the:

If that works tar the directory and attached this to the ticket.

I cna only test 2.5.X and torque 5.X

comment:2 Changed 9 years ago by cganote@…

Here's what I tried:

wget -r -nd --no-parent https://oss.trac.surfsara.nl/pbs_python/svn/devel/5.X/
vi cpit
#INCLUDE_DIR=/path/to/torque-4.2.9/include

vi makeit
#g++  -fPIC -DDEBUG -I/path/to/python/include/python2.7 -I/path/to/torque-4.2.9/include -c pbs_wrap.c -o pbs_wrap.o
#g++ --shared pbs_wrap.o -o _pbs.so -L/path/to/torque-4.2.9/lib64 -ltorque

bash makeit 
+ swig -v -python -shadow pbs.i
LangSubDir: python
Search paths:
   ./
   ./swig_lib/python/
   /usr/share/swig/1.3.40/python/
   ./swig_lib/
   /usr/share/swig/1.3.40/
Preprocessing...
Starting language-specific parse...
Processing types...
C++ analysis...
Generating wrappers...
log.h:155: Warning(454): Setting a pointer/reference variable may leak memory.
+ g++ -fPIC -DDEBUG -I/path/to/include/python2.7 -I/path/to/torque-4.2.9/include -c pbs_wrap.c -o pbs_wrap.o
+ g++ --shared pbs_wrap.o -o _pbs.so -L/path/to/torque-4.2.9/lib64 -ltorque

(tripup)[trinity@gw95 5x]$ python
Python 2.7.1 (r271:86832, Feb 25 2015, 14:37:37) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pbs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pbs.py", line 25, in <module>
    _pbs = swig_import_helper()
  File "pbs.py", line 21, in swig_import_helper
    _mod = imp.load_module('_pbs', fp, pathname, description)
ImportError: ./_pbs.so: undefined symbol: _Z7log_extiPKcS0_i
>>> 

comment:3 Changed 9 years ago by bas

  • Status changed from new to assigned

First of all i test with swig version:

  • SWIG Version 2.0.7

This can make a huge difference. You can comment the 2 include log.h statements in:

  • pbs.i

This will disable the pbs log functions and see if this solves your problem.

comment:4 Changed 8 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

I assume everything works as expected

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.