[Pythonmac-SIG] newbie process question about building MachoPython

Jack Jansen Jack.Jansen@cwi.nl
Wed, 3 Jul 2002 11:05:11 +0200


Daniel,
I had a long look at it, and I think you're right: it's reasonable that 
the CFLAGS and CPPFLAGS from configure are treated the same way as 
LDFLAGS. This change, however, will affect any and all unix platform 
builds, so I'd like you to put the path in the sourceforge bug reporter. 
That way some other people can have a look at it.

I think your use case of adding your own "standard" location for extra 
libraries and such with CPPFLAGS=-I/foo/include LDFLAGS=-L/foo/lib is a 
good one.

On Wednesday, July 3, 2002, at 12:04 , Daniel Brotsky wrote:
> It's this "partially works" thing that's the problem, and I think it's 
> actually a python config bug (rather than, say, a dl bug).  The problem 
> is that the configure program fully uses the fooFLAGS environment 
> variables, so it correctly notices that the dl stuff is available (and 
> also that the dylib stuff is available because it's Darwin).  But 
> Makefile.pre.in doesn't take full advantage of configure, because while 
> it sets LDFLAGS to include the value of @LDFLAGS@ (from config), it 
> doesn't do the same with either CFLAGS or CPPFLAGS.  Thus there's a 
> mismatch between the settings at compile and link time, and this 
> mismatch breaks the build process.
>
> In an attempt to make this clear, I've attached a context diff of the 
> existing Makefile.pre.in and one that I've hacked to fix this mismatch 
> problem (and a separate problem involving the parser library not being 
> linked using the LDFLAGS).  The Python which builds as a result of 
> these changes seems to work just fine, passes the test suite, loads 
> dynamic modules OK, and hasn't displayed any of the dynamic loading 
> issues that were discussed on this list a few months ago.
>
> As I mentioned above, it's clear that Python can be built fine 
> *without* fixing this problem.  But it seems to me that it makes the 
> build process unnecessarily brittle for people with non-standard (but 
> working) build environments.
>
>     dan
>
>
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -