When compile samba4 the latest trunk build on OpenSolaris. I got following error:
Undefined first referenced
symbol in file
gpg_err_code_from_errno bin/mergedobj/tls.o (symbol belongs to implicit dependency /usr/lib/libgpg-error.so.0)
gpg_err_code_from_syserror bin/mergedobj/tls.o (symbol belongs to implicit dependency /usr/lib/libgpg-error.so.0)
ld: fatal: symbol referencing errors. No output written to bin/regpatch
The root cause is that source4/lib/tls/tlscert.c includes gcrypt.h which includes
The gpg_err_code_from_errno() is referenced in gpg-error.h
Created attachment 5014 [details]
add -lgpg-error to GCRYPT_LDFLAGS
I tested the patch on both ubuntu 9.10 and OpenSolaris. It works well.
Blindly adding -lgpg-error seem to be wrong.
We should check it it's really needed, and then gpg-error should
be added to GCRYPT_LIBS instead of adding something to GCRYPT_LDFLAGS.
The absolute minumum would be this:
AC_CHECK_LIB_EXT(gpg-error, GCRYPT_LIBS, gpg_err_code_from_errno)
or use libgnutls-config when available - maybe even make it a requirement to use it.
Created attachment 5030 [details]
patch based on comments
Fixed with f34607908367cce84fa9d8331c924135583359e6.