[ghemical-devel] build error with gcc-3.2(?)

Michael Banck mbanck@gmx.net
Mon, 24 Feb 2003 20:52:33 +0100


Hi,

As mpqc is now rebuilt with gcc-3.2 in debian and the old libsc2-library
gone, I had to rebuild ghemical against the latest libsc4. Unfortunately,
I was not very successful...

The first problem was in /src/target3/t3views.h. It #includes gnome.h,
which by itsself seems to #include libintl.h since lately, so this
resulted in a sytax error:

 In file included from
 /usr/include/c++/3.2/i386-linux/bits/c++locale.h:39,
                  from /usr/include/c++/3.2/bits/localefwd.h:46,
                  from /usr/include/c++/3.2/ios:48,
                  from /usr/include/c++/3.2/ostream:45,
                  from /usr/include/c++/3.2/iostream:45,
                  from ../../src/common/typedef.h:20,
                  from ../../src/common/v3d.h:17,
                  from ../../src/graphics/objects.h:32,
                  from ../../src/graphics/camera.h:34,
                  from ../../src/graphics/mtools.h:42,
                  from ../../src/graphics/views.h:39,
                  from t3views.h:28,
                  from t3main.h:19,
                  from t3main.cpp:10:
 /usr/include/libintl.h:40: syntax error before `__const'
 /usr/include/libintl.h:44: syntax error before `__const'
 /usr/include/libintl.h:52: syntax error before `__const'
 /usr/include/libintl.h:81: syntax error before `__const'
 /usr/include/libintl.h:86: syntax error before `__const'

I got the suggestion to comment out the #include gnome.h in t3views.h,
wich helped to build ghemical (see http://bugs.debian.org/182251 for a
bit of further discussion about this) 

The second and more severe problem is that ghemical segfaults as soon as
I want to File->New anything. Here is the backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0a89df5b in ?? ()
(gdb) bt
#0  0x0a89df5b in ?? ()
#1  0x080ae9b8 in gnome_docv::GnomeViewCreator(_GnomeMDIChild*, void*) (
    child=0xa81b694) at t3docv.cpp:91
#2  0x40450a3d in gnome_mdi_generic_child_set_label_func_full ()
   from /usr/lib/libgnomeui.so.32
#3  0x4045060b in gnome_mdi_child_set_menu_template ()
   from /usr/lib/libgnomeui.so.32
#4  0x4045041e in gnome_mdi_child_add_view () from /usr/lib/libgnomeui.so.32
#5  0x4044e3ee in gnome_mdi_add_view () from /usr/lib/libgnomeui.so.32
#6  0x080ae79f in gnome_docv::InitGnomeMDIChild() (this=0xa81b640)
    at t3docv.cpp:64
#7  0x401fa1b9 in gtk_marshal_NONE__NONE () from /usr/lib/libgtk-1.2.so.0
#8  0x40229b6c in gtk_signal_remove_emission_hook ()
   from /usr/lib/libgtk-1.2.so.0
#9  0x40228fd5 in gtk_signal_set_funcs () from /usr/lib/libgtk-1.2.so.0
#10 0x402270b3 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#11 0x4025dc4e in gtk_widget_activate () from /usr/lib/libgtk-1.2.so.0
#12 0x40202614 in gtk_menu_shell_activate_item () from /usr/lib/libgtk-1.2.so.0
#13 0x4020189a in gtk_menu_shell_deactivate () from /usr/lib/libgtk-1.2.so.0
#14 0x401f9e43 in gtk_marshal_BOOL__POINTER () from /usr/lib/libgtk-1.2.so.0
#15 0x40229013 in gtk_signal_set_funcs () from /usr/lib/libgtk-1.2.so.0
#16 0x402270b3 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#17 0x4025db0b in gtk_widget_event () from /usr/lib/libgtk-1.2.so.0
#18 0x401f9d95 in gtk_propagate_event () from /usr/lib/libgtk-1.2.so.0
#19 0x401f8efe in gtk_main_do_event () from /usr/lib/libgtk-1.2.so.0
#20 0x402a84d7 in gdk_wm_protocols_filter () from /usr/lib/libgdk-1.2.so.0
#21 0x402d74c8 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#22 0x402d7ad3 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#23 0x402d7c6c in g_main_run () from /usr/lib/libglib-1.2.so.0
#24 0x401f87f7 in gtk_main () from /usr/lib/libgtk-1.2.so.0
#25 0x080adbcd in main (argc=1, argv=0xbffff924) at t3main.cpp:749

t3docv.cpp:91 says:

	gnome_docv * docv2 = dynamic_cast<gnome_docv *>(docv1);

and I get a segfault in gdb as soon as I step over that line.

I can post the versions of the packages I've installed in order to build
ghemical if somebody wants them, but the list is *big* :)

All those packages should be compiled with gcc-3.2 by now, so perhaps
the problem lies there, i.e. ghemical has issues with gcc-3.2? OTOH, the
list of packages is big, so the error could well be in one of them, or
even connected with the commenting out of #gnome.h above?

thanks for any hint,

Michael