Lionel Elie Mamane wrote:
Background: Achim Brucker and myself are packaging Poly/ML for Debian.
That's good. Thank you both for doing that.
I noticed that:
Compilation of file libpolyml/xwindows.cpp with gcc 4.2.3 gives several instances of:
warning: dereferencing type-punned pointer will break strict-aliasing rules
libpolyml/Makefile.am has
AM_CFLAGS = $(OSFLAG) -Wall -fno-strict-aliasing
So I kinda guess that libpolyml/xwindows.cpp was supposed to be compiled with -fno-strict-aliasing, too, and you just forgot to put it in CXXFLAGS as well as CFLAGS? Or is the situation something else?
These messages come from various XmIs... macros in the lesstif library. I get these when I build on Debian 'etch' (gcc 4.1.2 + lesstif 0.94.4-2) but not on Debian 'lenny' (gcc 4.3.1 + lesstif 1:0.95.0-2.1). That suggests the problems have been fixed in the library. Given that, I think it would be better not to add -fno-strict-aliasing to CXXFLAGS and I'm not sure why it's in CFLAGS.
If you're building a package it may well be better to build it without Motif altogether. I would expect that very few people actually want Poly/ML with Motif and by building a package with it in you're adding dependencies on both lesstif and other X libraries. The current configure script only enables the X-windows/Motif code if all the libraries and headers are present on the machine and if the user has not specified --without-x. I was considering changing the default so that the user would have to explicitly specify --with-x to get the X-Windows/Motif code.
Anyway, thanks for looking at this.
David