gcc -o try -O2 -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -L/usr/local/lib -L/opt/local/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat --> error while loading shared libraries: libgdbm_compat.so.3: cannot open shared object file: No such file or directory
1
2
[~] # cat /proc/version
Linux version 2.6.33.2 (root@NasX86-4) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Wed Dec 5 08:01:11 CST 2012
1
2
3
[~] # strings /lib/libc.so.6 |grep 'GNU C'
GNU C Library stable release version 2.6.1, by Roland McGrath et al.
Compiled by GNU CC version 4.2.1 (Ubuntu 4.2.1-5ubuntu4).
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
31
32
Checking for optional libraries...
No -lsfio.
No -lsocket.
No -linet.
Found -lnsl (shared).
No -lnm.
No -lndbm.
Found -lgdbm (shared).
No -ldbm.
Found -ldb (shared).
No -lmalloc.
Found -ldl (shared).
No -ldld.
No -lld.
No -lsun.
Found -lm (shared).
Found -lcrypt (shared).
No -lsec.
Found -lutil (shared).
Found -lc (shared).
No -lcposix.
No -lposix.
No -lucb.
No -lBSD.
Found -lgdbm_compat (shared).
In order to compile perl5 on your machine, a number of libraries
are usually needed. Include any other special libraries here as well.
Say "none" for none. The default list is almost always right.
What libraries to use?
[-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat]
2013-03-06T13:56:17 MarkusHCode: (dl )1
2
3
4
5
6
7
8
9...
Found -lgdbm_compat (shared).
In order to compile perl5 on your machine, a number of libraries
are usually needed. Include any other special libraries here as well.
Say "none" for none. The default list is almost always right.
What libraries to use?
[-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat]
Es wird lgdbm_compat gefunden. Das passt dann irgendwie nicht mit der gcc-Fehlermeldung aus dem ersten Post zusammen.