This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author koobs
Recipients enchanter, koobs
Date 2014-02-04.09:58:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The issue applies and is reproducible for all versions 2.6 through 3.5.

This is the changeset we applied to all FreeBSD Ports to fix the issue:

One specific example (Python 3.3):

1) Use CPPFLAGS over CFLAGS (See before *and* after comments):

2) Revert the absolutely crazy complexity in by stripping out CONFIGURE_*, allowing once again
./configure to substitute the right variables based on what has been passed to it:

This results in:
  PY_CPPFLAGS=    $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CPPFLAGS) <-- YAY
  CPPFLAGS=       -I/usr/local/include - YAY!
  PY_CPPFLAGS=    $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CPPFLAGS) <-- YAY!

The root cause *requiring* the use of CPPFLAGS, is PY_CFLAGS before PY_CPPFLAGS here:


As per

"Put CFLAGS last in the compilation command, after other variables containing compiler options, so the user can use CFLAGS to override the others."

We must use CPPFLAGS, because CFLAGS has been broken in one way or another for a long time. The target state is *both* must just work.

This can only happen if the standard user-serviceable autoconf and Makefile variables are left alone, not extended or overridden, and behave in exactly the same way whether provided in the environment for *either* ./configure, make, or *both*.

For the most recent chapter in the C[PP|LD]FLAGS/Makefile book, see: 92a9dc668c95 from #9189 which was sound in intent, but in execution left us deeper down the rabbit-hole.

Moving forward and as a first step, what does everyone think of switching the order of

I hope (but I'm not holding my breath) that nothing relies on the current ordering.
Date User Action Args
2014-02-04 09:58:53koobssetrecipients: + koobs, enchanter
2014-02-04 09:58:53koobssetmessageid: <>
2014-02-04 09:58:53koobslinkissue6299 messages
2014-02-04 09:58:52koobscreate