* C compile-runtime problem
@ 1999-08-06 4:00 Dave Maclaurin
1999-08-06 4:00 ` Joe Mario
0 siblings, 1 reply; 3+ messages in thread
From: Dave Maclaurin @ 1999-08-06 4:00 UTC (permalink / raw)
Hi,
I'm trying to compile and run one of the examples from the Netscape C SDK
LDAP installation under Digital Unix 4.
I'm relatively new to unix and don't know why the code compiles, links then
dies at run time. I am obviously not linking
in all the required shared libraries - how can I work backwards from a
runtime error for an unresolved symbol
to a library that needs to be loaded at runtime.
Any help appreciated
Cheers Dave.
See below for the log of what I'm doing.
Compile the Netscape example
>cc -taso -rpath /lib asearch.c -c
Then Link it
>ld -taso -v -call_shared asearch.o lib/libldapssl30.so /usr/shlib/libc.so
After processing 'stdin' arg list is:
ld -taso -v -call_shared asearch.o lib/libldapssl30.so /usr/shlib/libc.so
Expanded arg list is:
ld -taso -v -call_shared asearch.o lib/libldapssl30.so /usr/shlib/libc.so
ld: Pass 1
Opened file asearch.o
asearch.o: Object file, rev: 3.13
ld:
asearch.o: version stamp: 3.13, does not match ld's: 3.11
Opened file lib/libldapssl30.so
lib/libldapssl30.so: Shared object, rev: 3.11
Opened file /usr/shlib/libc.so
/usr/shlib/libc.so: Shared object, rev: 3.11
Trying to open file /usr/shlib/libexc_init.so
Trying to open file /usr/ccs/lib/libexc_init.so
Trying to open file /usr/lib/cmplrs/cc//libexc_init.so
Trying to open file /usr/lib/libexc_init.so
Trying to open file /usr/local/lib/libexc_init.so
Trying to open file /var/shlib/libexc_init.so
Trying to open file /usr/shlib/libexc_init.a
Trying to open file /usr/ccs/lib/libexc_init.a
Trying to open file /usr/lib/cmplrs/cc//libexc_init.a
Opened file /usr/lib/cmplrs/cc//libexc_init.a
Using archive /usr/lib/cmplrs/cc//libexc_init.a for -lexc_init
/usr/lib/cmplrs/cc//libexc_init.a(call.o): Compressed Object in archive
file,
rev: 3.13
/usr/lib/cmplrs/cc//libexc_init.a(call.o): version stamp: 3.13, does not
match l
d's: 3.11
ld: Pass 2
asearch.o:
/usr/lib/cmplrs/cc//libexc_init.a(call.o):
>
Then Try to Run
> a.out
28745:a.out: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libc.so:
__ldr
_data
28745:a.out: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libc.so:
__Arg
c
28745:a.out: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libc.so:
__Arg
v
28745:a.out: /sbin/loader: Error: Unresolved symbol in
/usr/shlib/libpthread.so:
__Argc
28745:a.out: /sbin/loader: Error: Unresolved symbol in
/usr/shlib/libpthread.so:
__Argv
28745:a.out: /sbin/loader: Fatal Error: this executable has unresolvable
symbols
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: C compile-runtime problem
1999-08-06 4:00 C compile-runtime problem Dave Maclaurin
@ 1999-08-06 4:00 ` Joe Mario
1999-08-11 4:00 ` Dave Maclaurin
0 siblings, 1 reply; 3+ messages in thread
From: Joe Mario @ 1999-08-06 4:00 UTC (permalink / raw)
Dave Maclaurin wrote:
> Hi,
> I'm trying to compile and run one of the examples from the Netscape C SDK
> LDAP installation under Digital Unix 4.
> I'm relatively new to unix and don't know why the code compiles, links then
> dies at run time. I am obviously not linking
> in all the required shared libraries - how can I work backwards from a
> runtime error for an unresolved symbol
> to a library that needs to be loaded at runtime.
> ...
> Then Link it
>
> >ld -taso -v -call_shared asearch.o lib/libldapssl30.so /usr/shlib/libc.so
Dave:
Please do your link using the cc driver. The link line above is missing
crt0.o and maybe more.
cc -taso asearch.o -Llib -lldapss130
Then run your ./a.out.
Joe Mario
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: C compile-runtime problem
1999-08-06 4:00 ` Joe Mario
@ 1999-08-11 4:00 ` Dave Maclaurin
0 siblings, 0 replies; 3+ messages in thread
From: Dave Maclaurin @ 1999-08-11 4:00 UTC (permalink / raw)
Thanks very much - that fixed the problem !!
Cheers Dave.
Joe Mario <mario@zk3.dec.com> wrote in message
news:37AB5201.B2A7BC92@zk3.dec.com...
> Dave Maclaurin wrote:
>
> > Hi,
> > I'm trying to compile and run one of the examples from the Netscape C
SDK
> > LDAP installation under Digital Unix 4.
> > I'm relatively new to unix and don't know why the code compiles, links
then
> > dies at run time. I am obviously not linking
> > in all the required shared libraries - how can I work backwards from a
> > runtime error for an unresolved symbol
> > to a library that needs to be loaded at runtime.
> > ...
> > Then Link it
> >
> > >ld -taso -v -call_shared asearch.o lib/libldapssl30.so
/usr/shlib/libc.so
>
> Dave:
> Please do your link using the cc driver. The link line above is
missing
> crt0.o and maybe more.
>
> cc -taso asearch.o -Llib -lldapss130
>
> Then run your ./a.out.
>
> Joe Mario
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-08-11 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-08-06 4:00 C compile-runtime problem Dave Maclaurin
1999-08-06 4:00 ` Joe Mario
1999-08-11 4:00 ` Dave Maclaurin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox