Skip Menu |
 

Subject: hostrealm code won't compile in debug mode using Solaris Studio C
When I compile MIT v1.13.2 code using debug compile options and the
solaris studio v12.4 C compiler I see:

+ /opt/SUNWspro/solarisstudio12.4/bin/cc -m32 -g '-xchip=pentium'
'-xregs=no%frameptr' -mt -D_LARGEFILE_SOURCE '-D_FILE_OFFSET_BITS=64'
-KPIC -DPIC -dy -G -z text -h hostrealm_test.so.0 -o hostrealm_test.so
main.so -R/usr/lib -L../../../lib -lkrb5 -lc -z defs
Undefined first referenced
symbol in file
krb5int_zap main.so (symbol belongs to implicit
dependency ../../../lib/libkrb5support.so.0)
ld: fatal: symbol referencing errors

Modifying the krb5-1.13.2/src/plugins/hostrealm/test/Makefile.in file so
this:

SHLIB_EXPDEPS= $(KRB5_DEPLIB)
SHLIB_EXPLIBS= $(KRB5_LIB)

becomes:
SHLIB_EXPDEPS= $(KRB5_DEPLIB) $(SUPPORT_DEPLIB)
SHLIB_EXPLIBS= $(KRB5_LIB) $(SUPPORT_LIB)

fixes the undefined krb5int_zap symbol issue.
Do you have any idea where in main.c the zap dependency is coming from?
I don't see any obvious candidates.
Ah, I forgot that the Solaris compiler builds static inline functions
and creates dependencies even if they aren't used. So the dependency
just comes from zapfree() and zapfreestr() in k5-int.h. I will make a
pull request with this change.
Date: Fri, 11 Dec 2015 11:45:34 -0600
From: Will Fiveash <will.fiveash@oracle.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #8326] hostrealm code won't compile in debug mode using Solaris Studio C
RT-Send-Cc:
On Fri, Dec 11, 2015 at 10:57:53AM -0500, Greg Hudson via RT wrote:
Show quoted text
> Ah, I forgot that the Solaris compiler builds static inline functions
> and creates dependencies even if they aren't used. So the dependency
> just comes from zapfree() and zapfreestr() in k5-int.h. I will make a
> pull request with this change.

Yeah, that's what I'm seeing with the Solaris Studio compiler. Thanks
for fixing this.

--
Will Fiveash
Oracle Solaris Software Engineer
From: ghudson@mit.edu
Subject: git commit

Add libkrb5support dependencies to test plugins

In some build environments, dependencies on libkrb5support can be
generated just from static inline functions in our header files, even
if those functions aren't used. In two test plugin modules, use
$(KRB5_BASE_DEPLIBS) and $(KRB5_BASE_LIBS) to depend on libkrb5support
as well as libkrb5. (This also pulls in libk5crypto, which is
unnecessary for these modules, but is inconsequential for a test
module.) Reported by Will Fiveash.

https://github.com/krb5/krb5/commit/5568d31f45fb78f505340a5b520b22d4dd3f6522
Author: Greg Hudson <ghudson@mit.edu>
Commit: 5568d31f45fb78f505340a5b520b22d4dd3f6522
Branch: master
src/plugins/hostrealm/test/Makefile.in | 6 +++---
src/plugins/pwqual/test/Makefile.in | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
From: tlyu@mit.edu
Subject: git commit

Add libkrb5support dependencies to test plugins

In some build environments, dependencies on libkrb5support can be
generated just from static inline functions in our header files, even
if those functions aren't used. In two test plugin modules, use
$(KRB5_BASE_DEPLIBS) and $(KRB5_BASE_LIBS) to depend on libkrb5support
as well as libkrb5. (This also pulls in libk5crypto, which is
unnecessary for these modules, but is inconsequential for a test
module.) Reported by Will Fiveash.

(cherry picked from commit 5568d31f45fb78f505340a5b520b22d4dd3f6522)

https://github.com/krb5/krb5/commit/5e3902de9753bb86488ee04abc886a3d51261653
Author: Greg Hudson <ghudson@mit.edu>
Committer: Tom Yu <tlyu@mit.edu>
Commit: 5e3902de9753bb86488ee04abc886a3d51261653
Branch: krb5-1.14
src/plugins/hostrealm/test/Makefile.in | 6 +++---
src/plugins/pwqual/test/Makefile.in | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)