On Mar 11,  3:40pm, Allan Rae wrote:
> Subject: Re: Problems compiling LyX
> On Wed, 10 Mar 1999, Jean-Marc Lasgouttes wrote:
>
> > >>>>> "Volker" == Volker Enderlein <[EMAIL PROTECTED]>
writes:
> >
> > Volker> Hi, I've got some problems while running LyX 1.0.0 (02/23/99)
> > Volker> and 1.0.1 (03/04/99) on my SGI-Workstation (SGI Indigo2 IMPACT
> > Volker> 10000, IRIX64 wega 6.2 06101031 IP28). During the Compilation
>
> Did you have previous versions of LyX working at all or are you new to
> LyX?  Just wondering if we can narrow down the problem a bit better.
>
> > Volker> with the native CC and cc compilers (switches -32) no errors
> > Volker> occur. But after starting LyX it crashes with a SIGSEGV
> > Volker> message without opening any window. I'm using the xforms
> > Volker> library version 0.88 and the xpm library version 4.7.
>
> (after some thought I came back and wrote this)
> Could you try running lyx with a private colormap.
>       lyx -private
> I get crashes caused by xforms when there aren't enough colours available
> and I'm wondering if we are seeing something similar happening here.
>
> > Volker> I've also tried the g++ and gcc compilers but with the same
> > Volker> result.  gcc-2.7.2, mips-sgi-irix5.2 - binary compatible in 32
> > Volker> bit mode to irix646.2 (my admin said to me)
> >
> > Volker> (gdb) run Starting program:
> > Volker> /home/ifm/volker/temp/lyx-1.0.0/src/lyx1.0.0sgi
> >
> > Volker> Program received signal SIGSEGV, Segmentation fault.  0x54dfe0
> > Volker> in LString::operator= () (gdb) bt #0 0x54dfe0 in
> > Volker> LString::operator= () #1 0x446d54 in LyXGUI::LyXGUI () #2
> > Volker> 0x43f248 in LyX::LyX () #3 0x43effc in main () #4 0x43ee38 in
> > Volker> __start () at crt1text.s:165 (gdb) quit
> >
> > What is the linke that your gcc uses? I think it might be a resurgence
> > of the infamous static initialization order for the LString
> > class. Could you provide us with a backtrace with debug information?
>
> The line in question is probably:
>
>       background_color = b_c;    // lyx_gui.C:191
>
> Both background_color (an LString) and b_c (a char[32]) are declared
> earlier at file scope (lines 123 and 124 respectively).
>
> b_c is set by xforms in the fl_get_app_resources() call (line 181).
>
> There should be no "static initialisation order" problems within LString
> because the static empty_reps are all local to the functions that use them
> (and none of those are inlined which is what caused some difficulties in
> the past; unless of course all those compilers for mips are so stupid they
> can't handle local statics correctly and I doubt that's the case).
>
> Likewise, background_color and b_c are at file scope and according to the
> C++ standard they are initialised before any of the functions or methods
> implemented in the file are used.
>
> If background_color hasn't been constructed yet then we could certainly
> see this kind of crash although it would probably occur in the inlined
> lose() call from within operator=(char const *).  Which wouldn't be seen
> on the stack trace unless debugging info was available.
>
> Another possibility is the strlen() in operator=(char const *) but again
> that should have shown up on the trace.  Likewise the memcpy() call.
>
> The only other possibility I can think of is if somehow we've managed to
> attempt to delete LString::LString()::empty_rep within lose().  But this
> should be impossible.
>
> Stumped,
> Allan. (ARRae)
>
Think you're right. Just found the time to install GNU 2.8.1 with debug
support. As linked with GNU CC 2.7.2, the same effect occurs. But now I'm able
to provide you with a backtrace. Don't be confused about the irix version. I
build the compiler on my host for mips-sgi-irix5.3 and uses the operating
system's linker not the GNU ld.

gdb --se=lyx1.0.0sgi
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (mips-sgi-irix5.2), Copyright 1996 Free Software Foundation, Inc...
(gdb) run
Starting program: /tmp_mnt/home/h/saturn1/volker/temp/lyx-1.0.0/src/lyx1.0.0sgi

Program received signal SIGSEGV, Segmentation fault.
0x61b900 in LString::operator= (this=0x10058ee0, s=0x10059288 "linen") at
LString.C:93
93              static srep empty_rep;
(gdb) bt
#0  0x61b900 in LString::operator= (this=0x10058ee0, s=0x10059288 "linen") at
LString.C:93
#1  0x454b70 in LyXGUI::LyXGUI (this=0x100c55d0, owner=0x10059288,
argc=0x7fff2f20, argv=0x7fff2f44, GUI=void)
    at lyx_gui.C:186
#2  0x441214 in LyX::LyX (this=0x7fff2ee8, argc=0x7fff2f20, argv=0x7fff2f44) at
../src/lyx_main.C:85
#3  0x440d64 in main (argc=1, argv=0x7fff2f44) at ../src/main.C:51
#4  0x440a68 in __start () at crt1text.s:165
(gdb)

Cheers, Volker


-- 
Volker Enderlein
Institut fuer Mechatronik e.V. an der
Technischen Universitaet Chemnitz
Reichenhainer Strasse 88
D-09126 Chemnitz
Phone: +49 (0)371 5314681
Fax  : +49 (0)371 5314669
Email: [EMAIL PROTECTED]

Reply via email to