-
Notifications
You must be signed in to change notification settings - Fork 296
LinuxBrew overrides PKG_CONFIG_LIBDIR #47
Comments
Hi, Gordon. @villimagg is also experiencing this issue in #46. I leave for a conference on Friday and won't be able to look into this issue until February. Here's where Homebrew sets the https://github.com/Homebrew/linuxbrew/blob/linuxbrew/Library/Homebrew/extend/ENV/std.rb#L39 Cheers, |
There's some interplay between PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH, which I'm not yet familiar with - so I don't have a ready solution. As a temporary work around, setting "PKG_CONFIG_PATH" before running "brew install" does solve it: $ export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/:$PKG_CONFIG_PATH
$ brew install XXXX |
Thank you. Will do that. Hope it goes well with finding a permanent On Wed, Jan 8, 2014 at 2:02 AM, A. Gordon notifications@github.com wrote:
kv. Vilhjálmur Magnússon |
Alright, I'm running Fedora 20 64 bit and I've got two directories containing .pc files. Running Wouldn't it be wise for me to add the PKG_CONFIG_PATH variable to my .bashrc file and concatenate the two paths into the PATH? e.g. |
@villimagg - yes, you can add those directories to PKG_CONFIG_PATH in "~/.bashrc", and it should "just work". @sjackman - Perhaps it's worth considering not overriding "PKG_CONFIG_LIBDIR" at all for LinuxBrew? Because on a "standard" linux, the system's native pkg-config installed and knows about all the different location? (as opposed to MacOS/HomeBrew, where the assumption is that pkg-config is not native) ? And then, instead of overriding "PKG_CONFIG_LIBDIR", just append LinuxBrew's specific paths to PKG_CONFIG_PATH ? I can send a patch for that, if this method is acceptable. |
That fixed it for me. Since people are running different linux distros one can run In my case since I'm running Fedora 20 64 bit, when I run
I then run
BUT
|
@agordon The Homebrew policy has always been to override any and every relevant environment variable. I can't say that I agree with that fully, but I don't want to override that policy on a piecemeal basis. For this reason, we created the |
Set PKG_CONFIG_PATH and/or PKG_CONFIG_LIBDIR and use |
Hello,
I encountered a strange conflict, regarding using a system-wide installed library through LinuxBrew+pkg-config - it seems LinuxBrew overrides PKG_CONFIG_LIBDIR, and so the native pkg-config can't find system-wide directories.
My setup:
Debian 7,
/usr/bin/pkg-config
works fine,Some packages have "PC" files in
/usr/lib/x86_64-linux-gnu/pkgconfig/
while others are in/usr/lib/pkgconfig
- perhaps this is a new Debian thing?Example 1:
$ dpkg -L libfftw3-dev | grep pc /usr/lib/x86_64-linux-gnu/pkgconfig/fftw3f.pc /usr/lib/x86_64-linux-gnu/pkgconfig/fftw3.pc /usr/lib/x86_64-linux-gnu/pkgconfig/fftw3l.pc $ pkg-config --libs --print-errors fftw3 -lfftw3 -lm
Example 2:
pkg-config
by default searches both directories (without using ENV variables):When I build a package (with
./configure
) outside LinuxBrew, it works just fine.Inside LinuxBrew, it fails by not finding
fftw3
.I can reproduce with the following formula:
When running it, the output is:
Which shows that LinuxBrew added
PKG_CONFIG_LIBDIR
, and this messes up the default locations for debian (the--list-all
doesn't show all the system packages).What would be a recommended way to solve this?
Thanks,
-Gordon
The text was updated successfully, but these errors were encountered: