[omniORB] unable to build omniORB 2.7.0 on linux with egcs-1.1.1

Herve Lehoux hlehoux@adways.com
Tue, 9 Feb 1999 17:13:07 +0100


Hi OmniORBers,

i have problems with omniidl2 on linux : 

i downloaded omniORB_2.7.0_x86_linux_2.0_glibc and tried to compile my
application. i have a seg_fault in omniidl2.

so i dowloaded the source and compiled it. same result, omniidl2 gets seg_fault
while processing omniORB_2.7.0/src/lib/omniORB2/Naming.idl .

below is more precise information :

thanks for any help.
------------------------------------------------------------------------------

egcs-version :
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
[
compile output :

make[2]: Entering directory `/tools/omniORB_2.7.0/src/lib/omniORB2'
if [ "Naming.idl" != Naming.idl ]; then cp Naming.idl . ; fi
.../../../bin/i586_linux_2.0_glibc/omniidl2 -a Naming.idl
make[2]: *** [Naming.hh] Segmentation fault
make[2]: Leaving directory `/tools/omniORB_2.7.0/src/lib/omniORB2'
make[1]: *** [export] Error 1
make[1]: Leaving directory `/tools/omniORB_2.7.0/src/lib'
make: *** [export] Error 1

gdb :
Starting program: /tools/omniORB_2.7.0/bin/i586_linux_2.0_glibc/omniidl2 -a Naming.idl

Program received signal SIGSEGV, Segmentation fault.
AST_Decl::pragmas (this=0x0) at ast_decl.cc:300
300       return pd_pragmas;
(gdb) where
#0  AST_Decl::pragmas (this=0x0) at ast_decl.cc:300
#1  0x806de86 in internal_search_pragma (decl=0x0, p=0x80ff678 "prefix") at o2be_name.cc:445
#2  0x806db81 in internal_produce_repositoryID (decl=0x813c568, n=0x813c5a8) at o2be_name.cc:403
#3  0x806cfad in o2be_name::o2be_name (this=0x813c5a8, __in_chrg=0, t=NT_pre_defined, n=0x813c530, up=0x0) at o2be_name.cc:106
#4  0x808db58 in o2be_predefined_type::o2be_predefined_type (this=0x813c550, __in_chrg=1, t=PT_long, sn=0x813c530, p=0x0)
    at o2be_predefined_type.cc:63
#5  0x804c7a9 in o2be_generator::create_predefined_type (this=0x813c0b8, t=PT_long, n=0x813c530, p=0x0) at o2be_generator.cc:60
#6  0x80d3f52 in fe_populate (m=0x813c2e8) at fe_init.cc:108
#7  0x80d5b5b in FE_init_stage2 () at fe_init.cc:387
#8  0x8049a36 in DRV_drive (s=0xbffffcd2 "Naming.idl") at drv_main.cc:150
#9  0x8049f79 in main (argc=3, argv=0xbffffbc4) at drv_main.cc:324
(gdb) up 2
#2  0x806db81 in internal_produce_repositoryID (decl=0x813c568, n=0x813c5a8) at o2be_name.cc:403

(gdb) p *prefix_scope
$4 = {<COMMON_Base> = <invalid address>, _vb.COMMON_Base = 0x11, pd_scope_node_type = 32, pd_decls = 0x0, pd_decls_allocated = 6,
  pd_decls_used = 0, pd_local_types = 0x4004d3bc, pd_locals_allocated = 0, pd_locals_used = 0, pd_referenced = 0x0,
  pd_referenced_allocated = 0, pd_referenced_used = 0, pd_parent_types = 0x0, pd_parents_allocated = 0, pd_parents_used = 0,
  _vptr. = 0x8102fc0 <o2be_root::UTL_Scope virtual table>}

it seems to me ScopeAsDecl(prefix_scope) called in
internal_produce_repositoryID() returns a null pointer
so maybe the scope_node_type is not set to a correct value.
somehow, the decl pointer ../..
(gdb) p *decl
$7 = {<COMMON_Base> = {_vptr. = 0x80ffce0 <o2be_name::COMMON_Base virtual table>}, _vb.COMMON_Base = 0x813c564, pd_imported = 1,
  pd_in_main_file = 0, pd_defined_in = 0x813c2ac, pd_node_type = NT_pre_defined, pd_line = -1, pd_file_name = 0x813be00,
  pd_name = 0x813c5e8, pd_local_name = 0x813c540, pd_pragmas = 0x0, pd_added = 0,
  _vptr. = 0x80ffcec <o2be_name::AST_Decl virtual table>}

has a correct pd_node_type = NT_pre_defined so maybe the error is in 
    prefix_scope = decl->defined_in(); in internal_produce_repositoryID() ????