problem building libassuan + pth

Stoyan Angelov s_angelov at
Tue Nov 21 10:51:16 CET 2006

Werner Koch wrote:
> On Sun, 19 Nov 2006 17:46, s_angelov at said:
>> checking for PTH - version >= 1.3.7... yes
>> checking whether PTH installation is sane... no
> The tests did not include the --all flags for pth-config and thus it
> fails for systems requiring -lsocket or similar.  Will be fixed in the
> next release.
> As a workaround you you should diff the output of
> pth-config --libs
> pth-config --libs --all
> and add the extra libs on the command linle like
> ./configure LIBS="-ldl -lnsl"
> Shalom-Salam,
>    Werner

hello Werner,

thank you for your answer! adding LIBS="-ldl -lsocket -lnsl" to 
configure as you suggested fixed the problem and libassuan is now 
successfully  build with pth support.
i had a similar problem with gnupg 2.0 - adding LIBS="-ldl -lsocket 
-lnsl" to configure does not work as with libassuan, so i had to change 
the configure script itself:

<          LIBS="$LIBS `$PTH_CONFIG --libs`"
 >          LIBS="$LIBS `$PTH_CONFIG --libs --all`"

now "configure" finishes successfully but when i use "make" i get the 
following error:

gcc -I/usr/local/include  -I/usr/local/include -I/usr/local/include 
-I/usr/local/include -g -O2 -Wall -Wno-pointer-sign   -o gpg2  gpg.o 
build-packet.o compress.o compress-bz2.o free-packet.o getkey.o keydb.o 
keyring.o seskey.o kbnode.o mainproc.o armor.o mdfilter.o textfilter.o 
progress.o misc.o openfile.o keyid.o parse-packet.o status.o plaintext.o 
sig-check.o keylist.o pkglue.o pkclist.o skclist.o pubkey-enc.o 
passphrase.o seckey-cert.o encr-data.o cipher.o encode.o sign.o verify.o 
revoke.o decrypt.o keyedit.o dearmor.o import.o export.o trustdb.o 
tdbdump.o tdbio.o delkey.o keygen.o helptext.o keyserver.o photoid.o 
call-agent.o card-util.o exec.o -L/usr/local/lib -lgcrypt 
-L/usr/local/lib -lgpg-error ../gl/libgnu.a ../common/libcommon.a 
../jnlib/libjnlib.a ../common/libgpgrl.a -lz -lbz2 -lresolv  -lreadline 
../intl/libintl.a -liconv  -lsocket -lnsl  -L/usr/local/lib -lassuan 
-L/usr/local/lib -lgpg-error
../common/libcommon.a(libcommon_a-asshelp.o): In function `send_one_option':
/root/gnupg-2.0.0/common/asshelp.c:46: undefined reference to `asprintf'
collect2: ld returned 1 exit status
make[2]: *** [gpg2] Error 1
make[2]: Leaving directory `/root/gnupg-2.0.0/g10'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/gnupg-2.0.0'
make: *** [all] Error 2



More information about the Gnupg-users mailing list