#670 closed defect (fixed)
unrecognised format 'macho64' on OS X
Reported by: | Micah Gideon Modell | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 7 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
In attempting to build on OS X Snow Leopard (10.6.5), I run into the following fatal error:
...a whole bunch of stuff... ==== Building test_gen ==== amd64_asm.asm nasm: fatal: unrecognised output format `macho64' - use -hf for a list type `nasm -h' for help make[1]: *** [obj/lowlevel_Release/amd64_asm.o] Error 1 make: *** [lowlevel] Error 2 make: *** Waiting for unfinished jobs.... make[1]: `../../../binaries/system/libwxJS.a' is up to date.
My brief searching indicates that there's hack in place to support linux compilation or something of the sort and I suspect it is interfering.
Attachments (1)
Change History (12)
comment:1 by , 13 years ago
Priority: | blocker → minor |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 13 years ago
Priority: | minor → major |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Actually, scratch that - it's the same error:
../../../source/lib/timer.h:181: warning: dereferencing type-punned pointer will break strict-aliasing rules tex_tga.cpp amd64.cpp amd64_asm.asm nasm: fatal: unrecognised output format `macho64' - use -hf for a list type `nasm -h' for help make[1]: *** [obj/lowlevel_Release/amd64_asm.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [lowlevel] Error 2
I updated nasm, changed the line in the config script (I'll upload it - the line I changed wasn't identical) and now I'm getting the above.
by , 13 years ago
Attachment: | update-workspaces.sh added |
---|
comment:4 by , 13 years ago
Priority: | major → minor |
---|
It may have said --atlas instead of --editor. Yours looks good though. Atlas can cause some build errors, and since it doesn't work yet anyway, it's not worth wasting your time on the errors. That's why we're taking that flag out. But I wouldn't call this a major issue. Minor doesn't mean it won't be fixed, but major is more for universal issues.
Make sure you're booted with 64-bit kernel enabled. To check if you are, check up in the system profiler (hit the Apple on the left of the menu bar, go to About This Mac, click More Info..., then click the Software heading). If it says "No", follow these instructions: http://support.apple.com/kb/HT3773
If you want more direct and immediate help from the development team, stop by our IRC channel:
irc.quakenet.org #0ad OR #0ad-dev
comment:5 by , 13 years ago
It seems the issue is that my machine doesn't support the 64 bit kernel and extensions. Does the game itself require them? If so, why? Is this documented anywhere?
comment:6 by , 13 years ago
Hmm, you shouldn't get the "unrecognised output format `macho64'" error if you have the latest nasm. You may need to run
sudo port selfupdate
and then do
sudo port upgrade nasm
to get the latest. If that doesn't help, what's the output from running:
nasm -v which nasm
?
The game itself supports 32-bit and 64-bit compilation - the problem seems to be that the build system gets confused on OS X and tries compiling in the wrong mode. (I get confused too, and don't know what the right mode is - maybe 32-bit on 10.5 and 64-bit on 10.6 but I'm not really sure). If you get errors other than the macho64
one, you may need to edit build/premake/premake.lua
and add the line
arch="amd64
just before the "-- Set up the Project" line, then run update-workspaces again, to trick it into using the right mode. (Would be much better if we could detect this automatically.)
comment:7 by , 13 years ago
OK, now I get:
==== Regenerating Makefiles ==== make: premake: No such file or directory make: *** [Makefile] Error 1 ==== Regenerating Makefiles ==== make: premake: No such file or directory make: *** [Makefile] Error 1
I'm trying to find you in IRC...
comment:8 by , 13 years ago
Milestone: | Backlog → Alpha 4 |
---|---|
Resolution: | → worksforme |
Status: | reopened → closed |
As mentioned on IRC you need to run update-workspaces.sh
to resolve that error.
Closing this ticket since it worked for Kimball and there hasn't been any progress here lately; feel free to reopen and provide more information if you still have this problem.
comment:9 by , 13 years ago
Milestone: | Alpha 4 → Backlog |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
Reopening since I'm getting this bug with the xcode project in Premake4. See this forum post for the gory details. I've tried everything above, except the arch="amd64" suggestion, but I'm not sure if that still applies.
comment:10 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:11 by , 13 years ago
Milestone: | Backlog → Alpha 7 |
---|
Looks like your nasm is out of date - I had this same error earlier (10.6.5, MacBook Pro). Run this in terminal:
Also, you'll need to disable compiling Atlas as it currently fails to build on OSX and doesn't work anyway:
In file /build/workspaces/update-workspaces.sh, replace line
With the following: