Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2010 15:21:46 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Doug Rabson <dfr@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   libgssapi.a and libgssapi_krb5.a cannot both be used
Message-ID:  <20100226122146.GA17782@edoofus.dev.vega.ru>
In-Reply-To: <201002261212.o1QCCs2Z035189@svn.freebsd.org>
References:  <201002261212.o1QCCs2Z035189@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug,

The libgssapi.a and libgssapi_krb5.a libraries both define the
same symbols that makes static linkage using them impossible in
some cases, e.g. when trying to link sshd(8) statically.  Details
are below.

On Fri, Feb 26, 2010 at 12:12:54PM +0000, Ruslan Ermilov wrote:
> Author: ru
> Date: Fri Feb 26 12:12:54 2010
> New Revision: 204355
> URL: http://svn.freebsd.org/changeset/base/204355
>=20
> Log:
>   (Almost) fixed static linkage.  The remaining problem is with
>   libgssapi.a and libgssapi_krb5.a libraries that define the
>   same symbols.

After this fix, the static build still fails like this:

%%%
Script started on Fri Feb 26 15:15:30 2010
# pwd
/usr/src/secure/usr.sbin/sshd
# make -DNO_SHARED
cc -O2 -pipe  -I/usr/src/secure/usr.sbin/sshd/../../../crypto/openssh -incl=
ude ssh_namespace.h -DUSE_BSM_AUDIT -DHAVE_GETAUDIT_ADDR -DGSSAPI -DHAVE_GS=
SAPI_GSSAPI_H=3D1 -DHAVE_GSSAPI_GSSAPI_KRB5_H=3D1 -DKRB5 -DHEIMDAL -DNO_IDE=
A -std=3Dgnu99 -fstack-protector -Wno-pointer-sign  -static -o sshd sshd.o =
auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o sshpty.o sshlogin.o se=
rvconf.o serverloop.o auth.o auth1.o auth2.o auth-options.o session.o auth-=
chall.o auth2-chall.o groupaccess.o auth-skey.o auth-bsdauth.o auth2-hostba=
sed.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake=
=2Eo monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o auth-krb5.o a=
uth2-gss.o gss-serv.o gss-serv-krb5.o loginrec.o auth-pam.o auth-shadow.o a=
uth-sia.o md5crypt.o audit.o audit-bsm.o platform.o sftp-server.o sftp-comm=
on.o roaming_common.o gss-genr.o -lssh -lutil -lz -lwrap -lpam -lkrb5 -lhx5=
09 -lasn1 -lcrypto -lcrypt -lroken -lcom_err -lradius -ltacplus -lcrypt  -l=
util -lopie -lmd -lssh -lcrypto -lcrypt -lypclnt -lbsm -lgssapi_krb5 -lgssa=
pi -lkrb5 -lasn1 -lcrypto -lcrypt
/usr/lib/libgssapi.a(gss_names.o)(.data+0x0): multiple definition of `GSS_C=
_NT_USER_NAME'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x0): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x4): multiple definition of `GSS_C=
_NT_MACHINE_UID_NAME'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x4): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x8): multiple definition of `GSS_C=
_NT_STRING_UID_NAME'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x8): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0xc): multiple definition of `GSS_C=
_NT_HOSTBASED_SERVICE_X'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0xc): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x10): multiple definition of `GSS_=
C_NT_HOSTBASED_SERVICE'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x10): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x14): multiple definition of `GSS_=
C_NT_ANONYMOUS'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x14): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x18): multiple definition of `GSS_=
C_NT_EXPORT_NAME'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x18): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x1c): multiple definition of `GSS_=
KRB5_NT_PRINCIPAL_NAME'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x1c): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x20): multiple definition of `GSS_=
KRB5_NT_USER_NAME'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x20): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x24): multiple definition of `GSS_=
KRB5_NT_MACHINE_UID_NAME'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x24): first defined here
/usr/lib/libgssapi.a(gss_names.o)(.data+0x28): multiple definition of `GSS_=
KRB5_NT_STRING_UID_NAME'
/usr/lib/libgssapi_krb5.a(external.o)(.data+0x28): first defined here
*** Error code 1

Stop in /usr/src/secure/usr.sbin/sshd.
#=20
%%%

Can you please fix this problem within libgss* libraries?


Thanks,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100226122146.GA17782>