Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* C++ linker problems on OSF/1 v3.2
@ 1996-08-26  4:00 John Padula
  1996-08-27  4:00 ` Craig Neth
  0 siblings, 1 reply; 2+ messages in thread
From: John Padula @ 1996-08-26  4:00 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-08-27  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-26  4:00 C++ linker problems on OSF/1 v3.2 John Padula
1996-08-27  4:00 ` Craig Neth

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