Bugs item #1450807, was opened at 2006-03-15 16:36 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1450807&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Build Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: John W. Grove (johnwgrove) Assigned to: Nobody/Anonymous (nobody) Summary: Python build fails for gcc 4.x from Gnu Initial Comment: The configure script for Python 4.2.2 add the compiler flags -Wno-long-double and -no-cpp-precomp when using the Gnu gcc compiler on Darwin. This causes the build to fail when using versions of GCC build directly from Gnu source (for example gcc-4.0.2 and gcc-4.1). These options are only available when using the "native" gcc compilers supplied with the Darwin OS. In particular I am using OS X 8.5.0. There is a simple correction to this problem that involves using autoconf tests for the appropriateness of these options before adding them to the BASECFLAGS environment variable. In particular the following works: Replace the line BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd" at or near line 3165 under the Darwin case in configure.in with the following test AC_LANG_SAVE AC_LANG_C ac_save_cc="$CC" for arg in -Wno-long-double -no-cpp-precomp -mno-fused-madd ; do CC="$ac_save_cc $arg" AC_COMPILE_IFELSE([ AC_LANG_SOURCE([[ #include <stdlib.h> #include <stdio.h> int main(int argc,char**argv) { return 0; } ]])],[BASECFLAGS="$BASECFLAGS $arg"],[]) done CC="$ac_save_cc" AC_LANG_RESTORE in other words test to see if the option works with the chosen compiler before adding it blindly to BASECFLAGS. I am attaching this version of configure.in for your convenience. I tested my build of Python-2.4.2 on both Linux and Darwin using the apple version of gcc 3.3 as well as Gnu versions gcc 4.0.2 and 4.1 that I built from source. The build and install worked properly and the python executable was runable in all cases. I did not perform more extensive regression tests, but I believe this change has no effect for compilations using previously support configurations, and only applies for new currently unsupported compilers. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1450807&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com