[Patches] [ python-Patches-659809 ] fix Makefile.pre to use config env

noreply@sourceforge.net noreply@sourceforge.net
Tue, 31 Dec 2002 05:41:31 -0800


Patches item #659809, was opened at 2002-12-29 17:41
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=659809&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
>Resolution: Rejected
Priority: 5
Submitted By: Daniel Brotsky (brotsky)
Assigned to: Skip Montanaro (montanaro)
Summary: fix Makefile.pre to use config env

Initial Comment:
In Python CVS head (2.3a0 as of 2002/12/29), Makefile.pre does not use the configure-specified values for CPPFLAGS or LDFLAGS (although it does use CFLAGS).  This means that non-standard build environments that can be expressed to configure using these flags (such as the fink environment on Mac OS X) are not picked up properly in the Python build process.  This, in turn, causes various extension modules that should build properly not to build properly.  It can even cause the Python core build to fail if a CFLAGS-specified include directory requires a non-core library in the LDFLAGS directory.

Fixing Makefile.pre to use CPPFLAGS and LDFLAGS as specified by configure turned up a related problem: the parser target did not properly use the standard Python linker flags when creating a separate library.

The attached patch fixes both of these problems.  It was created and tested on the Darwin platform; I have had no chance to test it on Linux or Solaris.


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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-12-31 08:41

Message:
Logged In: YES 
user_id=6380

OK, that's not good. I'll revert the change. Sorry, Daniel.
We can sort out the right way to do this after 2.3a1 is
released.

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

Comment By: Neal Norwitz (nnorwitz)
Date: 2002-12-31 07:03

Message:
Logged In: YES 
user_id=33168

I get the same thing on a clean tree:

  gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -O2

-g -O? is specified twice.

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-12-31 03:06

Message:
Logged In: YES 
user_id=6380

Let me know the outcome ASAP, Skip.  Unless you find this
was your own mistake, I'll revert this change.

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

Comment By: Skip Montanaro (montanaro)
Date: 2002-12-31 00:12

Message:
Logged In: YES 
user_id=44345

This seems to mess up straightforward builds for me on MacOSX.  A simple

    mkdir build.trial
	cd build.trial
	../configure

generates a Makefile with these definitions:

OPT=         -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
BASECFLAGS=  -Wno-long-double -no-cpp-precomp
CFLAGS=      $(BASECFLAGS) $(OPT) -g -O2

The "-g -O2" part is the @CFLAGS@ expansion.  I don't yet know where it's coming from.  I'm not 100% confident it's not related to the OPT/BASECFLAGS changes I haven't yet checked in, so I'm reopening and assigning to myself.


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

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-12-30 16:04

Message:
Logged In: YES 
user_id=6380

Thanks -- accepted and checked in as Makefile.pre.in 1.105.

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

Comment By: Daniel Brotsky (brotsky)
Date: 2002-12-29 22:40

Message:
Logged In: YES 
user_id=337571

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )

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

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