Not sure how much this still applies to 7.4 CVS HEAD, nor how far away the next 7.4 release is, but since I got this nice bug report, it just might as well end up where it could do some good:
Date: Mon, 16 Feb 2004 08:17:04 +1100 From: Ben White bwhite@cat.net.au To: jhs@pike.ida.liu.se Subject: Bug in Pike-v7.4.28 distribution
Hi,
There's a problem with a couple of Makefiles in the Pike v7.4.28 distribution that causes compilation errors in the GL and GTK modules when compiled on some platforms.
Basically, the problem is this line in src/post_modules/GL/Makefile.in:
CFLAGS="`echo $(CFLAGS) | sed -e 's/-g//g' -e 's/-W[^ ]*//g' -e 's/-O[^ ]*//g'`$
And this line in src/post_modules/GTK/Makefile.in:
CFLAGS="`echo $(CFLAGS) | sed -e 's/-g//g' -e 's/-W[^ ]*//g'`" \
The problem is the sed expression that removes all occurances of "-g" from CFLAGS. Since CFLAGS will include -I directives, this will fail if any of the directory paths in those directives include the strings "-g". This caused trouble on the Gentoo distribution, where the architecture string looks like Linux-2.4.22-gentoo-r1, because Pike creates directories named after the architecture while compiling modules, and then includes them in CFLAGS as -I directives. I imagine it would also cause trouble if Pike is compiled from a directory that has "-g" or "-W" in its absolute path too.
Regards, Ben
Something like this ought to improve matters, would it not?
CFLAGS="`echo " $(CFLAGS) " | sed -e 's/ -g / /g' -e 's/ -W[^ ]* / /g'`"
/ Martin Stjernholm, Roxen IS
Previous text:
2004-02-15 22:48: Subject: Pike 7.4.28 bug report
Not sure how much this still applies to 7.4 CVS HEAD, nor how far away the next 7.4 release is, but since I got this nice bug report, it just might as well end up where it could do some good:
Date: Mon, 16 Feb 2004 08:17:04 +1100 From: Ben White bwhite@cat.net.au To: jhs@pike.ida.liu.se Subject: Bug in Pike-v7.4.28 distribution
Hi,
There's a problem with a couple of Makefiles in the Pike v7.4.28 distribution that causes compilation errors in the GL and GTK modules when compiled on some platforms.
Basically, the problem is this line in src/post_modules/GL/Makefile.in:
CFLAGS="`echo $(CFLAGS) | sed -e 's/-g//g' -e 's/-W[^ ]*//g' -e 's/-O[^ ]*//g'`$
And this line in src/post_modules/GTK/Makefile.in:
CFLAGS="`echo $(CFLAGS) | sed -e 's/-g//g' -e 's/-W[^ ]*//g'`" \
The problem is the sed expression that removes all occurances of "-g" from CFLAGS. Since CFLAGS will include -I directives, this will fail if any of the directory paths in those directives include the strings "-g". This caused trouble on the Gentoo distribution, where the architecture string looks like Linux-2.4.22-gentoo-r1, because Pike creates directories named after the architecture while compiling modules, and then includes them in CFLAGS as -I directives. I imagine it would also cause trouble if Pike is compiled from a directory that has "-g" or "-W" in its absolute path too.
Regards, Ben
/ Johan Sundström (Achtung Liebe!)
How about
CFLAGS="$(CFLAGS)"
? Do we really need this strange stuff?
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2004-02-15 23:54: Subject: Pike 7.4.28 bug report
Something like this ought to improve matters, would it not?
CFLAGS="`echo " $(CFLAGS) " | sed -e 's/ -g / /g' -e 's/ -W[^ ]* / /g'`"
/ Martin Stjernholm, Roxen IS
I don't know. I guess it was put there for a reason.
Some cvs digging in the GTK module reveals that the first step in that direction (removing the -g flag) was made by Per back in 1999 with the log message "Fixed makefile".
In the GL module, Grubba added a filter for all the flags -g, -W and -O with the message "Attempt at fixing a few warnings." If nothing else, it's strange to remove -g and -O flags for that reason.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-02-16 10:52: Subject: Pike 7.4.28 bug report
How about
CFLAGS="$(CFLAGS)"
? Do we really need this strange stuff?
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
We might try without them and see the pikefarm verdict, unless anyone tells us what good they do, I suppose.
/ Johan Sundström (Achtung Liebe!)
Previous text:
2004-02-16 19:58: Subject: Pike 7.4.28 bug report
I don't know. I guess it was put there for a reason.
Some cvs digging in the GTK module reveals that the first step in that direction (removing the -g flag) was made by Per back in 1999 with the log message "Fixed makefile".
In the GL module, Grubba added a filter for all the flags -g, -W and -O with the message "Attempt at fixing a few warnings." If nothing else, it's strange to remove -g and -O flags for that reason.
/ Martin Stjernholm, Roxen IS
pike-devel@lists.lysator.liu.se