OpenTTD

Tasklist

FS#3190 - [OSX] compile error on MacOS 10.6

Attached to Project: OpenTTD
Opened by Ingo von Borstel (planetmaker) - Thursday, 10 September 2009, 17:25 GMT
Last edited by Michael Lutz (michi_cc) - Monday, 12 October 2009, 00:19 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System Mac OS X
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

aeolusreloaded:trunk ingo$ make
In file included from /Users/ingo/ottd/trunk/src/core/../stdafx.h:16,
from /Users/ingo/ottd/trunk/src/core/alloc_func.cpp:12:
/Users/ingo/ottd/trunk/src/core/../os/macosx/osx_stdafx.h:30:3: error: #error "Compiling 64 bits without _SQ64 set! (or vice versa)"
make[1]: *** [alloc_func.o] Error 1
I couldn't establish where those symbols should have been defined, but I guess in one of the system's libs...

Compilation is successful, if I remove the check in line 30 in osx_stdafx.h. But that feels like a rather ugly hack.

Tested with r17495 and gcc 4.2
This task depends upon

This task blocks these from closing
 FS#2782 - [OSX] Port hopelessly outdated 
Closed by  Michael Lutz (michi_cc)
Monday, 12 October 2009, 00:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r17767 and r17768.
Comment by Remko Bijker (Rubidium) - Thursday, 10 September 2009, 19:11 GMT
Oh lovelyl... as expected it fails horribly in the 'real' world where it barely worked with the compile farm.

For some reason it isn't defining that it *is* a 64 bits compiler, yet it did compile the 64 bits test application as a 64 bits compiler.

What's extra 'nice' in this is that the headers are littered with those little __LP64__ checks to stop you from building against things like quicktime.
Comment by Remko Bijker (Rubidium) - Thursday, 10 September 2009, 19:46 GMT
For those who think that I am going to fix this: no I am not going. All efforts to get something somewhat working with the compile farm ended in something, which broke a compilation at lots of other people, so stuff was done to make their previously working systems compile OpenTTD again. This is just another case where OSX does not behave the same for everyone.

I do not have the equipment real, virtual or otherwise to give any proper support so the best I can do is not make it worse; I won't be touching it anymore including patches written by others as those have backfired more often than not.
Comment by Ingo von Borstel (planetmaker) - Thursday, 24 September 2009, 06:25 GMT
a query for whether STRGEN is compiled or not also helps and leaves the check otherwise unharmed
Comment by Ingo von Borstel (planetmaker) - Thursday, 24 September 2009, 11:46 GMT
accidential repost.
Comment by Ingo von Borstel (planetmaker) - Monday, 05 October 2009, 10:18 GMT
One of the revisions up to r17717 changed src/video/cocoa/fullscreen.mm and requires some fixes related to the goto jumps in order to compile with gcc 4.2. The solution is to declare all variables prior to the first possible jump. The attached patch fixes that as well as the compile failure in strgen reported above.

[SRC] Compiling video/cocoa/fullscreen.mm
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm: In member function ‘bool FullscreenSubdriver::SetVideoMode(int, int)’:
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:346: error: jump to label ‘ERR_NOT_INDEXED’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:318: error: from here
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:337: error: crosses initialization of ‘NSPoint pt’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:333: error: crosses initialization of ‘NSRect screen_rect’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:349: error: jump to label ‘ERR_DOUBLEBUF’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:313: error: from here
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:337: error: crosses initialization of ‘NSPoint pt’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:333: error: crosses initialization of ‘NSRect screen_rect’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:351: error: jump to label ‘ERR_NO_SWITCH’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:300: error: from here
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:337: error: crosses initialization of ‘NSPoint pt’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:333: error: crosses initialization of ‘NSRect screen_rect’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:353: error: jump to label ‘ERR_NO_CAPTURE’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:294: error: from here
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:337: error: crosses initialization of ‘NSPoint pt’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:333: error: crosses initialization of ‘NSRect screen_rect’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:355: error: jump to label ‘ERR_NO_MATCH’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:277: error: from here
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:337: error: crosses initialization of ‘NSPoint pt’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:333: error: crosses initialization of ‘NSRect screen_rect’
/Users/ingo/ottd/trunk/src/video/cocoa/fullscreen.mm:289: error: crosses initialization of ‘int gamma_error’

Loading...