[omniORB] irix build patch
James Riden
jamesr@harlequin.co.uk
Mon, 21 Jun 1999 20:15:49 +0100
Dear omniORBers,
I notice we don't yet have an official patch for the following
problem. I've tried to implement it as cleanly as possible and
without introducting too much nastiness into the general unix.mk
file. Could someone who's doing omni on IRIX tell me :
a) is this correct ? and b) is there a better way of doing it ?
so we can get the nice people at AT&T labs, Cambridge to merge a
fix into their source tree.
and while we're on the subject of IRIX :
from omniORB_2.7.1/include/omniORB2/CORBA_sysdep.h
#if defined(IRIX)
#define HAS_Cplusplus_Namespace
#endif
should this be
#if defined(__irix__)
as the documentation only asks for __irix__, __mips__ and
__OSVERSION__=6 to be defined while using the omniORB include
files ? (You could say that namespace support is a property
of the compiler rather than the OS, but I don't think anyone
is using anything other than CC on IRIX)
cheers,
James
problem :
=========
When running certain executables compiled by the omniORB build
process, eg omniNames, eg1, you get a core dump in pthread_key_create
- see below. SGI say -lpthread must appear as the *last* library in
the link line. (This gets a bit ugly, as I'm trying to keep hacks
within mips_irix_6.5_n32.mk and not put any into unix.mk )
prompt% dbx omniNames core
(dbx) where
> 0 pthread_key_create
1 omni_thread::init_t::init_t(void)(0x4152128, 0x0, 0x200e70, 0xfbdf070,
0x2f, 0x2011, 0x200, 0x41510b0)
["omniORB_2.7.1/src/lib/omnithread/posix.cc":292, 0x411f058]
2 <Unknown> ["omniORB_2.7.1/include/omnithread.h":506, 0x413ce90]
3 ::_main
patch :
=======
*** mk/platforms/mips_irix_6.5_n32.mk.old Mon Jun 21 19:40:19 1999
--- mk/platforms/mips_irix_6.5_n32.mk.new Mon Jun 21 18:52:52 1999
***************
*** 54,64 ****
--- 54,66 ----
#
Posix_OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread)
-lpthread
+ Posix_OMNITHREAD_ONLY_LIB = $(patsubst %,$(LibSearchPattern),omnithread)
Posix_OMNITHREAD_CPPFLAGS = -DUsePthread -D_REENTRANT
OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=10 \
-DPthreadSupportThreadPriority
OMNITHREAD_LIB = $($(ThreadSystem)_OMNITHREAD_LIB)
+ OMNITHREAD_ONLY_LIB = $($(ThreadSystem)_OMNITHREAD_ONLY_LIB)
OMNITHREAD_CPPFLAGS = $($(ThreadSystem)_OMNITHREAD_CPPFLAGS)
ThreadSystem = Posix
***************
*** 76,85 ****
# The linker seems to have problems linking two libraries that cross
# reference each other, as it is the case with -lomniORB2 and -ltcpwrapGK.
# One solution is to repeat -lomniORB2 after -ltcpwrapGK.
! # The following line do just that:
! OMNIORB2_LIB += $(patsubst %,$(LibSearchPattern),omniORB2) \
! $(patsubst %,$(LibSearchPattern),omnithread)
# Default location of the omniORB2 configuration file [falls back to this if
# the environment variable OMNIORB_CONFIG is not set] :
--- 78,98 ----
# The linker seems to have problems linking two libraries that cross
# reference each other, as it is the case with -lomniORB2 and -ltcpwrapGK.
# One solution is to repeat -lomniORB2 after -ltcpwrapGK.
! # Also, according to SGI, we need to make -lpthread the *last*
! # item on the link line. More ugliness here to keep it out of unix.mk
+ OMNIORB2_LIB = $(patsubst %,$(LibSearchPattern),omniORB2) \
+ $(patsubst %,$(LibSearchPattern),omniDynamic2) \
+ $(OMNITHREAD_ONLY_LIB) \
+ $($(omniORB2GatekeeperImplementation)_LIB) \
+ $(patsubst %,$(LibSearchPattern),omniORB2) \
+ -lpthread
+
+ OMNIORB2_LIB_NODYN = $(patsubst %,$(LibSearchPattern),omniORB2) \
+ $(OMNITHREAD_ONLY_LIB) \
+ $($(omniORB2GatekeeperImplementation)_LIB) \
+ $(patsubst %,$(LibSearchPattern),omniORB2) \
+ -lpthread
# Default location of the omniORB2 configuration file [falls back to this if
# the environment variable OMNIORB_CONFIG is not set] :