From: padula@sw.stratus.com (John Padula)
Subject: C++ linker problems on OSF/1 v3.2
Date: 1996/08/26 [thread overview]
Message-ID: <4vspeh$g8q@transfer.stratus.com> (raw)
We have defined the following linker directives
in one of our makefiles:
OPLIBS=-non_shared -lpthreads -lmach -lbsd -ldnet_stub -lc_r -lpthreads -lmach
(Don't ask why we have 'pthreads' and 'mach' defined twice, I
don't know either!)
The problem is that libc ("-lc") is added implictly by the
compiler. Both libc and libc_r define _sigprocmask.
Using the "-non_shared" directive causes the following
linker error:
/usr/ccs/lib/libc.a(_sigprocmsk.o): _sigprocmask: multiply defined
I know this comes from a conflict in libc and libc_r, as
I specified "-y_sigprocmask" as part of the compile flags
and I got back:
/usr/ccs/lib/libc_r.a(sigprocmask.o): reference to external undefined _sigprocmask
/usr/ccs/lib/libc_r.a(_sigprocmsk.o): definition of external text _sigprocmask
/usr/ccs/lib/libc.a(setjmp.o): reference to external undefined _sigprocmask
/usr/ccs/lib/libc.a(_sigprocmsk.o): definition of external text _sigprocmask
ld:
/usr/ccs/lib/libc.a(_sigprocmsk.o): _sigprocmask: multiply defined
/usr/ccs/lib/libc.a(sigjmp.o): reference to external undefined _sigprocmask
/usr/ccs/lib/libc.a(_longjmp_internal.o): reference to external undefined _sigprocmask
*** Exit 1
I'm noting that this seems to be more of a c++ problem,
as I can create a program in C and C++, use the same
makefile, but get no error when I use the cc compiler.
Has anyone ever been bit by this? Is this some kind of
known problem?
My other question is: if I'm stuck using the "-non_shared" directive,
can I get around this in any way?
As it looks like I'm forced to get libc, I tried removing
the libc_r library, but got undefined's on:
libc_locks_reinit
cma__tis_vector_get_bounds
cma__tis_objects_exist
ldr_declare_lock_functions
Anyone out there have any suggestions on how to resolve this?
Regards and TIA,
JohnP
next reply other threads:[~1996-08-26 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-08-26 4:00 John Padula [this message]
1996-08-27 4:00 ` C++ linker problems on OSF/1 v3.2 Craig Neth
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