GnuPG 2.0 compilation fails with "undefined reference to gpg_err_code_from_syserror"

Werner Koch wk at gnupg.org
Wed Nov 29 11:33:15 CET 2006


On Tue, 28 Nov 2006 22:11, gnupg-ml at seichter.de said:

>  ../jnlib/libjnlib.a ../common/libcommonpth.a ../gl/libgnu.a -lgcrypt
>  -lgpg-error -L/usr/local/libassuan-1.0.1/lib -lassuan-pth -L/usr/lib
>  -lpth -lnsl -L/usr/local/libgpg-error-1.4/lib -lgpg-error -ldl

 -L/usr/lib -lpth -lnsl -L/usr/local/libgpg-error-1.4/lib
 ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 From pth-config        from gpg-error-config

Thus pth-config tells the linker to search the standard lib directory
first and there you have an old version of libgpg-error which does not
match the one tested by configure (installed under
/usr/local/libgpg-error-1.4).  I can mitigate the problem by changing
the order.  However, these kinds of problems are not completly
solvable.  

As a quick hack, I suggest to fix pth-config by removing the
superfluous -L/usr/lib.



Salam-Shalom,

   Werner


p.s.
You might also want to use stow(1) instead of having an own hierachy
for all libs.  Then you only need to do:

  ./configure
  make 
  make install prefix=/usr/local/stow/libgpg-error
  sudo stow -d /usr/local/stow libgpg-error

after having created the libgpg-error diectory chown to you.  This
allows to easily update or remove of libs.






More information about the Gnupg-users mailing list