tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: (INCONCLUSIVE) Linking problems on T64 UNIX 4.0F
@ 2000-08-29  6:42 Nikola Milutinovic
  0 siblings, 0 replies; only message in thread
From: Nikola Milutinovic @ 2000-08-29  6:42 UTC (permalink / raw)
  To: tru64-unix-managers

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!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-08-29  6:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-29  6:42 SUMMARY: (INCONCLUSIVE) Linking problems on T64 UNIX 4.0F Nikola Milutinovic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox