Bug 6931 - Need to add libgpg-error.so as the dependency of libgcyrpt.so
Summary: Need to add libgpg-error.so as the dependency of libgcyrpt.so
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Build (show other bugs)
Version: unspecified
Hardware: Other Solaris
: P3 normal (vote)
Target Milestone: ---
Assignee: Jelmer Vernooij
QA Contact: samba4-qa@samba.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-26 03:05 UTC by Brian Lu (mail address dead)
Modified: 2020-12-11 07:16 UTC (History)
0 users

See Also:


Attachments
add -lgpg-error to GCRYPT_LDFLAGS (421 bytes, patch)
2009-11-26 03:06 UTC, Brian Lu (mail address dead)
no flags Details
patch based on comments (450 bytes, patch)
2009-12-01 04:41 UTC, Brian Lu (mail address dead)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Lu (mail address dead) 2009-11-26 03:05:08 UTC
When compile samba4 the latest trunk build on OpenSolaris. I got following error:
Linking bin/regpatch
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
gpg-error.h

The gpg_err_code_from_errno() is referenced in gpg-error.h
Comment 1 Brian Lu (mail address dead) 2009-11-26 03:06:08 UTC
Created attachment 5014 [details]
add -lgpg-error to GCRYPT_LDFLAGS
Comment 2 Brian Lu (mail address dead) 2009-11-26 03:06:59 UTC
I tested the patch on both ubuntu 9.10 and OpenSolaris. It works well.
Comment 3 Stefan Metzmacher 2009-11-26 04:19:23 UTC
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)
Comment 4 Björn Jacke 2009-11-26 09:59:25 UTC
or use libgnutls-config when available - maybe even make it a requirement to use it.
Comment 5 Brian Lu (mail address dead) 2009-12-01 04:41:34 UTC
Created attachment 5030 [details]
patch based on comments
Comment 6 Stefan Metzmacher 2009-12-15 06:43:22 UTC
Fixed with f34607908367cce84fa9d8331c924135583359e6.