[Nexus] problems with nxpython

Zolnierczuk, Piotr pzolnier at indiana.edu
Sat Feb 9 19:04:39 GMT 2008

I am having problems with NeXus Python bindings

When I invoke python interpreter and 'import nxpython' I get the following message
$ export PYTHONPATH=$HOME/lib/nexus-r980/lib/python2.4/site-packages
$ export LD_LIBRARY_PATH=$HOME//lib/nexus-r980/lib:$HOME/lib/nexus-r980/lib/python2.4/site-packages
$ python
Python 2.4.3 (#1, Apr  7 2007, 17:50:23)
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nxpython
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/nxpython.py", line 5, in ?
    import libnxpython
ImportError: /home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined symbol: putNXDatasetValue

And when I just try to link I get a host of unresolved symbols
$ gcc main.c -L$HOME/lib/nexus-r980/lib -L$HOME/lib/nexus-r980/lib/python2.4/site-packages -lnxpython -lNeXus -lpython2.4
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `putNXDatasetValue'
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `getNXDatasetDim'
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `getNXDatasetValue'
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `dropNXDataset'
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `getNXDatasetText'
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `createNXDataset'
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `getNXDatasetRank'
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `createTextNXDataset'
/home/zolnie/lib/nexus-r980/lib/python2.4/site-packages/libnxpython.so: undefined reference to `getNXDatasetType'
collect2: ld returned 1 exit status

Running nm -B libNeXus.so reveals that the above symbols are, indeed, defined in libNeXus.so , so I guess I am doing something silly.
I tried r980 and also 4.1, 4.0.

My machine is a 2xDualCore AMD64 running Scientific Linux 5 (a virtual clone of RHEL5):

 *   gcc-4.1.1
 *   swig-1.3.29
 *   automake-1.9.6
 *   autoconf-2.59-12
 *   libtool-1.5.22
 *   python-2.4.3
 *   java-1.5.0

BTW what is the correct way of building when extracting from svn?
./configure [options]
make install

Cause when I run ./autogen.sh I get the following error
$ ./autogen.sj
Building configure...
configure.ac:534: error: possibly undefined macro: AC_TYPE_INT64_T
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:535: error: possibly undefined macro: AC_TYPE_UINT64_T
configure.ac:536: error: possibly undefined macro: AC_TYPE_LONG_LONG_INT
configure.ac:537: error: possibly undefined macro: AC_TYPE_UNSIGNED_LONG_LONG_INT

Any ideas what am I missing?
 Piotr Adam Zolnierczuk
 Indiana University                          phone:  (812) 855-3613
 Cyclotron Facility                          fax:    (812) 855-6645
 2401 Milo B Sampson Ln               e-mail:  pzolnier at indiana.edu<mailto:pzolnier at indiana.edu>
 Bloomington,IN 47408, USA   http://www.iucf.indiana.edu/u/pzolnier
                   written on recycled electrons

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nexusformat.org/pipermail/nexus/attachments/20080209/9294c115/attachment.html 

More information about the NeXus mailing list