Bug 6162 - Configure should be setting HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG in ../include/config.h
Configure should be setting HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG...
Status: RESOLVED FIXED
Product: Samba 3.3
Classification: Unclassified
Component: Build environment
3.3.1
Sparc Solaris
: P3 normal
: ---
Assigned To: Björn Jacke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-05 07:27 UTC by John Center
Modified: 2009-07-07 10:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Center 2009-03-05 07:27:15 UTC
Building 64-bit binaries with Sun Studio 12 on Solaris 10, SPARC.  Configure does not set HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG correctly for Heimdal Kerberos.  I get the following error when compiling:

"libsmb/clikrb5.c", line 1531: #error: UNKNOWN_KRB5_ENCTYPE_TO_STRING_FUNCTION

I have to manually change from:

  /* #undef HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG */

    to

     #define HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG 1

 to fix this.
Comment 1 John Center 2009-03-13 17:25:47 UTC
Looking into this problem further, the problem appears to be conftest is failing because my CFLAGS is not being added to the test.  I'm doing a 64-bit build, so contest fails with a "wrong ELF class: ELFCLASS32".  I think this is a typo in the configure script.  Werror_FLAGS is set & tested earlier on in the script to check what compiler warning flags are accepted.  I don't think this variable is needed for the tests below:

line 67380:    CFLAGS="$Werror_FLAGS";
if test "${smb_krb5_cv_enctype_to_string_takes_size_t_arg+set}" = set; then
  $as_echo_n "(cached) " >&6
else
        old_CFLAGS="$CFLAGS";
>>>>    CFLAGS="$Werror_FLAGS";
        export CFLAGS;
        old_CPPFLAGS="$CPPFLAGS";
        CPPFLAGS="$CPPFLAGS";
        export CPPFLAGS;
        old_LDFLAGS="$LDFLAGS";
        LDFLAGS="$LDFLAGS";
        export LDFLAGS;

While I don't understand the logic of saving the old xxxFLAGS, then using them here anyway, I think this should be either:

        old_CFLAGS="$CFLAGS";
        CFLAGS="$CFLAGS";
        export CFLAGS;
or
        old_CFLAGS="$CFLAGS";
        CFLAGS="$CFLAGS $Werror_FLAGS";
        export CFLAGS;


Please note that this same statement occurs at other places in configure:

line 67481:        CFLAGS="$Werror_FLAGS";
if test "${smb_krb5_cv_enctype_to_string_takes_size_t_arg+set}" = set; then

line 70733:        CFLAGS="$Werror_FLAGS";
if test "${samba_cv_HAVE_QUOTACTL_4A+set}" = set; then

line 70825:        CFLAGS="$Werror_FLAGS";
if test "${samba_cv_HAVE_QUOTACTL_4B+set}" = set; then

line 70918:        CFLAGS="$Werror_FLAGS";
if test "${samba_cv_HAVE_QUOTACTL_3+set}" = set; then

Comment 2 Björn Jacke 2009-07-07 10:43:57 UTC
can you please try current master or this change to your samba version?:

http://gitweb.samba.org/?p=samba.git;a=commitdiff;h=2540710b5eeb4a4ea2e0c0c7ba8ab7382f4236af

if this does not fix the problem for you please reopen this bug! Thank you!