Page 1 of 1

Compilation Error for an application

Posted: 03 Feb 2015, 03:33
by ophouddin22
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.

Re: Compilation Error for an application

Posted: 04 Feb 2015, 16:14
by fanthom
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.