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
|