Giter VIP home page Giter VIP logo

Comments (8)

sjackman avatar sjackman commented on May 23, 2024

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 PKG_CONFIG_LIBDIR environment variable. If you come up with a fix, please submit a pull request, and I'll incorporate it once I've returned.

https://github.com/Homebrew/linuxbrew/blob/linuxbrew/Library/Homebrew/extend/ENV/std.rb#L39
https://github.com/Homebrew/linuxbrew/blob/linuxbrew/Library/Homebrew/extend/ENV/std.rb#L96

Cheers,
Shaun

from legacy-linuxbrew.

agordon avatar agordon commented on May 23, 2024

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.
To comments in the code explicitly mention "overriding the built-in paths" on purpose.
Perhaps adding several hard-coded paths for common linuxes? That will be ugly - but I don't know of a way to query "pkg-config" about the PATHs it will look it.

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

from legacy-linuxbrew.

villimagg avatar villimagg commented on May 23, 2024

Thank you. Will do that. Hope it goes well with finding a permanent
solution. I'll try to help as I can although I'm not a *nix expert.

On Wed, Jan 8, 2014 at 2:02 AM, A. Gordon [email protected] wrote:

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.
To comments in the code explicitly mention "overriding the built-in paths"
on purpose.
Perhaps adding several hard-coded paths for common linuxes? That will be
ugly - but I don't know of a way to query "pkg-config" about the PATHs it
will look it.

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


Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-31799686
.

kv.
m.v.h.
regards,

Vilhjálmur Magnússon

from legacy-linuxbrew.

villimagg avatar villimagg commented on May 23, 2024

Alright, I'm running Fedora 20 64 bit and I've got two directories containing .pc files. Running whereis pkconfig in terminal gives me: pkgconfig: /usr/lib64/pkgconfig /usr/share/pkgconfig. The file bash-completion.pc lives inside my /usr/share/pkgconfig folder.

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. PKG_CONFIG_PATH= /usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH

from legacy-linuxbrew.

agordon avatar agordon commented on May 23, 2024

@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.

from legacy-linuxbrew.

villimagg avatar villimagg commented on May 23, 2024

That fixed it for me. Since people are running different linux distros one can run which pkconfig at terminal prompt and use the paths given to add to the PKG_CONFIG_PATH in their .bashrc.

In my case since I'm running Fedora 20 64 bit, when I run which pkgconfig in terminal I'm given:

$ which pkgconfig
pkgconfig: /usr/lib64/pkgconfig /usr/share/pkgconfig

I then run

$ echo "export PKG_CONFIG_PATH=\"/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH\"" >> .bashrc

BUT
After I've logged back in again and open a terminal and run $ which pkgconfig again I get this:

$ which pkgconfig
/usr/bin/which: no pkgconfig in (/home/vmag/.rbenv/shims:/home/vmag/.linuxbrew/bin:/home/vmag/.rbenv/shims:/home/vmag/.linuxbrew/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/vmag/.local/bin:/home/vmag/bin)

/usr/bin/which: no pkgconfig in... Now what is that?

from legacy-linuxbrew.

sjackman avatar sjackman commented on May 23, 2024

@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 --env=inherit option in Linuxbrew. This option indicates that system environment variables should be inherited and extended rather than overridden. So, please do use that option for your fix to pkgconfig. I'll review it and merge it when I'm back at the end of the month.

from legacy-linuxbrew.

sjackman avatar sjackman commented on May 23, 2024

Set PKG_CONFIG_PATH and/or PKG_CONFIG_LIBDIR and use --env=inherit.

from legacy-linuxbrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.