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

gobject-introspection-1.0.pc causes failures due to libffi dependency #9911

Closed
grimmy opened this issue Feb 1, 2012 · 6 comments
Closed

Comments

@grimmy
Copy link

grimmy commented Feb 1, 2012

I'm trying to compile some of my own software that depends gobject-introspection (which was just added), however, it depends on libffi, which is a key-only package, which means no libffi.pc gets linked in /usr/local/lib/pkg-config. Looking for suggestions/fixes.

@jacknagel
Copy link
Contributor

You can add the libffi pkgconfig directory to your PKG_CONFIG_PATH, it should be HOMEBREW_CELLAR/libffi/<version>/lib/pkgconfig

(In Homebrew, this is done automatically when something in a formula's dependency tree is keg-only.)

@jacknagel
Copy link
Contributor

Or more robustly

$(brew --prefix libffi)/lib/pkgconfig

@grimmy
Copy link
Author

grimmy commented Feb 1, 2012

ah cool that's a lot easier than I thought it'd be :) Any suggestions for how to detect that I'm building against brew installed software?

@grimmy
Copy link
Author

grimmy commented Feb 1, 2012

I think I've come to a decent solution. Use "which pkg-config" to find it's path, and then see if it's a symlink that's in /usr/local//Cellar. and if so, then add the libffi prefix to PKG_CONFIG_PATH.

Does this sound reasonable?

@jacknagel
Copy link
Contributor

Makes sense.

@grimmy
Copy link
Author

grimmy commented Feb 1, 2012

Cool, wasn't sure if an environment variable or something got set. If so I'd prefer to use that, but this will work. Thanks again!

@grimmy grimmy closed this as completed Feb 1, 2012
@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants