Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.96k stars 11.35k forks source link

Error: pkg-config binary 'pkg-config' not found #19904

Closed ericeche closed 11 years ago

ericeche commented 11 years ago

When running the following brew command

brew install qemu --use-gcc

I get the following error

Error: pkg-config binary 'pkg-config' not found

========== Brew Doctor ================= Warning: Your Xcode (4.6.1) is outdated Please install Xcode 4.6.2.

===========Brew Config =================

HOMEBREW_VERSION: 0.9.4 ORIGIN: https://github.com/mxcl/homebrew HEAD: dad5917f6bd3ee86d6a9e26b99761da2e268c6be HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar CPU: quad-core 64-bit ivybridge OS X: 10.8.3-x86_64 Xcode: 4.6.1 CLT: 4.6.0.0.1.1365549073 LLVM-GCC: build 2336 Clang: 4.2 build 425 X11: N/A System Ruby: 1.8.7-358 Perl: /usr/bin/perl Python: /usr/bin/python Ruby: /Users/ericeche/.rvm/rubies/jruby-1.7.3/bin/ruby => /Users/ericeche/.rvm/rubies/jruby-1.7.3/bin/jruby

mistydemeo commented 11 years ago

Have you followed the steps in the troubleshooting guide?

Can you please post the full logs from ~/Library/Logs/Homebrew/qemu to a gist?

ericeche commented 11 years ago

Hi ,

Here is the gits

https://gist.github.com/ericeche/5603158

Thanks Eric

ericeche commented 11 years ago

In a Nutshell, Start Simple


brew install qemu --env=std --use-gcc

After 10 minutes...sucess is in your way


ln -s ../../../Cellar/qemu/1.1.0/share/man/man8/qemu-nbd.8 qemu-nbd.8
ln -s ../../../Cellar/qemu/1.1.0/share/man/man1/qemu.1 qemu.1
ln -s ../../../Cellar/qemu/1.1.0/share/man/man1/qemu-img.1 qemu-img.1
ln -s ../../Cellar/qemu/1.1.0/share/doc/qemu qemu
ln -s ../../Cellar/qemu/1.1.0 qemu
ln -s ../Cellar/qemu/1.1.0 qemu
==> Summary
 /usr/local/Cellar/qemu/1.1.0: 103 files, 71M, built in 10.8 minutes

Did it install ?


ulib-dlp1252:qemu ericeche$ qemu-
qemu-img                  qemu-system-lm32          qemu-system-mipsel        qemu-system-sparc
qemu-io                   qemu-system-m68k          qemu-system-ppc           qemu-system-sparc64
qemu-nbd                  qemu-system-microblaze    qemu-system-ppc64         qemu-system-x86_64
qemu-system-alpha         qemu-system-microblazeel  qemu-system-ppcemb        qemu-system-xtensa
qemu-system-arm           qemu-system-mips          qemu-system-s390x         qemu-system-xtensaeb
qemu-system-cris          qemu-system-mips64        qemu-system-sh4
qemu-system-i386          qemu-system-mips64el      qemu-system-sh4eb

Yes it did.

ericeche commented 11 years ago

Installing QEMU on OS X - When brew install qemu --use-gcc Fails

Follow the Gods First

First go and travel the road others have already paved for you :

Qemu on OSX

Assuming in you did the following steps :

1.


$: cd /usr/local/ # Or wherever you installed Homebrew.
$: git checkout 2b7b4b3 Library/Formula/qemu.rb

2.


$: brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb

3.


brew install qemu --use-gcc

Things Start Diverging


ulib-dlp1252:2.36.2 ericeche$ brew install qemu --use-gcc
Warning: Your Xcode (4.6.1) is outdated
Please install Xcode 4.6.2.
==> Downloading http://wiki.qemu.org/download/qemu-1.1.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/qemu-1.1.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/qemu/1.1.0 --cc=cc --host-cc=cc --enable-cocoa --disable-bsd-user --disa
Error: pkg-config binary 'pkg-config' not found

Now you go back to the net, and spend about 4 hours tryng to fix the pkg-config path. Then you try to troubleshoot the pkgconfig directory config path, and start doubting if you can really install qemu in your OSX. Next logical approach is to get more output about the problem


