The Bent Zone, AKA Sun Tzu Tech
Weblog
Archives
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today
XML
Search

Links
Referrers

Today's Page Hits: 8

« Compiling radeonhd... | Main | Arbitrary Comparison... »
20080327 Thursday March 27, 2008
Compiling pciutils (lspci) on Solaris X86


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.

Mar 27 2008, 02:26:04 AM EDT Permalink

Comments:

Post a Comment:

Comments are closed for this entry.