Bug 7427 - Using IBM xl_C compiler produces wrong results in configure
Summary: Using IBM xl_C compiler produces wrong results in configure
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.5.2
Hardware: PPC AIX
: P3 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-13 09:58 UTC by Andrew Miskell
Modified: 2011-06-17 07:52 UTC (History)
0 users

See Also:


Attachments
config.log using gcc (139.24 KB, application/x-zip-compressed)
2010-05-13 10:04 UTC, Andrew Miskell
no flags Details
config.log using xl_C (143.58 KB, application/x-zip-compressed)
2010-05-13 10:05 UTC, Andrew Miskell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Miskell 2010-05-13 09:58:28 UTC
I'm compiling Samba with ADS support against a locally installed Heimdal 
1.3.2 Kerberos installation and I'm getting a failure while compiling 
clikrb5.c

This is using the IBM xl_C compiler.

If I use the gcc compiler, the configure log has:

configure:29740: checking whether krb5_mk_error takes 3 arguments MIT or 9 
Heimdal
configure:29758: gcc -c -I/opt/CMNSsamba/include -O 
-I/opt/CMNSsamba/include  -Iinclude -I./include  -I. -I. 
-I./../lib/replace -I./../lib/tevent -I./libaddn
s -I./librpc -I./.. -I./../lib/popt -I/opt/CMNSsamba/include 
-DLDAP_DEPRECATED conftest.c >&5
conftest.c: In function 'main':
conftest.c:525: error: too few arguments to function 'krb5_mk_error'
configure:29758: $? = 1

If I use the xl_C compiler, the configure log has:

configure:29740: checking whether krb5_mk_error takes 3 arguments MIT or 9 
Heimdal
configure:29758: cc -qlanglvl=extc89 -qlanglvl=extc99 -c 
-I/opt/CMNSsamba/include  -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 
-D_LINUX_SOURCE_COMPAT -qmaxmem=3200
0 -I/opt/CMNSsamba/include  -Iinclude -I./include  -I. -I. 
-I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. 
-I./../lib/popt -I/opt/CMNSsam
ba/include -DLDAP_DEPRECATED conftest.c >&5
"conftest.c", line 524.18: 1506-098 (E) Missing argument(s).
configure:29758: $? = 0
configure:29765: result: yes
Comment 1 Andrew Miskell 2010-05-13 10:04:46 UTC
Created attachment 5704 [details]
config.log using gcc
Comment 2 Andrew Miskell 2010-05-13 10:05:26 UTC
Created attachment 5705 [details]
config.log using xl_C
Comment 3 Björn Jacke 2010-05-24 15:25:11 UTC
xlc throws an error:
"conftest.c", line 524.18: 1506-098 (E) Missing argument(s).
but exits with return code 0. What a bloody bastard...
Comment 4 Björn Jacke 2010-05-24 16:07:06 UTC
from the xlc man page:

         -qhalt=<sev>
                Stops the compiler after the first phase if the
                severity level of errors detected equals or exceeds
                the specified level, <sev>.  The severity levels in
                increasing order of severity are:

                i = information
                w = warning
                e = error
                s = severe error
                u = unrecoverable error

                The default is -qhalt=s.

as non of our builds in the build farm seems to have an "error warning" I'm going to make  -qhalt=e the default for the IBM compiler. When the buildfarm doesn't complain we'll pull that into there release branches.
Comment 5 Björn Jacke 2010-05-26 07:07:06 UTC
can you please change the line in configure.in from

CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"

to

CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 -qhalt=e"

then run autogen.sh and configure again and test with that?
Comment 6 Björn Jacke 2010-06-09 09:02:01 UTC
we should cherry-pick ff0872d59d78ad42212c88313ef924ea4eb7a8a1 to 3.5 to fix this issue.

Metze, please review and reassign to Karolin...
Comment 7 Stefan Metzmacher 2010-06-15 05:48:59 UTC
ff0872d59d78ad42212c88313ef924ea4eb7a8a1 looks good
Comment 8 Karolin Seeger 2010-06-16 01:26:21 UTC
Pushed to v3-5-test. Will be included in Samba 3.5.4.
Closing out bug report.

Thanks!