Bug 5168 - ioquake3 won't compile under Xcode4 ans Snow Leopard
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Platform
Version: GIT MASTER
Hardware: Macintosh MacOS X
: P3 blocker
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2011-08-08 18:23 EDT by Marcello
Modified: 2011-08-10 17:28:08 EDT
2 users (show)

See Also:



Description Marcello 2011-08-08 18:23:37 EDT
SVN release 2139 fail to compile on Mac Os X 10.6.8 and Xcode4 (gcc-4.2) with following errors:

DED_CC code/server/sv_bot.c
code/server/sv_bot.c:1: error: CPU you selected does not support x86-64 instruction set
code/server/sv_bot.c:1: error: CPU you selected does not support x86-64 instruction set
code/server/sv_bot.c:1: error: -mstackrealign not supported in the 64bit mode
make[2]: *** [build/release-darwin-i386/ded/sv_bot.o] Error 1

This is due to wrong march CFLAG in Makefile:
OPTIMIZEVM += -march=prescott -mfpmath=sse
which should be:
OPTIMIZEVM += -march=core2 -mfpmath=sse

Launching make again:
DED_CC code/server/sv_bot.c
code/server/sv_bot.c:1: error: -mstackrealign not supported in the 64bit mode
make[2]: *** [build/release-darwin-i386/ded/sv_bot.o] Error 1

so i have edited Makefile again and commented out the line:
BASE_CFLAGS += -mstackrealign

Finally make it again and this is the result:
DED_CC code/qcommon/vm_x86.c
{standard input}:4292:invalid character (0xd) in operand 2
{standard input}:4293:invalid character (0xd) in operand 2
{standard input}:4294:invalid character (0xd) in operand 2
{standard input}:4295:invalid character (0xd) in operand 1
{standard input}:4296:invalid character (0xd) in operand 1
{standard input}:4297:invalid character (0xd) in operand 1
{standard input}:4298:invalid character (0xd) in operand 1
{standard input}:4299:invalid character (0xd) in operand 1
{standard input}:4300:invalid character (0xd) in operand 1
{standard input}:4301:invalid character (0xd) in operand 1
{standard input}:4302:invalid character (0xd) in operand 1
{standard input}:4303:invalid character (0xd) in operand 1
make[2]: *** [build/release-darwin-i386/ded/vm_x86.o] Error 1

Reading on the web i have seen that this problem was introduced in an earlier release so i have tried to track it back and this is what i have obtained for release 2002:
DED_CC code/qcommon/vm_x86.c
code/qcommon/vm_x86.c:84: warning: cast from pointer to integer of different size
code/qcommon/vm_x86.c:84: error: initializer element is not constant
code/qcommon/vm_x86.c: In function ‘DoSyscall’:
code/qcommon/vm_x86.c:443: warning: passing argument 1 of ‘savedVM->systemCall’ from incompatible pointer type
code/qcommon/vm_x86.c:458: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘intptr_t’
code/qcommon/vm_x86.c: In function ‘VM_Compile’:
code/qcommon/vm_x86.c:1444: warning: cast from pointer to integer of different size
code/qcommon/vm_x86.c:1529: warning: cast from pointer to integer of different size
make[2]: *** [build/release-darwin-i386/ded/vm_x86.o] Error 1

So the bug was introduced with release 2003!!!
Hope it will be fixed as soon as possible
Thx
Tomasini Marcello
Comment 1 Thilo Schulz 2011-08-09 10:14:38 EDT
I don't have a MAC. Can I have shell access to one and try to fix this?
Comment 2 Marcello 2011-08-09 18:35:45 EDT
(In reply to comment #1)
> I don't have a MAC. Can I have shell access to one and try to fix this?

Well, if you have msn (or something compatible), you can add me (pez.marcello at hotmail.it) to your contacts and when we are both online i can give you access to my Mac through Teamviewer.
Comment 3 Thilo Schulz 2011-08-10 05:20:41 EDT
I don't have TeamViewer or stuff like that. Just give me a shell account using sshd
Comment 4 Quinn Ebert 2011-08-10 08:25:44 EDT
Thilo,

I am running a Mac OS X 10.7 "Lion" system, and am seeing the same compile errors.  I'll gladly give you shell access to my machine (preferably under an unprivileged account if that'll work) so you can take a look at this.  I need to give you contact info.  Please contact me directly by email, if possible, otherwise let me know a more secure way to give you direct contact info.  (Network security student here, hence the deep-rooted basic paranoia phenomenon). ;-)

Thank You!
--Quinn

(In reply to comment #3)
> I don't have TeamViewer or stuff like that. Just give me a shell account using
> sshd
Comment 5 Thilo Schulz 2011-08-10 17:28:08 EDT
Fixed r2143