Opened 9 years ago

Closed 7 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:



I've seen a few tickets already on errors with undefined symbols, and I've tried replacing the and pbs_wrap.c files as well as the 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 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/
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
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 #Import pbs

#Traceback (most recent call last):
#  File "", line 5, in <module>
#    import pbs
#  File "/path/to/pbs/", line 25, in <module>
#    _pbs = swig_import_helper()
#  File "/path/to/pbs/", line 21, in #swig_import_helper
#    _mod = imp.load_module('_pbs', fp, pathname, description)
#ImportError: /path/to/pbs/ 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
vi cpit

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 -L/path/to/torque-4.2.9/lib64 -ltorque

bash makeit 
+ swig -v -python -shadow pbs.i
LangSubDir: python
Search paths:
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 -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 "", line 25, in <module>
    _pbs = swig_import_helper()
  File "", line 21, in swig_import_helper
    _mod = imp.load_module('_pbs', fp, pathname, description)
ImportError: ./ 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 7 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
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.