[csw-users] libgnu_dev

Mark R Bannister mark at proseconsulting.co.uk
Mon Dec 5 15:53:29 CET 2011

On Mon 05/12/11 14:45 , Dagobert Michelsen dam at opencsw.org sent:
> Hi Mark,
> Am 05.12.2011 um 15:10 schrieb Mark R Bannister:
> > I see there's a CSWlibgnu-dev package in unstable at the moment.
> > This will be very handy for me, as I'm compiling
> > something that requires argp.
> Yes, that was when I hadn't figured out how to do GIT revisions in the
> package.Apart from that it should be ok to try for you. I'll respin an updated
> versionfor you. Feedback on this is especially welcome as it still is work in
> progress and has not got much testing.
> Best regards
> -- Dago

I thought your package would help Dago, but you don't have any argp symbols in
libgnu.a, even though you have prototypes for them in argp.h.

For example:

$ make
/bin/bash ./libtool --tag=CC    --mode=link gcc  -g -O2   -L/opt/csw/bdb48/lib
-L/opt/csw/lib -o makedb makedb.o db-compat-copy-makedb.o -lgnu -ldb
gcc -g -O2 -o makedb makedb.o db-compat-copy-makedb.o  -L/opt/csw/bdb48/lib
-L/opt/csw/lib -lgnu -ldb
makedb.o(.text+0x138): In function `main':
/var/tmp/nss_db/nss_db-2.2/makedb.c:127: undefined reference to `argp_parse'
makedb.o(.text+0x195):/var/tmp/nss_db/nss_db-2.2/makedb.c:136: undefined
reference to `argp_help'
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `makedb'

And that's because ...

$  /usr/ccs/bin/nm /opt/csw/lib/libgnu.a | grep -c argp

So it'd be nice to include the functions in the library if you're going to put
the prototypes in the header file.


More information about the users mailing list