Compilation Error for an application

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
ophouddin22
Ronin
Ronin
Posts: 1
Joined: 03 Feb 2015, 03:31
Distribution: Porteus
Location: san jose

Compilation Error for an application

Post#1 by ophouddin22 » 03 Feb 2015, 03:33

I was trying to compile an application on porteus linux

gcc -Wall -O xyz.c -lpci -o xyz

/usr/lib/gcc/i486-slackware-linux/4.8.2/../../../../i486-slackware-linux/bin/ld: cannot find -lpci
collect2: error ld returned 1 exit status

When I run the command on porteus linux. I get the following thing

root@porteus: locate libpci

/usr/lib/libpci.so
/usr/lib/pkgconfig/libpci.pc
/usr/lib/libpciaccess.la
/usr/lib/libpciaccess.so
/usr/lib/libpciaccess.so.0
/usr/lib/libpciaccess.so.0.11.1
/var/log/packages/libpciaccess-0.13.2-i486-1

Can you please help me resolve this.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4613
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Compilation Error for an application

Post#2 by fanthom » 04 Feb 2015, 16:14

hi ophouddin22,

you need statically linked libpci (such libs are removed from porteus) so please install 'pciutils' package through USM and all should be good.
Please add [Solved] to your thread title if the solution was found.

Post Reply