* Oddness with cc -pthread and -lldap_r
@ 2001-01-23 14:19 Albert Chin-A-Young
2001-01-23 19:58 ` Mark Garrett
0 siblings, 1 reply; 4+ messages in thread
From: Albert Chin-A-Young @ 2001-01-23 14:19 UTC (permalink / raw)
I'm building OpenLDAP 2.0.7 on Tru64 UNIX 5.0A. Something odd is going
on:
$ cc -V
/usr/bin/cc (cc)
Tru64 UNIX Compiler Driver 5.0
Compaq C V6.1-020 on Compaq Tru64 UNIX V5.0A (Rev. 1094)
/usr/lib/cmplrs/cc/ld:
/usr/lib/cmplrs/cc/ftoc:
$ cat b.c
#include <sys/types.h>
int
main (void) {
pid_t foo;
}
$ cc b.c -lldap_r -pthread
[At this point, it doesn't matter if libldap_r is available because
we're interested in how ld is being called. We replace /bin/ld
with a shell script to spit out the options ld was called with.]
ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o b.o -qlldap_r<CR>
_r -lldap_r -lpthread -lexc -lc
[yes, there is a CR after -qlldap_r and notice the lone "-r"!]
$ cc b.c -pthread
ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o b.o -lpthread -lexc -lc
[no CR problems!]
$ cc b.c -lfoo_r -pthread
ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o b.o \
-qlfoo_r_r -lfoo_r -lpthread -lexc -lc
[no CR problems!]
So, what is going on? What is special about "-lldap_r".
--
albert chin (china at thewrittenword dot com)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Oddness with cc -pthread and -lldap_r
2001-01-23 14:19 Oddness with cc -pthread and -lldap_r Albert Chin-A-Young
@ 2001-01-23 19:58 ` Mark Garrett
2001-01-24 5:01 ` Albert Chin-A-Young
0 siblings, 1 reply; 4+ messages in thread
From: Mark Garrett @ 2001-01-23 19:58 UTC (permalink / raw)
You don't explain why you ended up doing this? However you know you can just
put a -v switch to get the compiler to show each of the programs and
parameters passed. I'm now on 5.1 so I cant duplicate any problems.
Just note that the compiler does take parameters is a kind of order ie.
those -l's are for the linker phase and I would put a -o a.out rather than
assume some default a.out and see if thats less of a confusion to the 50a
compiler driver.Try cc -v b.c -o b -lldap_r -pthread
As your can see here its correct on v5.1 compile :-
mark@ned> cc -V
Compaq C V6.3-027 on Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-026 (sys) cc Driver
mark@ned> cc -v b.c -lldap_r -pthread
/usr/lib/cmplrs/cc/gemc_cc -D__LANGUAGE_C__ -D__unix__ -D__alpha
-D_SYSTYPE_BSD
-D_LONGLONG -D__digital__ -D__arch64__ -D__osf__ -D_REENTRANT -g0 -O2
-preempt_m
odule -std -intrinsics -noansi_alias -v -I/usr/include -o b.o b.c
These macros are in effect at the start of the compilation.
----- ------ --- -- ------ -- --- ----- -- --- ------------
-D__DECC -D__osf__ -D__arch64__ -D__PRAGMA_ENVIRONMENT -D_LONGLONG
-D__digital_
_ -D__X_FLOAT -D__DATE__="Jan 24 2001" -D__DECC_MODE_RELAXED -D_REENTRANT
-D__D
ECC_VER=60390027 -D_SYSTYPE_BSD -D__ALPHA -D__IEEE_FLOAT -D__unix__
-D__STDC_HO
STED__ -D__TIME__="06:35:22" -D__Alpha_AXP -D__INITIAL_POINTER_SIZE=0
-D__STDC
__=0 -D__LANGUAGE_C__ -D__alpha
/usr/lib/cmplrs/cc/gemc_cc:
0.10u 0.10s 0:00 95% 0+12k 0+22io 0pf+0w 12stk+1592mem
/usr/lib/cmplrs/cc/ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o b.o
-qlldap
_r_r -lldap_r -lpthread -lexc -lc
ld:
Can't locate file for: -lldap_r
/usr/lib/cmplrs/cc/ld:
0.00u 0.02s 0:00 66% 0+5k 0+1io 0pf+0w 5stk+528mem
in article 94k3t5$mhe$1@bob.news.rcn.net, Albert Chin-A-Young at
china@nospam.net wrote on 24/01/2001 01:19:
> I'm building OpenLDAP 2.0.7 on Tru64 UNIX 5.0A. Something odd is going
> on:
> $ cc -V
> /usr/bin/cc (cc)
> Tru64 UNIX Compiler Driver 5.0
> Compaq C V6.1-020 on Compaq Tru64 UNIX V5.0A (Rev. 1094)
> /usr/lib/cmplrs/cc/ld:
> /usr/lib/cmplrs/cc/ftoc:
>
> $ cat b.c
> #include <sys/types.h>
>
> int
> main (void) {
> pid_t foo;
> }
>
> $ cc b.c -lldap_r -pthread
> [At this point, it doesn't matter if libldap_r is available because
> we're interested in how ld is being called. We replace /bin/ld
> with a shell script to spit out the options ld was called with.]
> ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o b.o -qlldap_r<CR>
> _r -lldap_r -lpthread -lexc -lc
> [yes, there is a CR after -qlldap_r and notice the lone "-r"!]
>
> $ cc b.c -pthread
> ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o b.o -lpthread -lexc -lc
> [no CR problems!]
>
> $ cc b.c -lfoo_r -pthread
> ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o b.o \
> -qlfoo_r_r -lfoo_r -lpthread -lexc -lc
> [no CR problems!]
>
> So, what is going on? What is special about "-lldap_r".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Oddness with cc -pthread and -lldap_r
2001-01-23 19:58 ` Mark Garrett
@ 2001-01-24 5:01 ` Albert Chin-A-Young
2001-01-25 17:53 ` Albert Chin-A-Young
0 siblings, 1 reply; 4+ messages in thread
From: Albert Chin-A-Young @ 2001-01-24 5:01 UTC (permalink / raw)
Mark Garrett <Mark.Garrett@wedontwantyourspam.com.au> wrote:
> You don't explain why you ended up doing this? However you know you can just
> put a -v switch to get the compiler to show each of the programs and
> parameters passed. I'm now on 5.1 so I cant duplicate any problems.
> Just note that the compiler does take parameters is a kind of order ie.
> those -l's are for the linker phase and I would put a -o a.out rather than
> assume some default a.out and see if thats less of a confusion to the 50a
> compiler driver.Try cc -v b.c -o b -lldap_r -pthread
> As your can see here its correct on v5.1 compile :-
> mark@ned> cc -V
> Compaq C V6.3-027 on Compaq Tru64 UNIX V5.1 (Rev. 732)
> Compiler Driver V6.3-026 (sys) cc Driver
> mark@ned> cc -v b.c -lldap_r -pthread
Please try the following for me on your 5.1 system:
$ cc -v b.c -lldap_r -pthread | cat -v
and post the output.
> /usr/lib/cmplrs/cc/gemc_cc -D__LANGUAGE_C__ -D__unix__ -D__alpha
> -D_SYSTYPE_BSD
> -D_LONGLONG -D__digital__ -D__arch64__ -D__osf__ -D_REENTRANT -g0 -O2
> -preempt_m
> odule -std -intrinsics -noansi_alias -v -I/usr/include -o b.o b.c
> These macros are in effect at the start of the compilation.
> ----- ------ --- -- ------ -- --- ----- -- --- ------------
> -D__DECC -D__osf__ -D__arch64__ -D__PRAGMA_ENVIRONMENT -D_LONGLONG
> -D__digital_
> _ -D__X_FLOAT -D__DATE__="Jan 24 2001" -D__DECC_MODE_RELAXED -D_REENTRANT
> -D__D
> ECC_VER=60390027 -D_SYSTYPE_BSD -D__ALPHA -D__IEEE_FLOAT -D__unix__
> -D__STDC_HO
> STED__ -D__TIME__="06:35:22" -D__Alpha_AXP -D__INITIAL_POINTER_SIZE=0
> -D__STDC
> __=0 -D__LANGUAGE_C__ -D__alpha
> /usr/lib/cmplrs/cc/gemc_cc:
> 0.10u 0.10s 0:00 95% 0+12k 0+22io 0pf+0w 12stk+1592mem
> /usr/lib/cmplrs/cc/ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o b.o
> -qlldap
> _r_r -lldap_r -lpthread -lexc -lc
Isn't the _r_r odd?
--
albert chin (china at thewrittenword dot com)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Oddness with cc -pthread and -lldap_r
2001-01-24 5:01 ` Albert Chin-A-Young
@ 2001-01-25 17:53 ` Albert Chin-A-Young
0 siblings, 0 replies; 4+ messages in thread
From: Albert Chin-A-Young @ 2001-01-25 17:53 UTC (permalink / raw)
Albert Chin-A-Young <china@spam.org> wrote:
> Mark Garrett <Mark.Garrett@wedontwantyourspam.com.au> wrote:
>> You don't explain why you ended up doing this? However you know you can just
>> put a -v switch to get the compiler to show each of the programs and
>> parameters passed. I'm now on 5.1 so I cant duplicate any problems.
>> Just note that the compiler does take parameters is a kind of order ie.
>> those -l's are for the linker phase and I would put a -o a.out rather than
>> assume some default a.out and see if thats less of a confusion to the 50a
>> compiler driver.Try cc -v b.c -o b -lldap_r -pthread
>> As your can see here its correct on v5.1 compile :-
>> mark@ned> cc -V
>> Compaq C V6.3-027 on Compaq Tru64 UNIX V5.1 (Rev. 732)
>> Compiler Driver V6.3-026 (sys) cc Driver
>> mark@ned> cc -v b.c -lldap_r -pthread
> Please try the following for me on your 5.1 system:
> $ cc -v b.c -lldap_r -pthread | cat -v
> and post the output.
BTW, Compaq has confirmed the bug in the C compiler and it has been
fixed in the most recent version of the C compiler available as part
of the Developers Toolkit.
--
albert chin (china at thewrittenword dot com)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-01-25 17:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-23 14:19 Oddness with cc -pthread and -lldap_r Albert Chin-A-Young
2001-01-23 19:58 ` Mark Garrett
2001-01-24 5:01 ` Albert Chin-A-Young
2001-01-25 17:53 ` Albert Chin-A-Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox