Off debugging my Visiontek x1550 PCI board for the radeonhd developers and I need to run something called rhd_conntest. That requires
pciutils, which provides tools like lspci and friends, including a library of the function calls. The README says pciutils compiles on Solaris, but there's some assumptions about the tool chain, which are not well stated.
Getting it working
1. Download the
pciutils tarball and unroll it in your source tree
2. The configure script uses
sed to mash up some variables for the the lib/Makefile include
(config.mk), but Solaris sed falls down on the job. Fix the configure script to use
gsed, or have a functional sed in front of /usr/bin in the PATH variable.
3. The install program has problems with the constructs in the pciutils Makefile for targets install and install-lib. Just replace install with
ginstall, or make sure a GNU install is ahead of /usr/bin and /usr/ucb
(since /usr/ucb/install is much more aligned with open source "install programs", than /usr/bin/install) in your PATH variable.
4. The
libpci.pc.in prototype in pciutils-2.2.10/lib doesn't have Libs correctly set, so add "
-R${libdir}" to the line starting with
Libs:
5. gmake is required for pciutils, and you'll need to set
CC=gcc to make it compile on Solaris.
Once it gets installed, then I had to figure out how to get pkg-config to
pick it up, which turned out to be a simple:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
Since I'm working from a pristine environment.
This went pretty smooth given all things.