Re: [Freeciv-Dev] compile issues

2011-10-28 Thread Matthias Pfafferodt
> >> Yes, it says as much in the header.  IMO it is essential that the code
> >> compile with --enable-debug=checks; the only solutions therefore are
> >> to remove this one check (which seems fine to me) or to make the
> >> checks work differently per-directory.  The latter would probably be
> >> pretty easy actually with a bit of Makefile.am magic and some small
> >> changes to debug.m4 - that is, allowing the Makefile.am to set a
> >> DEBUG_CFLAGS variable that overrides the default.
> > 
> > Could you check the two files in https://gna.org/patch/index.php?2960 ...
> 
> Which two? And what am I testing them for?

Sorry, my answer was too short ;-)

The patch basically rewrites the debug.m4 file. It collects all debug relating 
code of the configure process and puts it in this file. The second patch 
changes the handling of --enable-debug=yes to include nearly all checks but 
the check which results in a compile error for gtk2. This check can be 
activated using --enable-debug=checks.

The question is, if this is a configuration as you asked?

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] compile issues

2011-10-28 Thread Jason Dorje Short
On Fri, Oct 28, 2011 at 5:30 PM, Matthias Pfafferodt
 wrote:
> Am Mittwoch, 26. Oktober 2011, 23:25:49 schrieben Sie:
>> On Wed, Oct 26, 2011 at 4:50 PM, Matthias Pfafferodt
>>
>>  wrote:
>> > Am Mittwoch, 26. Oktober 2011, 01:26:49 schrieb Jason Dorje Short:
>> >> In file included from /usr/include/gtk-2.0/gtk/gtk.h:236:0,
>> >>                  from colors.h:16,
>> >>                  from chatline.c:44:
>> >> /usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function
>> >> declaration isn't a prototype [-Werror=strict-prototypes]
>> >> cc1: all warnings being treated as errors
>> >
>> > This is a known bug which will not be fixed due to compatibility reasons
>> > (see the documentation in ./doc/HACKING). I think the check is important
>> > but it prevents building the gtk2 client. On my computer I did change
>> > the gtk2 header file to use his debug option but I know this is not
>> > always possible ...
>>
>> Yes, it says as much in the header.  IMO it is essential that the code
>> compile with --enable-debug=checks; the only solutions therefore are
>> to remove this one check (which seems fine to me) or to make the
>> checks work differently per-directory.  The latter would probably be
>> pretty easy actually with a bit of Makefile.am magic and some small
>> changes to debug.m4 - that is, allowing the Makefile.am to set a
>> DEBUG_CFLAGS variable that overrides the default.
>
> Could you check the two files in https://gna.org/patch/index.php?2960 ...

Which two? And what am I testing them for?

-jason

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] compile issues

2011-10-28 Thread Matthias Pfafferodt
Am Mittwoch, 26. Oktober 2011, 23:25:49 schrieben Sie:
> On Wed, Oct 26, 2011 at 4:50 PM, Matthias Pfafferodt
> 
>  wrote:
> > Am Mittwoch, 26. Oktober 2011, 01:26:49 schrieb Jason Dorje Short:
> >> In file included from /usr/include/gtk-2.0/gtk/gtk.h:236:0,
> >>  from colors.h:16,
> >>  from chatline.c:44:
> >> /usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function
> >> declaration isn't a prototype [-Werror=strict-prototypes]
> >> cc1: all warnings being treated as errors
> > 
> > This is a known bug which will not be fixed due to compatibility reasons
> > (see the documentation in ./doc/HACKING). I think the check is important
> > but it prevents building the gtk2 client. On my computer I did change
> > the gtk2 header file to use his debug option but I know this is not
> > always possible ...
> 
> Yes, it says as much in the header.  IMO it is essential that the code
> compile with --enable-debug=checks; the only solutions therefore are
> to remove this one check (which seems fine to me) or to make the
> checks work differently per-directory.  The latter would probably be
> pretty easy actually with a bit of Makefile.am magic and some small
> changes to debug.m4 - that is, allowing the Makefile.am to set a
> DEBUG_CFLAGS variable that overrides the default.

Could you check the two files in https://gna.org/patch/index.php?2960 ...

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] compile issues

2011-10-26 Thread Jason Dorje Short
On Wed, Oct 26, 2011 at 4:50 PM, Matthias Pfafferodt
 wrote:
> Am Mittwoch, 26. Oktober 2011, 01:26:49 schrieb Jason Dorje Short:

>> In file included from /usr/include/gtk-2.0/gtk/gtk.h:236:0,
>>                  from colors.h:16,
>>                  from chatline.c:44:
>> /usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function
>> declaration isn't a prototype [-Werror=strict-prototypes]
>> cc1: all warnings being treated as errors
>
> This is a known bug which will not be fixed due to compatibility reasons (see
> the documentation in ./doc/HACKING). I think the check is important but it
> prevents building the gtk2 client. On my computer I did change the gtk2 header
> file to use his debug option but I know this is not always possible ...

