Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

pkg-config 0.27 configure error: "You must have either have gettext support in your C library, or use the GNU gettext library" #14109

Closed
kennknowles opened this issue Aug 10, 2012 · 13 comments

Comments

@kennknowles
Copy link
Contributor

This error occurs during the configure step of the internal glib, seemingly.

Here's an abbreviated transcript of the above brew install gist, inline for convenient reference:

$ brew install -v pkg-config

...

=== configuring in glib (/private/tmp/homebrew-pkg-config-0.27-qOV4/pkg-config-0.27/glib)

...

/configure: line 8473: ./po/POTFILES.in: No such file or directory
configure: error: 
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

configure: error: ./configure failed for glib
config.log was copied to /Users/kenn/Library/Logs/Homebrew
==> Build Environment
HOMEBREW_VERSION: 0.9.2
HEAD: 4fa691262c643c61e6659f9cbc346320fa678e23
CPU: dual-core 64-bit penryn
OS X: 10.7.4-x86_64
Xcode: 4.4

CLT: 1.0.0.9000000000.1.1249367152
X11: XQuartz 2.6.4 in /usr/X11
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7
CPPFLAGS: -I/usr/local/Cellar/gettext/0.18.1.1/include -isystem /usr/local/include
LDFLAGS: -L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib
MAKEFLAGS: -j2
MACOSX_DEPLOYMENT_TARGET: 10.7
ACLOCAL_PATH: /usr/local/Cellar/gettext/0.18.1.1/share/aclocal
OBJC: /usr/bin/clang
PATH: /usr/local/Cellar/gettext/0.18.1.1/bin:/usr/local/share/python:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Users/kenn/.rvm/bin:/usr/local/Library/Contributions/cmds
Error: Failed executing: ./configure --disable-debug --prefix=/usr/local/Cellar/pkg-config/0.27 --with-pc-path=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig --with-internal-glib (pkg-config.rb:18)
@adamv
Copy link
Contributor

adamv commented Aug 10, 2012

Xcode: 4.4
CLT: 1.0.0.9000000000.1.1249367152

This looks like a version mismatch; have you installed the latest Command Line Tools?

@kennknowles
Copy link
Contributor Author

Yes I have installed the latest Command Line Tools.

In response to this issue, I upgraded to XCode 4.4 and followed the command-line tool install procedure. Inside XCode 4.4 the current status is displayed as "installed".

What CLT version would indicate a proper configuration?

@kennknowles
Copy link
Contributor Author

I see via #13591 that perhaps it should be match the glob 4.4.* which makes my version seem really crazy. Any tips on removing old tools or pointing homebrew at the new ones would be appreciated.

@mistydemeo
Copy link
Member

I was helping someone with Xcode 4.4.1 which has CLT installed with that same version number. His system seemed to be okay.

Edit: Can you post your brew --config?

@2bits
Copy link
Contributor

2bits commented Aug 10, 2012

I had this problem when XCode-4.4 came out for Lion. Every time I went into Preferences, Downloads and clicked on Install, it would not overwrite my old CLT, and I was left with clang 3.1.318. The Install button is still there every time I restart XCode. I never solved it, and I tried all the things I could think of short of downloading the CLT from Apple Developer site. When I looked there, it wasn't online yet. I'm going to wipe it and do a clean 10.7.4 install.

@kennknowles
Copy link
Contributor Author

Sorry, I thought it was included in the above gists somehow. Here it is:

HOMEBREW_VERSION: 0.9.2
HEAD: 4fa691262c643c61e6659f9cbc346320fa678e23
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.7.4-x86_64
Xcode: 4.4
CLT: 1.0.0.9000000000.1.1249367152
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 4.0 build 421
MacPorts or Fink? false
X11: XQuartz 2.6.4 in /usr/X11
System Ruby: 1.8.7-357
Which Perl:   /usr/bin/perl
Which Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.2/bin/python
Which Ruby:   /usr/local/bin/ruby => /usr/local/Cellar/ruby/1.9.3-p0/bin/ruby

