Posted: Wed Sep 05, 2012 6:02 pm Post subject: linking on V2.16
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
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.
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:
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).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum