classification
Title: Warning building 2.7 on OS X 10.6 libintl.h "Present But Cannot Be Compiled"
Type: compile error Stage: resolved
Components: macOS Versions: Python 2.7
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: ned.deily, nicholas.riley, ronaldoussoren, ssteinerX
Priority: normal Keywords:

Created on 2010-01-12 03:50 by ssteinerX, last changed 2011-03-14 01:21 by nicholas.riley. This issue is now closed.

Messages (6)
msg97620 - (view) Author: Steve Steiner (ssteinerX) Date: 2010-01-12 03:50
I'm configuring with:

./configure --enable-framework --enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk/ --with-universal-archs=intel

And get the following warning.  It told me to report it, so I am.

checking libintl.h presence... yes
configure: WARNING: libintl.h: present but cannot be compiled
configure: WARNING: libintl.h:     check for missing prerequisite headers?
configure: WARNING: libintl.h: see the Autoconf documentation
configure: WARNING: libintl.h:     section "Present But Cannot Be Compiled"
configure: WARNING: libintl.h: proceeding with the preprocessor's result
configure: WARNING: libintl.h: in the future, the compiler will take precedence
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.python.org/ ##
configure: WARNING:     ## -------------------------------------- ##
msg97624 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-01-12 08:17
Works for me.

GNU gettext, which provides libintl, is not included in OS X 10.6.  Chances are your build is being contaminated by packages installed via MacPorts or Fink or in /usr/local.  If you do want to build with it, check config.log in your build directory.  I bet you'll find that it is trying to pick up a 32-bit only version from MacPorts or friends.
msg97627 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-01-12 09:18
As Ned noted you probably have installed GNU gettext in /usr/local and that copy does not contain both intel architectures (i386 and x86_64)

There's nothing we can do about that, I have tried to find a way to exclude non-system locations from the default compiler search path but haven't found those yet.
msg97648 - (view) Author: Steve Steiner (ssteinerX) Date: 2010-01-12 18:37
It's in /usr/local/include alright but I have no idea with which package it came in.  I don't use Fink or Macports.

If it's not going to wreck the build, maybe remove the "Report this to http://bugs.python.org/" instructions?
msg97941 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-01-17 12:39
Steve: the "report this..." message is generated by the configure script and is added by autoconf, AFAIK we cannot change that message.

That said: there is a problem on your system with a python build: configure now thinks that is has found a workable libintl.h, even though the file doesn't work when you try to compile.

The best workaround is to temporarily move /usr/local aside during the build.

I've added some text about this to Mac/README.
msg130782 - (view) Author: Nicholas Riley (nicholas.riley) * Date: 2011-03-14 01:21
You should be able to invoke the compiler like this:

gcc -nostdinc -I/usr/include -F/System/Library/Frameworks ...

which will remove /usr/local/include (and /Library/Frameworks).  This also removes the compiler-specific include dir, so to be fully general you could postprocess $CC -v output to just filter /usr/local/include - it looks like the Clang driver is GCC-compatible as far as -v output goes.

And in general, I guess this is really an Apple bug...
History
Date User Action Args
2011-03-14 01:21:40nicholas.rileysetnosy: + nicholas.riley
messages: + msg130782
2010-01-17 12:39:10ronaldoussorensetstatus: open -> closed

messages: + msg97941
stage: resolved
2010-01-12 18:37:39ssteinerXsetmessages: + msg97648
2010-01-12 09:18:03ronaldoussorensetresolution: works for me
messages: + msg97627
2010-01-12 08:17:21ned.deilysetnosy: + ned.deily
messages: + msg97624
2010-01-12 03:50:29ssteinerXcreate