[ python-Bugs-1104249 ] configure doesn't set up CFLAGS properly

SourceForge.net noreply at sourceforge.net
Mon Jan 17 23:55:56 CET 2005


Bugs item #1104249, was opened at 2005-01-17 14:54
Message generated for change (Comment added) made by bos
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1104249&group_id=5470

Category: Build
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Bryan O'Sullivan (bos)
Assigned to: Nobody/Anonymous (nobody)
Summary: configure doesn't set up CFLAGS properly

Initial Comment:
I'm trying to build a 32-bit python on an x86_64 Linux box running Fedora Core 3.

Here's my configure command line:

CFLAGS=-m32 LDFLAGS=-m32 ../../../python/configure --prefix=/opt/python --enable-shared --enable-ipv6 --enable-profiling --enable-unicode=ucs4

When I try to do a make afterwards, the build immediately fails:

gcc -pthread -c -pg  -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I../../../python/Include -fPIC -DPy_BUILD_CORE -o Modules/python.o ../../../python/Modules/python.c
In file included from ../../../python/Include/Python.h:55,
                 from ../../../python/Modules/python.c:3:
../../../python/Include/pyport.h:612:2: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
make: *** [Modules/python.o] Error 1

Notice the lack of "-m32" on the gcc command line. Sure enough, look in the Makefile and LDFLAGS is set correctly, with -m32, but CFLAGS makes no mention of it, nor does BASECFLAGS.

If I modify BASECFLAGS by hand, python itself builds OK, but then the shared libraries fail to link because LDSHARED is not having LDFLAGS passed in.

----------------------------------------------------------------------

>Comment By: Bryan O'Sullivan (bos)
Date: 2005-01-17 14:55

Message:
Logged In: YES 
user_id=28380

The "correct" (i.e. works for me) way to work around this is to run configure with CC="gcc -32" CXX="g++ -m32" instead of setting CFLAGS and LDFLAGS.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1104249&group_id=5470


More information about the Python-bugs-list mailing list