ulib-dlp1252:2.36.2 ericeche$  HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install qemu --use-gcc
Warning: Your Xcode (4.6.1) is outdated
Please install Xcode 4.6.2.
==> Downloading http://wiki.qemu.org/download/qemu-1.1.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/qemu-1.1.0.tar.bz2
tar xf /Library/Caches/Homebrew/qemu-1.1.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/qemu/1.1.0 --cc=cc --host-cc=cc --enable-cocoa --disable-bsd-user --disable-guest-agent
./configure --prefix=/usr/local/Cellar/qemu/1.1.0 --cc=cc --host-cc=cc --enable-cocoa --disable-bsd-user --disable-guest-agent
Error: pkg-config binary 'pkg-config' not found
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: 911ded019f3d686c6f93944e6b66243d93e65ad7
CPU: quad-core 64-bit ivybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.1
CLT: 4.6.0.0.1.1365549073
X11: N/A
==> ENV
HOMEBREW_CC: clang
MAKEFLAGS: -j1
CMAKE_PREFIX_PATH: /usr/local/opt/gettext:/usr/local/opt/libffi:/usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/opt/libtasn1/lib/pkgconfig:/usr/local/opt/p11-kit/lib/pkgconfig:/usr/local/opt/nettle/lib/pkgconfig:/usr/local/opt/gnutls/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/glib/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.8
HOMEBREW_MAKE_JOBS: 1
ACLOCAL_PATH: /usr/local/opt/gettext/share/aclocal:/usr/local/share/aclocal
OBJC: cc
PATH: /usr/local/Library/ENV/4.3:/usr/local/opt/jpeg/bin:/usr/local/opt/libtasn1/bin:/usr/local/opt/p11-kit/bin:/usr/local/opt/nettle/bin:/usr/local/opt/gnutls/bin:/usr/local/opt/gettext/bin:/usr/local/opt/glib/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: qemu did not build
Logs:       /Users/ericeche/Library/Logs/Homebrew/qemu/config.log

brew doctor is fine and the config.log spits compiling errors beyond understanding....…and so begins dependency hell. This is the magic moment where you’re standing outside a rabbit hole on the precipice of Wonderland, wondering whether to chase the rabbit, or just move onto another project. Well, having traveled this wilderness before, clear choice is ask for help. You will need to send the above info and much more to

Cry for help here

In a Nutshell, Start Simple


brew install qemu --env=std --use-gcc

After 10 minutes...sucess is in your way


ln -s ../../../Cellar/qemu/1.1.0/share/man/man8/qemu-nbd.8 qemu-nbd.8
ln -s ../../../Cellar/qemu/1.1.0/share/man/man1/qemu.1 qemu.1
ln -s ../../../Cellar/qemu/1.1.0/share/man/man1/qemu-img.1 qemu-img.1
ln -s ../../Cellar/qemu/1.1.0/share/doc/qemu qemu
ln -s ../../Cellar/qemu/1.1.0 qemu
ln -s ../Cellar/qemu/1.1.0 qemu
==> Summary
 /usr/local/Cellar/qemu/1.1.0: 103 files, 71M, built in 10.8 minutes

Did it install ?


ulib-dlp1252:qemu ericeche$ qemu-
qemu-img                  qemu-system-lm32          qemu-system-mipsel        qemu-system-sparc
qemu-io                   qemu-system-m68k          qemu-system-ppc           qemu-system-sparc64
qemu-nbd                  qemu-system-microblaze    qemu-system-ppc64         qemu-system-x86_64
qemu-system-alpha         qemu-system-microblazeel  qemu-system-ppcemb        qemu-system-xtensa
qemu-system-arm           qemu-system-mips          qemu-system-s390x         qemu-system-xtensaeb
qemu-system-cris          qemu-system-mips64        qemu-system-sh4           
qemu-system-i386          qemu-system-mips64el      qemu-system-sh4eb 

Yes it did.

References


ulib-dlp1252:qemu ericeche$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: dad5917f6bd3ee86d6a9e26b99761da2e268c6be
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.1
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /Users/ericeche/.rvm/rubies/jruby-1.7.3/bin/ruby => /Users/ericeche/.rvm/rubies/jruby-1.7.3/bin/jrub
golergka commented 10 years ago

I tried everything, and still, here I am:

brew install qemu --env=std --use-gcc
==> Downloading http://wiki.qemu.org/download/qemu-1.1.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/qemu-1.1.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/qemu/1.1.0 --cc=/usr/bin/clang --host-cc=/usr/bin/clang --enable-cocoa --disable-bsd-user --disable-guest-agent
==> make install
1 error generated.
make: *** [qemu-nbd.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
make: *** [osdep.o] Error 1

Any ideas?

mistydemeo commented 10 years ago

@golergka Please read the troubleshooting guide, follow all instructions, and open a new issue with the requested diagnostics. Thanks!