@2bits
Copy link
Contributor

2bits commented Aug 10, 2012

You have clang-4.0.421. That's good. You're probably ok. I have a mismatch though.

Xcode: 4.4
CLT: 4.3.0.0.1.1249367152

EDIT: I was just able to install the CLT from within XCode on Lion. Now I have

Xcode: 4.4
CLT: 4.4.0.0.1.1249367152
Clang: 4.0 build 421

Go figure.

@2bits
Copy link
Contributor

2bits commented Aug 10, 2012

On the subject of pkg-config failing the glib install, please

brew install -vd pkg-config
cat glib/config.log | pbcopy

and paste that glib log into a gist. Thanks.

@kennknowles
Copy link
Contributor Author

I just got hasty about wiping out old stuff:

  • /Library/Developer/Shared/uninstall-devtools
  • /Library/Developer/4.2.1/uninstall-devtools
  • Upgraded to 4.4.1 via app store (btw same result with no command-line tools installed)
  • Installed command-line tools from preferences pane
  • brew doctor warned about unlinked autoconf automake
  • brew link autoconf automake (after reading Xcode 4.3 doesn't include autoconf #10349) which made brew doctor 100% happy again.

Repeat... same error.

$ brew --config
HOMEBREW_VERSION: 0.9.2
HEAD: 4fa691262c643c61e6659f9cbc346320fa678e23
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.7.4-x86_64
Xcode: 4.4.1
CLT: 4.4.0.0.1.1249367152
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 4.0 build 421
MacPorts or Fink? false
X11: XQuartz 2.6.4 in /usr/X11
System Ruby: 1.8.7-357
Which Perl:   /usr/bin/perl
Which Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.2/bin/python
Which Ruby:   /usr/local/bin/ruby => /usr/local/Cellar/ruby/1.9.3-p0/bin/ruby

@kennknowles
Copy link
Contributor Author

gist of glib/config.log: https://gist.github.com/3316245

@2bits
Copy link
Contributor

2bits commented Aug 10, 2012

configure:7823: checking for libintl.h
configure:7823: result: no
configure:8478: error:
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

It looks like you need to

brew rm -f gettext
brew install gettext

and tell us whether it installs gettext correctly. If so, then you should have libintl.

$ brew list gettext | grep libintl.dylib
/usr/local/Cellar/gettext/0.18.1.1/lib/libintl.dylib

If so, then when you brew install -vd pkg-config and it shells out to a command prompt, gist the output of

set

Thanks.

@2bits
Copy link
Contributor

2bits commented Aug 10, 2012

After examining my own glib/config.log I can see that the problem is higher up than glib. I found that your glib configure script is not getting the correct flags.

Yours:

$ ./configure --disable-option-checking --prefix=/usr/local/Cellar/pkg-config/0.27 --disable-debug --with-pc-path=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig --with-internal-glib --cache-file=/dev/null --srcdir=.

Mine (which has CFLAGS and LDFLAGS passed in the command):

$ ./configure --disable-option-checking --prefix=/usr/local/Cellar/pkg-config/0.27 --disable-debug --with-pc-path=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig --with-internal-glib CC=/usr/bin/clang CFLAGS=-Os -w -pipe -march=native -Xclang -target-feature -Xclang -aes -Qunused-arguments -mmacosx-version-min=10.8 LDFLAGS=-L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib CPPFLAGS=-I/usr/local/Cellar/gettext/0.18.1.1/include -isystem /usr/local/include --cache-file=/dev/null --srcdir=.

I'll look at your pkg-config logs a bit more to see I anything sticks out now that I know this. I still need to see the output of set.

@kennknowles
Copy link
Contributor Author

$ brew rm -f gettext
$ brew install gettext

(gist of output, which has the usual "Keg-only" caveat: https://gist.github.com/3316978)

$ brew list gettext | grep libintl.dylib
/usr/local/Cellar/gettext/0.18.1.1/lib/libintl.dylib
$ brew install pkg-config

Happiness follows :-)

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants