PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 


libtool convenience libraries

Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message

Joined: 30 Sep 2004
Posts: 3

PostPosted: Thu Sep 30, 2004 2:43 am    Post subject: libtool convenience libraries Reply with quote

my project is split up in the following way:

src <= library built from convenience libraries in the subdirs
|- algorithm <= convenience library
|- math <= convenience library
|- ...
program <= link to the library

the convenience libraries are specified in the (in the corresponding subdir):

the shared library:
libgroxx_la_LIBADD = algorithm/ \
math/ \

to configure i set
CC pgcc
i tried LD not set, pgCC, pgcc, ld (GNU), gcc
AR was never set

all the convenience libraries seem to compile fine (the .la files are there and the archives .a are non-empty)
when i try to link them together into the libtool library, the command hangs. no error message, no processor time, no disk access, just doesn't do anything:

/bin/sh ../libtool --mode=link --tag=CC pgcc -o -rpath /scratch/igcpc01/markus/gromosXX/LINUX_PGC/lib -no-undefined -version-info 0:3:0 algorithm/ configuration/ interaction/ math/ simulation/ topology/ util/ io/ -L/scratch/igcpc01/markus/programs/gsl-1.5-pgc/lib -lgsl -lgslcblas -lm -lm
mkdir .libs

make[3]: *** [] Interrupt
make[2]: *** [all-recursive] Interrupt
make[1]: *** [all-recursive] Interrupt
make: *** [all] Interrupt
Total time : 24:53.35s
CPU utilisation (percentage) : 8.9%

the project compiles fine with gcc-3.4 and intel icc 8.0.

pgCC is:
pgCC 5.2-2
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2004, STMicroelectronics, Inc. All Rights Reserved.

system is:
Linux igcpc01 2.6.7 #1 SMP Fri Aug 13 15:34:21 CEST 2004 i686 GNU/Linux
libtool: 1.5.8

any ideas?
more info needed?

thanks for all hints!
Back to top
View user's profile

Joined: 30 Jun 2004
Posts: 5952
Location: The Portland Group Inc.

PostPosted: Thu Sep 30, 2004 10:21 am    Post subject: Reply with quote

First off, I've personally never used libtool and don't really know much about it. However, in reading over the documentation and googling "libtool pgcc" I may have some ideas. Of course, input from other users would be welcome.

libtool is GNU and as such is configured for gcc. One possible reason is that libtool is using gcc specific flags and/or not passing in "-fPIC". I saw one post where the user said that libtool converted all his "-Rs" to "--rpath". So your "-rpath" might be being converted incorrectly.

I'd like to know what command is causing the hang-up. Try running again with "sh -x ../libtool ..." to have the shell echo to standard error each command before its executed.

As a side note, if your goal here is to create a shared object it might be easier to create the .so directly. Section 8.2 of the PGI user's guide or more information about creating and using shared objects.

- Mat
Back to top
View user's profile

Joined: 30 Sep 2004
Posts: 3

PostPosted: Tue Oct 05, 2004 2:54 am    Post subject: template library: undefined references Reply with quote

Thanks Mat

i ran the libtool with sh x (good idea!) and noted (to my dismay) that it hang on a path including an nfs mount from a machine which was down at the moment!
sorry 'bout that!

now i ONLY get lots of undefined references. many to templated methods of my own, but some also to the C++ standard template library:

../src/.libs/libgroxx.a(inframe.o)(.text+0x2e36): In function `__CPR1317__clear__Q2_3std1295_Rb_tree__tm__1277_Q2_3std78basic_string__tm__58_cQ2_3std20char_traits__tm__2_cQ2_3std18allocator__tm__2_cQ2_3std330pair__tm__317_CQ2_3stdJ44JQ2_3std218vector__tm__203_Q2_3stdJ44JQ2_3std105allocator__tm__88_Q2_3stdJ44JQ2_3std360_Select1st__tm__341_Q2_3stdJ131JQ2_3std100less__tm__J374JQ2_3std359allocator__tm__J490JFv_v':
: undefined reference to `__CPR1353___M_erase__Q2_3std1295_Rb_tree__tm__1277_Q2_3std78basic_string__tm__58_cQ2_3std20char_traits__tm__2_cQ2_3std18allocator__tm__2_cQ2_3std330pair__tm__317_CQ2_3stdJ47JQ2_3std218vector__tm__203_Q2_3stdJ47JQ2_3std105allocator__tm__88_Q2_3stdJ47JQ2_3std360_Select1st__tm__341_Q2_3stdJ134JQ2_3std100less__tm__J377JQ2_3std359allocator__tm__J493JFPQ2_3std24_Rb_tree_node__tm__4_Z2Z_v'
make[2]: *** [md] Error 2

it seems like i can get around the undefined references for my own templated functions if i declare them inline. but obviously i don't want to do that for all of them...
maybe i should use -Wc,tused or one of these options... (had no time yet to try)

(all template methods are in the headers, no export statements)

thanks for getting me started,
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

Jump to:  
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

Powered by phpBB © phpBB Group