info-inventor-dev
[Top] [All Lists]

Re: problem with SoWriteAction, ivcat and textures?

To: mikkelsond@xxxxxxxxxxx
Subject: Re: problem with SoWriteAction, ivcat and textures?
From: jlim@xxxxxxxxxxxxxxxxxxxx (Jonathan Lim)
Date: Mon, 23 Oct 2000 20:01:51 -0700 (PDT)
Cc: info-inventor-dev@xxxxxxxxxxx
In-reply-to: <39F4A6C7.51F25019@xxxxxxxxxxx> from "Dennis Mikkelson" at Oct 23, 2000 03:59:52 PM
Sender: owner-info-inventor-dev@xxxxxxxxxxx
On Mon Oct 23 13:59:52 2000, mikkelsond@xxxxxxxxxxx wrote:
> 
>   I've been having problems using SoWriteAction.  It works fine in many
> cases, but fails in others.  For example, if I load the file
> .../models/furniture/table.iv  as part of a scene graph and then try to
> write the scene graph using SoWriteAction, I get a Segmentation fault.
> In fact, using ivcat on the table.iv file also causes a Seg fault.  The
> error shows up using ivcat with other files using textures, such as
> .../models/slotMachine.iv, so I originally thought the problem might be
> with textures.  However, I modified the Inventor Mentor example
> 07.1.BasicTexture.c++ to write the scene graph to a file using
> SoWriteAction, and it worked fine.  If the problem is due to textures,
> it is only a problem for certain textures.
> 
>   Has anyone else observed this problem, or is it a problem with my
> particular system and configuration?  ( Redhat 6.2 with
> openmotif-2.1.30-MLI from MetroLink. )

I found what the problem is ... the following initialization in SoBase.c++ is
not completed:

  SbString SoBase::instancePrefix = "+";

likely because I'm using 'ld' to create libInventor.so, rather than 'g++'.
However, when I changed the compile options as follows:

  /usr/bin/g++ -L../libimage -L../libFL/src -shared -Wl,--whole-archive
  -L/usr/X11R6/lib -L$IVROOT/usr/lib libInventor.a
  -ljpeg -limage -lFL -lX11 -ldl -lm -lGLU -lGL -o libInventor.so

I get:

  /usr/bin/ld: internal error ldlang.c 3669
  collect2: ld returned 1 exit status
  make: *** [libInventor.so] Error 1

A partial trace of the link process shows the ld error occurs while reading:

  (/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/libgcc.a)_ctors.o

Does anyone know how to fix this?


              Jonathan Lim  _  Silicon Graphics  _  Mountain View
              GPS Graphics     Computer Systems        CA, USA

<Prev in Thread] Current Thread [Next in Thread>