[omniORB] omniNames with memory fault

Sai-Lai Lo S.Lo@uk.research.att.com
09 Feb 1999 20:04:15 +0000


>>>>> Allan Li writes:

> When I run "omniNames -start 12345" on IRIX 6.5, I got "Memory fault"
> error message. Could you please tell me the possible reasons?

> By the way, I installed omniORB_2.7.0 and compiled it on a IRIX 6.5
> machine.

What compiler have you been using? I know that users have been successful
with the latest MIPSpro 7.2.1 compiler. If you are using egcs/g++, I don't
know if thread-safe exception handling is working on mips/irix. 

I also noticed that a README file about Irix is missing in
omniORB_2.7.0. Here is a copy of the file, the information may be useful
for tracking down the problem.


Sai-Lai

-------------------------- Cut here   ------------------------------------
The following information is provided by smant@nlr.nl (Geert Albert Smant),

I compiled omniORB_2.6.0 on a SGI system running IRIX 6.5 with
the latest MIPSpro 7.2.1 compilers installed.

I had some problems during the compile tho.  So I made some changes
to get things working (they were minor).  I've included the changed
files in an attached .tar file to this e-mail.  I hope they are of
some help to you and other people trying to install omniORB_2.6.0
on SGI systems.

[ The changes have been merged into 2.6.1 - SLL ]

Next to this I found the following statement in the file
'~omniORB_2.6.0/mk/platforms/mips_irix_6.4_n32.mk':

    # 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)

This one was also applicable to the 'MIPSpro 7.2.1' compiler version which
I am using.  What the above does, is change the compile options for 'omniNames'
from:

	+ CC -o omniNames -n32 -float -ansi -LANG:exceptions=ON -woff 3303,1110,1182 -L../../../lib/mips_irix_6.2_n32 omniNames.o NamingContext_i.o log.o -lomniORB2 -lomnithread -lpthread -ltcpwrapGK

to:

	+ CC -o omniNames -n32 -float -ansi -LANG:exceptions=ON -woff 3303,1110,1182 -L../../../lib/mips_irix_6.4_n32 omniNames.o NamingContext_i.o log.o -lomniORB2 -lomnithread -lpthread -ltcpwrapGK -lomniORB2

I had a similar problem with the compilation of 'nameclt' in the
directory '~omniORB_2.6.0/src/appl/utils/nameclt' which initially gave the
following error:

===========================================================================
+ CC -o nameclt -n32 -float -ansi -LANG:exceptions=ON -woff 3303,1110,1182 -L../../../../lib/mips_irix_6.4_n32 nameclt.o -lomniORB2 -lomnithread -lpthread -ltcpwrapGK -lomniORB2
ld32: ERROR 33: Unresolved text symbol "omni_mutex::unlock(void)" -- 1st referenced by ../../../../lib/mips_irix_6.4_n32/libtcpwrapGK.a(gatekeeper.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR 33: Unresolved text symbol "omni_mutex::~omni_mutex(void)" -- 1st referenced by ../../../../lib/mips_irix_6.4_n32/libtcpwrapGK.a(gatekeeper.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR 33: Unresolved text symbol "omni_mutex::lock(void)" -- 1st referenced by ../../../../lib/mips_irix_6.4_n32/libtcpwrapGK.a(gatekeeper.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO 152: Output file removed because of error.
make: *** [nameclt] Error 2
===========================================================================

For this, the link order needs to be changed from:

+ CC -o nameclt -n32 -float -ansi -LANG:exceptions=ON -woff 3303,1110,1182 -L../../../../lib/mips_irix_6.4_n32 nameclt.o -lomniORB2 -lomnithread -lpthread -ltcpwrapGK -lomniORB2

to:

CC -o nameclt -n32 -float -ansi -LANG:exceptions=ON -woff 3303,1110,1182 -L../../../../lib/mips_irix_6.4_n32 nameclt.o -lomnithread -lpthread -ltcpwrapGK -lomniORB2
ld32: WARNING 84: ../../../../lib/mips_irix_6.4_n32/libtcpwrapGK.a is not used for resolving any symbol.

But I had to do the compilation 'by hand' because I couldn't find out
what to change in the makefiles to force this order of appearence for
the libraries.


[ Could someone tell me why nameclt fails to link but omniNames is alright? 
                                                            - SLL ]

---------------------------End ---------------------------------------------

-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 223 343000
Cambridge CB2 1QA                     Fax:   +44 223 313542
ENGLAND