[omniORB] Irix 6.2 - patch for makefile

Gerd Schmitt Schmitt@krauss-maffei.de
Wed, 12 Aug 1998 12:25:06 -0700


This is a multi-part message in MIME format.


--------------446B794B15FB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Anjil Alyas wrote:
> 
> Hi, I've compiled OmniOrb on our Irix 6.2 machine
> and I experience the problem you had with eg1 crashing
> within the call "pthread_key_create".
> 
> If it's not any trouble could you forward me your modified
> omnithread.h and posix.h files. I tried to make the changes
> you described in your post to the mailing list but to no avail.
> 
> Thank you in advance.
> 
> Anjil


Anjil,

it turned out this is a initialisation problem of rld.

A collegue (mailto:volley@krauss-maffei.de) contacted SGI about 
the problem and they came up with a different linking order:
-ltcpwrapGK -lomniORB2 -lomnithread -lpthread

I haven't tried it yet, but Axel reported that it works. I attached
his mail with the new makefile.

Have fun, and let me know whether this worked for you.

Gerd



P.S.:

OmniOrbers,
Maybe someone is able to apply this patch to the SGI-port?

--------------446B794B15FB
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Return-Path: volley@krauss-maffei.de
Received: from kmdi-ex02.Krauss-Maffei.de (di-hub [193.99.235.34]) by as-hub.as.wt.krauss-maffei.de (8.8.8/8.7.3) with ESMTP id OAA28821; Tue, 11 Aug 1998 14:12:06 +0200
Received: by kmdi-ex02.Krauss-Maffei.de with Internet Mail Service (5.0.1457.3)
	id <P2TLTLZN>; Tue, 11 Aug 1998 13:49:28 +0200
Received: from localhost by kmdi-ex02.Krauss-Maffei.de with SMTP (Microsoft Exchange Internet Mail Service Version 5.0.1457.7)
	id P2TLTLZL; Tue, 11 Aug 1998 13:49:26 +0200
Received: from 193.99.235.167 ([193.99.235.167]) by kmdi-ex02.Krauss-Maffei.de (InterScan E-Mail VirusWall NT)
Received: from krauss-maffei.de ([192.0.94.74]) by as-hub.as.wt.krauss-maffei.de (8.8.8/8.7.3) with ESMTP id OAA28816; Tue, 11 Aug 1998 14:11:59 +0200
Message-ID: <35D03065.791490D@krauss-maffei.de>
Date: Tue, 11 Aug 1998 13:52:05 +0200
From: "Axel W. Volley" <volley@krauss-maffei.de>
X-Mailer: Mozilla 4.05 [en] (WinNT; I)
MIME-Version: 1.0
To: Liutger Franzen <ilfranze@TechFak.Uni-Bielefeld.DE>
CC: Gerd Schmitt <schmitt@krauss-maffei.de>
Subject: omniORB crash auf Irix 6.4
Content-Type: multipart/mixed; boundary="------------272E9132416092C76845C3B6"

This is a multi-part message in MIME format.

--------------272E9132416092C76845C3B6
Content-Type: multipart/alternative; boundary="------------59194CC5EF2309406488D63A"


--------------59194CC5EF2309406488D63A
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by as-hub.as.wt.krauss-maffei.de id OAA28816

Hey Liutger,=20
Du hattest einen kleinen Fehler in sgi_irix_6.2_n32.mk , der dazu =
f=FChrte, da=DF die pthread-Bibliothek an der falschen Stelle =
intialisiert wird. Reihenfolge mu=DF sein (zumindest unter Irix6.4): =
-ltcpwrapGK -lomniORB2 -lomnithread -lpthread. Dann klappts auch mit =
Irix 6.4. Anbei das leicht ge=E4nderte mk-file.=20
-- Axel=20
----------------------------------------------------------------------=20
Axel W. Volley (mailto:volley@krauss-maffei.de)=20
Lead engineer R&D visual systems=20
Krauss-Maffei Simulation (W-AS 11)=20
=A0

--------------59194CC5EF2309406488D63A
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

</HEAD>
<BODY>
<P>Hey Liutger, </P>
<P>Du hattest einen kleinen Fehler in <FONT FACE="Courier New">sgi_irix_6.2_n32.mk </FONT>, der dazu f&uuml;hrte, da&szlig; die pthread-Bibliothek an der falschen Stelle intialisiert wird. Reihenfolge mu&szlig; sein (zumindest unter Irix6.4): <FONT FACE="Courier New">-ltcpwrapGK -lomniORB2 -lomnithread -lpthread.</FONT> Dann klappts auch mit Irix 6.4. Anbei das leicht ge&auml;nderte mk-file. </P>
<P>-- Axel <BR>
---------------------------------------------------------------------- <BR>
Axel W. Volley (<A HREF="mailto:volley@krauss-maffei.de">mailto:volley@krauss-maffei.de</A>) <BR>
Lead engineer R&amp;D visual systems <BR>
Krauss-Maffei Simulation (W-AS 11) <BR>
&nbsp;</P>

</BODY>
</HTML>
--------------59194CC5EF2309406488D63A--

--------------272E9132416092C76845C3B6
Content-Type: text/plain; charset=us-ascii; name="sgi_irix_6.2_n32.mk"
Content-Disposition: inline; filename="sgi_irix_6.2_n32.mk"
Content-Transfer-Encoding: 7bit

#

# sgi_irix_6.2.mk - make variables and rules specific to SGI Irix 6.2

#



IRIX = 1

IRIX_n32 = 1

IndigoProcessor = 1





#

# Include general unix things

#



#

# Standard make variables and rules for all UNIX platforms.

#



UnixPlatform = 1



#

# Any recursively-expanded variable set here can be overridden _afterwards_ by

# a platform-specific mk file which includes this one.

#



#

# Standard unix programs - note that GNU make already defines some of

# these such as AR, RM, etc (see section 10.3 of the GNU make manual).

#



MKDIRHIER	= mkdirhier

INSTLIBFLAGS	= -m 0644

INSTEXEFLAGS	= -m 0755

CP		= cp

MV		= mv -f





#

# Replacements for implicit rules

#



%.o: %.c

	$(CC) -g -c $(CFLAGS) -o $@ $<



%.o: %.cc

	$(CXX) -g -c $(CXXFLAGS) -o $@ $<





#

# General rule for cleaning.

#



define CleanRule

$(RM) *.o *.a *.class

endef



# XXX VeryCleanRule should delete Java stubs too.



define VeryCleanRule

$(RM) *.d

$(RM) $(CORBA_STUB_FILES)

endef





#

# Patterns for various file types

#



LibPattern = lib%.a

LibSuffixPattern = %.a

LibSearchPattern = -l%

BinPattern = %

TclScriptPattern = %





#

# Stuff to generate statically-linked libraries.

#



define StaticLinkLibrary

(set -x; \

 $(RM) $@; \

 $(AR) $@ $^; \

)

endef



ifdef EXPORT_TREE

define ExportLibrary

(dir="$(EXPORT_TREE)/$(LIBDIR)"; \

 files="$^"; \

 for file in $$files; do \

   $(ExportFileToDir); \

 done; \

)

endef

endif





#

# Stuff to generate executable binaries.

#

# These rules are used like this

#

# target: objs lib_depends

#         @(libs="libs"; $(...Executable))

#

# The command we want to generate is like this

#

# linker -o target ... objs libs

# i.e. we need to filter out the lib_depends from the command

#



IMPORT_LIBRARY_FLAGS = $(patsubst %,-L%,$(IMPORT_LIBRARY_DIRS))



define CXXExecutable

(set -x; \

 $(RM) $@; \

 $(CXXLINK) -o $@ $(CXXLINKOPTIONS) $(IMPORT_LIBRARY_FLAGS) \

    $(filter-out $(LibSuffixPattern),$^) $$libs; \

)

endef



define CExecutable

(set -x; \

 $(RM) $@; \

 $(CLINK) -o $@ $(CLINKOPTIONS) $(IMPORT_LIBRARY_FLAGS) \

    $(filter-out $(LibSuffixPattern),$^) $$libs; \

)

endef



ifdef EXPORT_TREE

define ExportExecutable

(dir="$(EXPORT_TREE)/$(BINDIR)"; \

 files="$^"; \

 for file in $$files; do \

   $(ExportExecutableFileToDir); \

 done; \

)

endef

endif





omniORB2GatekeeperImplementation = OMNIORB2_TCPWRAPGK

CorbaImplementation = OMNIORB2



#

# CORBA stuff

#



OMNIORB2_IDL = omniidl2

OMNIORB2_CPPFLAGS = -D__OMNIORB2__ -I$(CORBA_STUB_DIR) $(OMNITHREAD_CPPFLAGS)

OMNIORB2_LIB = $(patsubst %,$(LibSearchPattern),omniORB2) $(OMNITHREAD_LIB) \

		$(SOCKET_LIB)

lib_depend := $(patsubst %,$(LibPattern),omniORB2)

OMNIORB2_LIB_DEPEND1 := $(GENERATE_LIB_DEPEND)

OMNIORB2_LIB_DEPEND = $(OMNIORB2_LIB_DEPEND1) $(OMNITHREAD_LIB_DEPEND)

OMNIORB2_STUB_HDR_PATTERN = $(CORBA_STUB_DIR)/%.hh

OMNIORB2_STUB_SRC_PATTERN = $(CORBA_STUB_DIR)/%SK.cc

OMNIORB2_STUB_OBJ_PATTERN = $(CORBA_STUB_DIR)/%SK.o





# omniORB2 access control policy modules



OMNIORB2_DUMMYGK_LIB = $(patsubst %,$(LibSearchPattern),omniGK_stub)

lib_depend := $(patsubst %,$(LibPattern),omniGK_stub)

OMNIORB2_DUMMYGK_LIB_DEPEND := $(GENERATE_LIB_DEPEND)



OMNIORB2_TCPWRAPGK_LIB = $(patsubst %,$(LibSearchPattern),tcpwrapGK)

lib_depend := $(patsubst %,$(LibPattern),tcpwrapGK)

OMNIORB2_TCPWRAPGK_LIB_DEPEND := $(GENERATE_LIB_DEPEND)



# omniORB2GatekeeperImplementation = OMNIORB2_DUMMYGK



#OMNIORB2_LIB += $($(omniORB2GatekeeperImplementation)_LIB)

OMNIORB2_LIB = $($(omniORB2GatekeeperImplementation)_LIB)

# Necessary for IRIX to guarantee correct DSO init order



# special this one because of unresolved symbols in libtcpwrapGK

OMNIORB2_LIB += $(patsubst %,$(LibSearchPattern),omniORB2) $(OMNITHREAD_LIB) \

		$(SOCKET_LIB)



OMNIORB2_LIB_DEPEND += $($(omniORB2GatekeeperImplementation)_LIB_DEPEND)



# LifeCycle stuff



OMNIORB2_IDL_LC_FLAGS = -l

OMNIORB2_LC_LIB = $(patsubst %,$(LibSearchPattern),omniLC)



#

# Tcl stuff

#



define TclScriptExecutable

((set -x; $(RM) $@); \

 if [ "$$wish" = "" ]; then \

   wish="$(WISH4)"; \

 fi; \

 case "$$wish" in \

 /*) ;; \

 *) \

   if [ "$(EXPORT_TREE)" != "" ]; then \

     wish="$(EXPORT_TREE)/$(BINDIR)/$$wish"; \

   else \

     wish="./$$wish"; \

   fi ;; \

 esac; \

 echo echo "#!$$wish >$@"; \

 echo "#!$$wish" >$@; \

 echo echo "set auto_path [concat {$$tcllibpath} \$$auto_path] >>$@"; \

 echo "set auto_path [concat {$$tcllibpath} \$$auto_path]" >>$@; \

 echo "cat $< >>$@"; \

 cat $< >>$@; \

 set -x; \

 chmod a+x $@; \

)

endef





#

# C preprocessor macro definitions for this architecture

#



IMPORT_CPPFLAGS += -D__sgi__ -D__irix__ -D__OSVERSION__=6





#

# Standard programs

#



AR = ar cq

RANLIB = echo



MKDIRHIER = mkdirhier

#INSTALL           = /vol/gnu/bin/install

INSTALL = ginstall



CPP = '/usr/bin/cc -E'



CXX = CC

CXXMAKEDEPEND = $(TOP)/$(BINDIR)/omkdepend -D__SGI_CC -D__cplusplus

CXXDEBUGFLAGS = #-O2

# CXXDEBUGFLAGS = -O2 -fsimple

CXXMTFLAG     = 

# CXXOPTIONS    =  -n32 -float -ansi -fullwarn -LANG:exceptions=ON

CXXWOFFOPTIONS =  -woff 3303,1110,1182

CXXOPTIONS     =  -n32 -float -ansi -LANG:exceptions=ON $(CXXWOFFOPTIONS)



CXXLINK		= $(CXX)

CXXLINKOPTIONS  = $(CXXDEBUGFLAGS) $(CXXOPTIONS)



# CXXLINKOPTIONS += $(patsubst %,-R %,$(IMPORT_LIBRARY_DIRS))

# Note: the -R linker option in CXXLINKOPTIONS instruct the Sun linker to

# record the pathname of the shared libraries in the executable.



#

# To use gcc uncomment the following lines:

#

#CPP = gcc

#

#CXX = g++

#CXXMAKEDEPEND = $(TOP)/$(BINDIR)/omkdepend -D__cplusplus -D__GNUG__ -D__GNUC__

#CXXDEBUGFLAGS = 

#CXXOPTIONS    =  -fhandle-exceptions -Wall -Wno-unused

#CXXMTFLAG     =

#

#CXXLINK		= $(CXX)

#CXXLINKOPTIONS  = $(CXXDEBUGFLAGS) $(CXXOPTIONS)

#

#CXXLINKOPTIONS += $(patsubst %,-R %,$(IMPORT_LIBRARY_DIRS))

# Note: the -R linker option in CXXLINKOPTIONS instruct the Sun linker to

# record the pathname of the shared libraries in the executable.



CC                = cc

COPTIONS          = -n32

CLINKOPTIONS  = $(COPTIONS)

CMAKEDEPEND       = $(TOP)/$(BINDIR)/omkdepend

#CMAKEDEPEND       = $(TOP)/$(BINDIR)/omkdepend -D__GNUC__

#CDEBUGFLAGS       = -O

#COPTIONS	  = -fpcc-struct-return



CLINK             = $(CC)





#

# Socket library

#



SOCKET_LIB =

THREAD_LIB = -lthread $(CXXMTFLAG)





#

# OMNI thread stuff

#



# Solaris_OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread) \

# 			 -lthread -lposix4 $(CXXMTFLAG)

# Solaris_OMNITHREAD_CPPFLAGS = -D_REENTRANT $(CXXMTFLAG)



#Posix_OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread) -lpthread \

#		 -lposix4 $(CXXMTFLAG)

Posix_OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread) -lpthread \

		 $(CXXMTFLAG)

Posix_OMNITHREAD_CPPFLAGS = -DUsePthread -D_REENTRANT $(CXXMTFLAG)

OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=10 \

			    -DPthreadSupportThreadPriority



OMNITHREAD_LIB = $($(ThreadSystem)_OMNITHREAD_LIB)

OMNITHREAD_CPPFLAGS = $($(ThreadSystem)_OMNITHREAD_CPPFLAGS)



ThreadSystem = Posix



lib_depend := $(patsubst %,$(LibPattern),omnithread)

OMNITHREAD_LIB_DEPEND := $(GENERATE_LIB_DEPEND)





#

# OMNI ParTcl stuff

#



TCLTK_CPPFLAGS = -I/vol/tcl/include/

TCLTK_LIB = -L/vol/tcl/lib -L/usr/local/lib -ltk4.0 -ltcl7.4 -lm -R /vol/tcl/lib

#TCLTK_LIB = -L/usr/local/lib -ltk4.0 -ltcl7.4 -lm -R /usr/local/lib

X11_CPPFLAGS = -I/vol/X11/include

X11_LIB = -L/vol/X11/lib -lX11 -R /vol/X11/lib

WISH4 = /vol/tcl/bin/wish



OMNIPARTCL_CPPFLAGS = $(TCLTK_CPPFLAGS) $(X11_CPPFLAGS) $(OMNITHREAD_CPPFLAGS)

OMNIPARTCL_LIB = $(patsubst %,$(LibSearchPattern),omniParTcl) $(TCLTK_LIB) \

		 $(X11_LIB) $(OMNITHREAD_LIB)

lib_depend := $(patsubst %,$(LibPattern),omniParTcl)

OMNIPARTCL_LIB_DEPEND := $(GENERATE_LIB_DEPEND) $(OMNITHREAD_LIB_DEPEND)



#

# Java and Java/CORBA stuff

#



JAVA_ROOT = /usr/local/java-1.1.4

JAVAIDL_ROOT = /usr/local/javaIDL



# Default location of the omniORB2 configuration file [falls back to this if

# the environment variable OMNIORB_CONFIG is not set] :



OMNIORB_CONFIG_DEFAULT_LOCATION = \"/vol/omniorb2/share/etc/omniORB.cfg\"



# Default directory for the omniNames log files.

OMNINAMES_LOG_DEFAULT_LOCATION = \"/vol/omniorb2/share/log\"


--------------272E9132416092C76845C3B6--


--------------446B794B15FB--