View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

linking on V2.16

Tom Duvall wrote on Sep 05, 2012

On some of our linux systems (critical ones for running iraf on our cluster), I seem to be unable to get one of my packages to link. The error messages (below) have something to do with pthread. The xc command and the message I get are:

xc -Nz -/g -/m64 -e x_travelt.o libpkg.a aravr.o awvgr.o cartography.o -lxtools -linterp -liminterp -ldeboor -o x_travelt.e
/iraf/iraf/bin.linux64/libVO.a(abyss_thread_pthread.o)(.text+0x80): In function `pthreadStart':
/iraf/iraf.v216/vendor/voclient/libsamp/libxrpc/xmlrpc-c-1.16.29/lib/abyss/src/thread_pthread.c:47: undefined reference to `__pthread_register_cancel'
/iraf/iraf/bin.linux64/libVO.a(abyss_thread_pthread.o)(.text+0x9e):/iraf/iraf.v216/vendor/voclient/libsamp/libxrpc/xmlrpc-c-1.16.29/lib/abyss/src/thread_pthread.c:51: undefined reference to `__pthread_unregister_cancel'
collect2: ld returned 1 exit status
Warning, mkpkg line 1: module `update' not found or returned error

Any idea what might be going on?
Thanks.
Tom

Mike Fitzpatrick wrote on Sep 05, 2012

If you've got an older v2.15 system also installed then it may just be that you're using the old 'xc' binary (i.e. you need to rerun the iraf install script for v2.16). Otherwise, I'd say that you don't have the Posix threads package installed on the machine.

XC should automatically include "-lpthread" on the link line, you can verify this using e.g.

xc -dv foo.x


If you see '-lpthread' at the end of the linker line but still see the error then your sysadmin needs to install the pthread package for your system. Otherwise, check whether the 'xc' command points to the v2.16 version.

Tom Duvall wrote on Sep 05, 2012

We had removed the v2.15 stuff and only have the v2.16. So, we are looking at the right version of xc.

I believe we have the pthread package present:

ls /usr/lib64/libpthr*
/usr/lib64/libpthread.a /usr/lib64/libpthread.so
/usr/lib64/libpthread_nonshared.a

I did try the "xc -dv foo.x" with a simple task. The "-lpthread" was present in the linking statement. Also, this simple task did link correctly. And also executed. This task made a plot from some internally generated data (no image calls).

Tom

Tom Duvall wrote on Sep 05, 2012

We did find a system that would compile everything. Thanks for your help.
Tom

Last post on Sep 05, 2012