From: Nikola Milutinovic <Nikola.Milutinovic () ev ! co ! yu>
To: tru64-unix-managers
Subject: SUMMARY: (INCONCLUSIVE) Linking problems on T64 UNIX 4.0F
Date: Tue, 29 Aug 2000 06:42:20 +0000 [thread overview]
Message-ID: <96753115708549.tru64-unix-managers.marc@archive.invalid> (raw)
Hi folks.
I still haven't solved the problem, but have got a couple of responses.
Thanks to:
Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
Frank Wortner <frank@bondnet.com>
Sleepycat Software Support <support@sleepycat.com>
People sugested that replacing original sh_libs is a bad idea. I have
verified that, IT IS A BAD IDEA. libsecurity.so depends on libdb.so and
when I removed that, I couldn't login.
All of them sugested I use -oldstyle_liblookup while linking. It didn't
help. Here is what it boild down to:
test.c
----------------
int db_create();
int main() {
db_create();
return 0;
}
----------------
/usr/shlib/libdb.so original DEC's (v1.85, AFAIK)
/usr/local/lib/libdb.so -> libdb-3.0.so
/usr/local/lib/libdb-3.so -> libdb-3.0.so
/usr/local/lib/libdb-3.0.so
Now, the problem parts:
# cc -c -shared test.c
# ld -oldstyle_liblookup -L/usr/local/lib -ldb -o test.exe test.o
ld:
Error: Undefined:
db_create
# ld -oldstyle_liblookup -L -L/usr/local/lib -ldb -o test.exe test.o
ld:
Error: Undefined:
db_create
# ld -oldstyle_liblookup -L -L/usr/local/lib -ldb-3 -o test.exe test.o
ld:
Can't locate file for: -ldb-3
# ld -oldstyle_liblookup -L -L/usr/local/lib -ldb-3.0 -o test.exe test.o
ld:
Can't locate file for: -ldb-3.0
I have no idea for either of these errors. It should link against "-ldb"
and it should be able to locate file for "ldb-3".
Now, this fails, but I expect it:
# cc -ldb test.c -o proba.exe
ld:
Unresolved:
db_create
It is linking against default lib (v1.85). Now, get a load of this:
# cc -L/usr/local/lib -ldb test.c -o proba.exe
# odump -Dl proba.exe
***LIBRARY LIST SECTION***
Name Time-Stamp CheckSum Flags Version
proba.exe:
libdb-3.0.so Aug 24 14:01:34 2000 0x2e3bea79 0
libc.so Feb 24 22:19:15 2000 0xbad758ae 0 osf.1
IT LINKS AS IT SHOULD! Using "-ldb-3" or "-ldb-3.0" also works.
Can anyone shed some light on this? As far as I can tell, "ld" is very,
very picky and sensitive about command line arguments. Am I doing
something wrong here?
Nix.
--
Get your hand out of my panties,.... I'm counting to 1000!
reply other threads:[~2000-08-29 6:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox