3

So here is my PKG_CONFIG_PATH contents:

/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

and here is the output of locate lv2.pc (lv2 is the library I'm trying to link with)

/usr/local/lib/pkgconfig/lv2.pc

yet here is the output of pkg-config --modversion lv2

Package lv2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `lv2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lv2' found

Any advice? I'm running gentoo fyi. Thanks in advance for any help!!

3

The manual says differently, you can specify multiple paths for PKG_CONFIG_PATH

From man-pkgconfig

PKG_CONFIG_PATH A colon-separated (on Windows, semicolon-separated) list of directories to search for .pc files. The default directory will always be searched after searching the path;

No so for PKG_CONFIG_LIBDIR however.

PKG_CONFIG_LIBDIR Replaces the default pkg-config search directory.

1

PkgConfig can only understand one location of a folder in the variable, not like PATH's syntax. You need to set it to the one where the location of all of your .pc files are, sadly.

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
1
  • 2
    This may have changed since 2013, but the current pkg-config manpage says that PKG_CONFIG_PATH is a colon-delimited (UNIX) / semicolon-delimited (Windows) list of paths to search. So if you had, say, Qt pkgconfig dir in ~/dev/qt/5.6/lib/pkgconfig and grpc pkgconfig in /usr/local/lib/pkgconfig, you could export PKG_CONFIG_PATH=~/dev/qt/5.6/lib/pkgconfig:/usr/local/lib/pkgconfig. Works for me. Jan 7 '17 at 5:01
0

/usr/local/lib is a red herring, why is the file in there and not in /usr/lib?

emerge media-libs/lv2

2
  • I figured it out a while ago actually, sorry for not updating my progress. I found out that the variable doesn't understand PATH syntax, it can only take in the location of one folder. But anyway, for this program (non) it uses bleeding-edge version of lv2, so I had to install latest from svn. Before it did work (when emerged, not compiled from source), probably because it was in /usr/lib rather than /usr/local/lib. Why did this become a red herring? May 29 '13 at 22:15
  • Because it is non Portage, there's =media-libs/lv2-9999 in the pro-audio overlay. May 30 '13 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.