Subject: pkgconfig and pkgviews
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 04/27/2004 00:20:05
I received the following when trying to build wm/obconf:

checking for pkg-config... /usr/pkg/bin/pkg-config
checking for obrender-3.0 obparser-3.0... gnome-config: not found
gnome-config: not found
Package obrender-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `obrender-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'obrender-3.0' found

configure: error: Library requirements (obrender-3.0 obparser-3.0) not
met; consider adjusting the PKG_CONFIG_PATH environment variable if your
libraries are in a nonstandard prefix so pkg-config can find them.
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/wm/obconf


I do have /usr/pkg/lib/pkgconfig/obrender-3.0.pc.

I have:

$ /usr/pkg/bin/pkg-config --version
0.15.0


reed@tahoma:/usr/pkgsrc/wm/obconf$ /usr/pkg/bin/pkg-config --print-errors
--debug --exists "obrender-3.0 obparser-3.0"
Option --debug seen
Option --exists seen
Error printing disabled by default, value of --print-errors: 1
Error printing enabled
Scanning directory '/usr/pkg/packages/pkgconfig-0.15.0/lib/pkgconfig'
Ignoring file '.' in search directory; not a .pc file
Ignoring file '..' in search directory; not a .pc file
Looking for package 'obrender-3.0'
Looking for package 'obrender-3.0-uninstalled'
Looking for 'obrender-3.0' using legacy -config scripts
Calling gnome-config
gnome-config: not found
Package obrender-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `obrender-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'obrender-3.0' found


I am not using pkgviews for obconf (because XFree86-libs is not pkviews
enabled yet), but pkgviews was used to install pkgconfig.

Notice below the "Scanning directory"

$ /usr/pkg/bin/pkg-config --print-errors
--debug --exists "obrender-3.0 obparser-3.0"
Option --debug seen
Option --exists seen
Error printing disabled by default, value of --print-errors: 1
Error printing enabled
Scanning directory '/usr/pkg/packages/pkgconfig-0.15.0/lib/pkgconfig'
Ignoring file '.' in search directory; not a .pc file
Ignoring file '..' in search directory; not a .pc file
Looking for package 'obrender-3.0'
Looking for package 'obrender-3.0-uninstalled'
Looking for 'obrender-3.0' using legacy -config scripts
Calling gnome-config
gnome-config: not found
Package obrender-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `obrender-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'obrender-3.0' found

That /usr/pkg/packages/pkgconfig-0.15.0/lib/pkgconfig/ directory is empty.

The real directory:

$ ls -l /usr/pkg/lib/pkgconfig/ | wc -l
      35


So looking at pkgconfig source code, if the environment variable is not
set it defaults to PKGLIBDIR which is pkglibdir (in Makefile) which is
$(libdir)/@PACKAGE@ (in Makefile.in)

That Makefile.in should be patched to be ${LOCALBASE}/lib/@PACKAGE@ or
use "configure --libdir=${LOCALBASE}/lib"

Any thoughts on this?

   Jeremy C. Reed
   http://bsd.reedmedia.net/