ld: cannot find -lprocps | 0.6.2 @ openSUSE

Bug #1275486 reported by DAP

This bug report was converted into a question: question #243221: ld: cannot find -lprocps | 0.6.2 @ openSUSE.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
I-Nex
Invalid
Undecided
Unassigned

Bug Description

> rpm -ql procps-devel libprocps1
/usr/include/proc
/usr/include/proc/alloc.h
/usr/include/proc/devname.h
/usr/include/proc/escape.h
/usr/include/proc/procps.h
/usr/include/proc/pwcache.h
/usr/include/proc/readproc.h
/usr/include/proc/sig.h
/usr/include/proc/slab.h
/usr/include/proc/sysinfo.h
/usr/include/proc/version.h
/usr/include/proc/wchan.h
/usr/include/proc/whattime.h
/usr/lib64/libprocps.so
/usr/lib64/pkgconfig/libprocps.pc
/usr/lib64/libprocps.so.1
/usr/lib64/libprocps.so.1.1.2

[ 9s] + cd I-Nex-0.6.2
[ 9s] + make V=1 -j2
[ 9s] Compile edid-decode as inex-decode
[ 9s] gcc -o i-nex-edid JSON/edid-decode.c -g -Wall -O2
[ 9s] JSON/edid-decode.c: In function 'detailed_block':
[ 9s] JSON/edid-decode.c:194:8: warning: 'width' may be used uninitialized in this function [-Wmaybe-uninitialized]
[ 9s] printf(" %dx%d @ ( %s%s%s%s%s) Hz (%s%s preferred)\n", width, height,
[ 9s] ^
[ 9s] JSON/edid-decode.c:155:9: note: 'width' was declared here
[ 9s] int width, height;
[ 9s] ^
[ 10s] JSON/edid-decode.c: In function 'main':
[ 10s] JSON/edid-decode.c:1656:26: warning: 'conformant_extension' may be used uninitialized in this function [-Wmaybe-uninitialized]
[ 10s] nonconformant_extension += parse_extension(x);
[ 10s] ^
[ 10s] JSON/edid-decode.c:110:11: warning: 'v' may be used uninitialized in this function [-Wmaybe-uninitialized]
[ 10s] printf("%s%s: %s (%d)\n", prefix, field->name, v->description, val);
[ 10s] ^
[ 10s] JSON/edid-decode.c:95:19: note: 'v' was declared here
[ 10s] struct value *v;
[ 10s] ^
[ 10s] JSON/edid-decode.c:1630:13: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
[ 10s] printf(" %dx%d@%dHz\n", x, y, refresh);
[ 10s] ^
[ 10s] JSON/edid-decode.c:1417:7: warning: 'ofd' may be used uninitialized in this function [-Wmaybe-uninitialized]
[ 10s] write(ofd, edid, edid_lines * 16);
[ 10s] ^
[ 11s] gcc -o i-nex-cpuid JSON/cpu.c -static -I/usr/include/libcpuid -lcpuid -O2
[ 12s] gcc -o i-nex-usage JSON/free.c -static -lprocps -O2
[ 12s] /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lprocps
[ 12s] collect2: error: ld returned 1 exit status

Revision history for this message
eloaders (eloaders) wrote :

Try to use:

pkg-config libprocps --cflags --libs

or

-lproc

Revision history for this message
DAP (darkness) wrote :

> pkg-config libprocps --cflags --libs
-lprocps

Where should it be added?

Revision history for this message
eloaders (eloaders) wrote :

gcc -o program program.c `pkg-config libprocps --cflags --libs`

Revision history for this message
DAP (darkness) wrote :

dhcppc5:~/rpmbuild> gcc -o program raw.cpp `pkg-config libprocps --cflags --libs`
dhcppc5:~/rpmbuild> ls
BUILD BUILDROOT OTHER RPMS SOURCES SPECS SRPMS program raw.cpp

Revision history for this message
DAP (darkness) wrote :

dhcppc5:~/rpmbuild> ldd program
        linux-vdso.so.1 (0x00007fff1333f000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fe172bd2000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fe172f81000)

Revision history for this message
eloaders (eloaders) wrote :

I wrote a guide. Example of how to use the pkgconfig. I have no idea which way they go your actions.

Refer to the Makefile

Changed in i-nex:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.