Yes, it says as much in the header.  IMO it is essential that the code
compile with --enable-debug=checks; the only solutions therefore are
to remove this one check (which seems fine to me) or to make the
checks work differently per-directory.  The latter would probably be
pretty easy actually with a bit of Makefile.am magic and some small
changes to debug.m4 - that is, allowing the Makefile.am to set a
DEBUG_CFLAGS variable that overrides the default.

-jason

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] compile issues

2011-10-26 Thread Matthias Pfafferodt
Am Mittwoch, 26. Oktober 2011, 01:26:49 schrieb Jason Dorje Short:
> On Mon, Oct 24, 2011 at 4:33 PM, Marko Lindqvist  wrote:
> > On 24 October 2011 22:20, Jason Dorje Short  wrote:
> >> For the first time in some time, I have time for freeciv work.  But on
> >> compiling, --enable-debug=checks (--enable-debug=yes in older
> >> branches) doesn't compile in trunk or in most branches anymore.
> >> 
> >> One issue does seem to be in the GTK header files, both not under our
> >> control and commented in the headers as being deprecated in C99 but
> >> needed for backwards compatibility.  That particular check (-W flag
> >> given to gcc) will have to be removed for it to compile.
> > 
> >  What distribution are you using? Are you using distribution's
> > versions of both gcc and gtk+ (one would assume that those are
> > compatible with each other)? I have no such problems with Debian
> > Wheezy; gcc  4.6.1, gtk2 2.24.6
> 
> Ubuntu oneiric.
> 
> $ gcc --version
> gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
> 
> $ dpkg -l | grep libgtk2.0-dev
> ii  libgtk2.0-dev  2.24.6-0ubuntu5
>Development files for the GTK+ library
> 
> 
> 
> In file included from /usr/include/gtk-2.0/gtk/gtk.h:236:0,
>  from colors.h:16,
>  from chatline.c:44:
> /usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function
> declaration isn't a prototype [-Werror=strict-prototypes]
> cc1: all warnings being treated as errors

This is a known bug which will not be fixed due to compatibility reasons (see 
the documentation in ./doc/HACKING). I think the check is important but it 
prevents building the gtk2 client. On my computer I did change the gtk2 header 
file to use his debug option but I know this is not always possible ...

> 
> -jason
> 
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] compile issues

2011-10-25 Thread Jason Dorje Short
On Mon, Oct 24, 2011 at 4:33 PM, Marko Lindqvist  wrote:
> On 24 October 2011 22:20, Jason Dorje Short  wrote:
>> For the first time in some time, I have time for freeciv work.  But on
>> compiling, --enable-debug=checks (--enable-debug=yes in older
>> branches) doesn't compile in trunk or in most branches anymore.
>>
>> One issue does seem to be in the GTK header files, both not under our
>> control and commented in the headers as being deprecated in C99 but
>> needed for backwards compatibility.  That particular check (-W flag
>> given to gcc) will have to be removed for it to compile.
>
>  What distribution are you using? Are you using distribution's
> versions of both gcc and gtk+ (one would assume that those are
> compatible with each other)? I have no such problems with Debian
> Wheezy; gcc  4.6.1, gtk2 2.24.6

Ubuntu oneiric.

$ gcc --version
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1

$ dpkg -l | grep libgtk2.0-dev
ii  libgtk2.0-dev  2.24.6-0ubuntu5
   Development files for the GTK+ library



In file included from /usr/include/gtk-2.0/gtk/gtk.h:236:0,
 from colors.h:16,
 from chatline.c:44:
/usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function
declaration isn't a prototype [-Werror=strict-prototypes]
cc1: all warnings being treated as errors

-jason

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] compile issues

2011-10-24 Thread David Lowe
On 24 Oct, 2011, at 1:33 PM, Marko Lindqvist wrote:

> On 24 October 2011 22:20, Jason Dorje Short  wrote:
>> For the first time in some time, I have time for freeciv work.  But on
>> compiling, --enable-debug=checks (--enable-debug=yes in older
>> branches) doesn't compile in trunk or in most branches anymore.
>> 
>> One issue does seem to be in the GTK header files, both not under our
>> control and commented in the headers as being deprecated in C99 but
>> needed for backwards compatibility.  That particular check (-W flag
>> given to gcc) will have to be removed for it to compile.
> 
> What distribution are you using? Are you using distribution's
> versions of both gcc and gtk+ (one would assume that those are
> compatible with each other)? I have no such problems with Debian
> Wheezy; gcc  4.6.1, gtk2 2.24.6
> 
>> Another common issue is a seemingly new catch by the compiler of
>> unused variables that are set but never used.  Many of these are
>> accidental but some happen in iterate loops where a variable is
>> provided but not used within the loop.  For this I propose a macro to
>> mark the variable as unused, which will tell both the compiler and the
>> reader what's going on.
> 
> These are new with gcc 4.6. I have fixed most of them, and have
> patches for many of the remaining ones. Your macro is probably
> required for the remaining ones.
> See bug #18217

