classification
Title: `./configure --enable-framework --enable-universalsdk` fails because of change in r63997
Type: compile error Stage:
Components: Build Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: benjamin.peterson, georg.brandl, ronaldoussoren, trentm
Priority: deferred blocker Keywords: patch

Created on 2008-07-16 17:37 by trentm, last changed 2008-07-22 07:11 by trentm. This issue is now closed.

Files
File name Uploaded Description Edit
configure-patch-3381.txt ronaldoussoren, 2008-07-16 19:31
configure-patch-3381-1.txt ronaldoussoren, 2008-07-16 19:36
configure-patch-3381-2.txt ronaldoussoren, 2008-07-17 04:59
issue3381_configure_fix.patch trentm, 2008-07-21 18:16 tweak to svn head to fix "configure-patch-3381-2.txt"
Messages (16)
msg69805 - (view) Author: Trent Mick (trentm) * (Python committer) Date: 2008-07-16 17:37
Configuring with "--enable-universalsdk" fails on Mac OS X 10.4/x86
because of a change in r63997. This in the python trunk (i.e. the 2.6 tree).

The failure looks like this:

----------------------------
$ ./configure --enable-framework --enable-universalsdk
...
checking for log1p... no
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for wchar_t... yes
checking size of wchar_t... configure: error: cannot compute sizeof
(wchar_t)
See `config.log' for more details.
----------------------------

And the appropriate details in config.log are:
----------------------------
...
configure:21540: checking size of wchar_t
configure:21875: gcc -o conftest -arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -g -O2  -arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk  conftest.c  >&5
/usr/bin/ld: -syslibroot: multiply specified
collect2: ld returned 1 exit status
/usr/bin/ld: -syslibroot: multiply specified
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//cctmsJ7u.out (No such file or
directory)
configure:21878: $? = 1
configure: program exited with status 1
configure: failed program was:
...
----------------------------

The command being run:

  gcc -o conftest -arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -g -O2  -arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk  conftest.c

is "$ac_link". Here is a dump of relevant variables at that point in
"configure":

------------------
LDFLAGS is "-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk "
CFLAGS is "-arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -g -O2"
CPPFLAGS is ""
CC is "gcc"
ac_link is "$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS
conftest.$ac_ext $LIBS >&5"
------------------

The problem is that r63997
(http://mail.python.org/pipermail/python-checkins/2008-June/070612.html)
added this line to "configure.in" for Mac OS X:

    CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"


That results in the failure above: "ld" complaining about
-isysroot/-syslibroot being specified twice on the command line.

Ronald,
What was the "build issue on OSX 10.4" that the was meant to be fixed.
Can it be fixed without that "configure" change to "CFLAGS"?
msg69817 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-07-16 19:20
This is rather annoying, gcc doesn't accept multipe -isysroot flags on 
10.4, yet we need to specify -isysroot during configure to ensure that 
tests are done using the right SDK, otherwise most of configure will use 
the system headers instead of the SDK specified using the --enable-
universalsdk option.

I'm currently trying to teach configure to only add -isysroot to the 
configure-time CFLAGS when the OS version is 10.5 or later, because 
that's the only platform where -isysroot is really needed in the 
configure-time CFLAGS.

The patch should be ready later tonight, I'll post it here instead of 
committing to avoid interfering with the release process.
msg69819 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-07-16 19:31
configure-patch-3381.txt should fix the issue, but I cannot test on 10.4 
as I recently had to convert my only 10.4 machine to 10.5.
msg69820 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-07-16 19:36
Note to self: never rush a patch

configure-patch-3881-1.txt is the better patch, the other looks right but 
using square brackets which don't survive autoconf.

BTW. the patch is only for configure.in, run autoconf to update the actual 
configure script.
msg69823 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-07-16 19:50
Yet another version: configure-patch-3381-2.txt is a slight enhancement 
of the first version.

This version also moves the calculation of MACOSX_DEPLOYMENT_TARGET a 
lot 
earlier in configure.in, to ensure that the right value is active 
whenever
the compiler is used.

This turns out to be necessary to build using the 10.4 SDK on OSX 10.5.

BTW. Feel free to commit if the patch works for you, I'm rather swamped 
at work and won't be able to test on 10.4 anytime soon.
msg69827 - (view) Author: Trent Mick (trentm) * (Python committer) Date: 2008-07-16 20:24
> BTW. Feel free to commit if the patch works for you, I'm rather swamped
> at work and won't be able to test on 10.4 anytime soon.

Thanks for the quick patches. Other than verifying that `configure &&
make` works on 10.4 what specifically should I do "to ensure that
tests are done using the right SDK" (as you said in an earlier
comment)?
msg69828 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-07-16 20:30
The easiest way to test the configure bits would be to build on 10.5 with 
--enable-universalsdk and --enable-universalsdk=/. Both should work on 
10.5, while using different SDKs (with slightly different unix APIs).


However: it shouldn't be necessary to test that specific bit, I introduced 
issue3381 when I fixed the "configure should use the right CFLAGS" issue 
for 10.5 and my patch for issue3381 doesn't change the compiler flags on 
10.5.
msg69832 - (view) Author: Trent Mick (trentm) * (Python committer) Date: 2008-07-16 20:57
> Yet another version: configure-patch-3381-2.txt is a slight enhancement
> of the first version.

Ronald,
Did that accidentally not get attached?
msg69871 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-07-17 04:59
Forgot to upload updated patch
msg69883 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-07-17 16:00
Ok applied in r65061.
msg69935 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-07-18 05:49
Whoops, issue 3393 is a duplicate of this issue and notes that 
Mac/IDLE/Makefile.in is also affected.

I've fixed that makefile in r65091.
msg69936 - (view) Author: Trent Mick (trentm) * (Python committer) Date: 2008-07-18 06:08
Ronald,

The @ARCH_RUN_32BIT@ also needs to be added to two places in
Mac/Makefile.in (as indicated in issue 3393), no? Would you like me to
make that change?
msg70114 - (view) Author: Trent Mick (trentm) * (Python committer) Date: 2008-07-21 18:16
This bug should be re-opened. The patch to configure.in wasn't quite
right. I'm attaching a slight fix. `autoconf`ing removes one level of
square brackets in the 'sed' command to create $tgt.

(Q about the issue tracker: I'm unable to change the "Status" field on
this bug. I'm guessing that is "by design", right? I.e., only certain
people have the privs to change bug status?)
msg70115 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-07-21 18:29
Reopening. Yes, "Status" is settable only by Developers, but as a
committer, you should certainly have that privilege.
msg70138 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-07-22 07:07
Committed in r65183.
msg70139 - (view) Author: Trent Mick (trentm) * (Python committer) Date: 2008-07-22 07:11
Thanks Ronald.

Any comment on http://bugs.python.org/msg69936
History
Date User Action Args
2008-07-22 07:11:19trentmsetmessages: + msg70139
2008-07-22 07:07:20ronaldoussorensetstatus: open -> closed
messages: + msg70138
2008-07-21 18:29:39georg.brandlsetstatus: closed -> open
nosy: + georg.brandl
messages: + msg70115
2008-07-21 18:16:11trentmsetfiles: + issue3381_configure_fix.patch
type: compile error
messages: + msg70114
keywords: + patch
2008-07-18 06:08:08trentmsetmessages: + msg69936
2008-07-18 05:49:11ronaldoussorensetmessages: + msg69935
2008-07-17 16:00:13benjamin.petersonsetstatus: open -> closed
nosy: + benjamin.peterson
resolution: accepted -> fixed
messages: + msg69883
2008-07-17 04:59:10ronaldoussorensetfiles: + configure-patch-3381-2.txt
messages: + msg69871
2008-07-16 20:57:22trentmsetmessages: + msg69832
2008-07-16 20:30:55ronaldoussorensetmessages: + msg69828
2008-07-16 20:24:12trentmsetmessages: + msg69827
title: `./configure --enable-framework --enable-universalsdk` fails because of change in r63997 -> `./configure --enable-framework --enable-universalsdk` fails because of change in r63997
2008-07-16 19:58:48ronaldoussorensetpriority: deferred blocker
resolution: accepted
2008-07-16 19:50:26ronaldoussorensetmessages: + msg69823
2008-07-16 19:36:34ronaldoussorensetfiles: + configure-patch-3381-1.txt
messages: + msg69820
2008-07-16 19:31:12ronaldoussorensetfiles: + configure-patch-3381.txt
messages: + msg69819
2008-07-16 19:20:31ronaldoussorensetmessages: + msg69817
2008-07-16 17:45:13benjamin.petersonsetassignee: ronaldoussoren
2008-07-16 17:37:36trentmcreate