[Freeciv-Dev] [bug #18872] Freeciv does not compile with clang

2011-10-28 Thread David Lowe

Follow-up Comment #4, bug #18872 (project freeciv):

Neither the shared.c error or the md5.c error appear without --enable-debug,
so perhaps i named this ticket incorrectly.  Actually i've just collected a
third warning that pops up in this environment.  Should i split out the new
one and the 'comparison of unsigned expression' problem into separate tickets?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #18872] Freeciv does not compile with clang

2011-10-27 Thread Jacob Nevins

Follow-up Comment #3, bug #18872 (project freeciv):


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)
   ^~


Rats; that's the new MD5 code I pulled in for bug #18170. Checking upstream

finds no new version. I suppose we're going to have to work out if there's a
bug intrinsic to that code or just in the way I integrated it into Freeciv.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #18872] Freeciv does not compile with clang

2011-10-27 Thread David Lowe

Follow-up Comment #2, bug #18872 (project freeciv):

My package does set --enable-debug, but i thought the user in question had
deleted that line.  I don't currently have access to 10.7, so i'm awaiting his
response.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #18872] Freeciv does not compile with clang

2011-10-27 Thread Jason Dorje Short

Follow-up Comment #1, bug #18872 (project freeciv):

The warning you show is a minor bug perhaps, but the real question here is
why is compilation using -Werror?  You didn't pass --enable-debug=yes or
--enable-debug=checks to the autogen / configure script?  Or is the
non-presence of gcc confusing it somehow?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #18872] Freeciv does not compile with clang

2011-10-27 Thread David Lowe

URL:
  

 Summary: Freeciv does not compile with clang
 Project: Freeciv
Submitted by: doctorjlowe
Submitted on: Thu 27 Oct 2011 09:25:41 AM PDT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 2.3.0
 Discussion Lock: Any
Operating System: Mac OS
 Planned Release: 

___

Details:

Clang is now the default compiler on OSX 10.7 A.K.A Lion, and also OSX 10.6
A.K.A Snow Leopard with the optional XCode 4.2 update.  On those systems, an
ordinary make fails like so:

/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)
   ^~

The workaround for now is to force usage of the less strict llvm compiler,
though i expect clang usage is going to become more widespread.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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