Yeah, i need to file some bugs in this area too.  Compilation fails 
when using clang [which is now default on OSX 10.7/XCode 4.2]:

> 
> /bin/sh ../libtool --preserve-dup-deps --silent --tag=CC   --mode=compile
> gcc -DHAVE_CONFIG_H -I. -I..   -I/sw/include
> -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\""
> -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.3:/sw/share/freeciv\""
> -DDEFAULT_SAVES_PATH="\"\""
> -DDEFAULT_SCENARIO_PATH="\".:data/scenario:~/.freeciv/2.3/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenario\""
> -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes
> -Wmissing-declarations -Wno-unused-but-set-variable -Werror -g -O2
> -fsigned-char -c -o shared.lo shared.c
> shared.c:370:36: error: comparison of unsigned expression >= 0 is always
> true [-Werror,-Wtautological-compare]
>  while (mantissa != 0 && exponent >= 0) {
>   ^  ~
> /bin/sh ../libtool --preserve-dup-deps --silent --tag=CC   --mode=compile
> gcc -DHAVE_CONFIG_H -I. -I..   -I/sw/include
> -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\""
> -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.3:/sw/share/freeciv\""
> -DDEFAULT_SAVES_PATH="\"\""
> -DDEFAULT_SCENARIO_PATH="\".:data/scenario:~/.freeciv/2.3/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenario\""
> -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes
> -Wmissing-declarations -Wno-unused-but-set-variable -Werror -g -O2
> -fsigned-char -c -o md5.lo md5.c
> md5.c:148:5: error: cast from 'const unsigned char *' to 'MD5_u32plus *'
> (aka 'unsigned int *') increases required alignment from 1 to 4
> [-Werror,-Wcast-align]
>STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
>^~

In the meantime i've set my package to use llvm, but enable-debug is 
problematic.  A user reported that it "fails later with warnings registry.c".  
I don't have a specific error message, but will see what i can dig up.

Sent from my MacBookPro

Drink your coffee!  There are poor people in India sleeping.
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] compile issues

2011-10-24 Thread Marko Lindqvist
On 24 October 2011 22:20, Jason Dorje Short  wrote:
> For the first time in some time, I have time for freeciv work.  But on
> compiling, --enable-debug=checks (--enable-debug=yes in older
> branches) doesn't compile in trunk or in most branches anymore.
>
> One issue does seem to be in the GTK header files, both not under our
> control and commented in the headers as being deprecated in C99 but
> needed for backwards compatibility.  That particular check (-W flag
> given to gcc) will have to be removed for it to compile.

 What distribution are you using? Are you using distribution's
versions of both gcc and gtk+ (one would assume that those are
compatible with each other)? I have no such problems with Debian
Wheezy; gcc  4.6.1, gtk2 2.24.6

> Another common issue is a seemingly new catch by the compiler of
> unused variables that are set but never used.  Many of these are
> accidental but some happen in iterate loops where a variable is
> provided but not used within the loop.  For this I propose a macro to
> mark the variable as unused, which will tell both the compiler and the
> reader what's going on.

 These are new with gcc 4.6. I have fixed most of them, and have
patches for many of the remaining ones. Your macro is probably
required for the remaining ones.
See bug #18217


 - ML

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] compile issues

2011-10-24 Thread Jason Dorje Short
For the first time in some time, I have time for freeciv work.  But on
compiling, --enable-debug=checks (--enable-debug=yes in older
branches) doesn't compile in trunk or in most branches anymore.

One issue does seem to be in the GTK header files, both not under our
control and commented in the headers as being deprecated in C99 but
needed for backwards compatibility.  That particular check (-W flag
given to gcc) will have to be removed for it to compile.

Another common issue is a seemingly new catch by the compiler of
unused variables that are set but never used.  Many of these are
accidental but some happen in iterate loops where a variable is
provided but not used within the loop.  For this I propose a macro to
mark the variable as unused, which will tell both the compiler and the
reader what's going on.

My first task will be making up a patch for this, which IMO should be
taken care of before the branching.  If there's anything else I should
look at though let me know.

I'm on irc (#freeciv-dev on irc.freenode.org) if anyone wants to
discuss in realtime.

-jason

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev