[ghemical-devel] Re: redhat 9 g++ has no dynamic_cast problems

Tommi Hassinen thassine@messi.uku.fi
Tue, 15 Apr 2003 18:13:14 +0300 (WET)


On Tue, 15 Apr 2003, Tommi Hassinen wrote:

> Later today I could do an interesting experiment by taking the object
> files compiled by a RedHat9 compiler and then I link them using Debian
> tools and libs, let's see what happens.

I did this, and now I'm a bit confused. This looks more weird as ever
before.

What I did was, that I compiled v1.00 using RedHat g++-3.2, then removed
	bin/ghemical
	openbabel/libopenbabel.a
	miniMOPAC/libminiMOPAC.a
	src/common/libcommon.a
	src/graphics/libgraphics.a
	src/target3/glade/libglade.a

and packed everything into a tarball. So the object files (*.o) remained
intact, and they were made by the "ok" RedHat compiler. Moved the tarball
into my Debian machine, un-tarred, and did

	export CC=gcc-3.2
	export CXX=g++-3.2
	./configure

to set the correct compiler. Then I just did "make". Make correctly saw
that object files *.o were ok, and did not recompile. It only made the
missing library files *.a and linked the executable bin/ghemical. The
result was an executable THAT DID NOT WORK! Same old crash in dyn-cast.

Ouch! Does that make any sense anymore? Does it mean that the object files
in fact are OK and there is a bug in some library or in the tools that do
the linking???

I'll do this again tomorrow, just to make sure it went right. I'll also do
the reverse experiment by compiling with Debian and linking with RedHat.

Michael, thanks for the notice about gtkglarea. It's probably not too
difficult to switch gtkglarea -> gtkglext at the same time when the app is
moved to glade-2 and gnome-mdi is demolished (post v1.60).

Regards,

	Tommi