Jump to content

For Mac?


Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

I've got lion and i'm not getting anywhere in the installation process, anyone know of any way to get it to work?

I'm willing to try different things btw, really want to get this working.

Would be so cool if we could get this into an Xcode Project,

then it would be easier for mac and iOS developers to start pitching in,

and would probably also be easier to package things into a Mac App.

Link to comment
Share on other sites

Managed to get the most recent commit from git to compile now, just making sure i had all the libraries, using brew, it was:

brew install sdl sdl_gfx  [font=verdana, arial,]boost cmake nasm [/font][font=verdana, arial,]wxmac[/font]

and then running in workspaces:



./update-workspaces.sh -j3
cd gcc
make CONFIG=Release -j3

Running test gives me 1 warning, about WARNING: CMessageTurnStart::ToJSVal not implemented

If i try and run the pyrogenesis.app by double clicking, it crashes with the following error.

however, if i run ./pyrogenesis from command line it starts up ok


Process: pyrogenesis [38180]
Path: /Users/USER/Desktop/*/pyrogenesis.app/Contents/MacOS/pyrogenesis
Identifier: pyrogenesis
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [229]

Date/Time: 2011-08-15 19:42:31.445 +0100
OS Version: Mac OS X 10.7 (11A511)
Report Version: 9

Interval Since Last Report: -43504 sec
Per-App Crashes Since Last Report: 1
Anonymous UUID: 29B15C37-EE40-4FC8-B4C8-81F1341B1038

Crashed Thread: 0

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
Library not loaded: @executable_path/libmozjs185-ps-release.1.0.dylib
Referenced from: /Users/USER/Desktop/*/pyrogenesis.app/Contents/MacOS/pyrogenesis
Reason: image not found

Binary Images:
0x103a89000 - 0x103e7cfff +pyrogenesis (??? - ???) <EACA3D68-1198-3C99-85ED-1D55007E76CE> /Users/USER/Desktop/*/pyrogenesis.app/Contents/MacOS/pyrogenesis
0x104108000 - 0x104133fff com.apple.audio.OpenAL (1.5 - 1.5) <CC1E3462-AE6E-3A97-BCC6-7F6096DA7A95> /System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL
0x104148000 - 0x10417cfe7 +libjpeg.8.dylib (12.0.0 - compatibility 12.0.0) <F9759EAB-8561-36E0-860D-36399657A94D> /usr/local/lib/libjpeg.8.dylib
0x104188000 - 0x1041a6ff7 +libpng15.15.dylib (17.0.0 - compatibility 17.0.0) <77E6AB6C-30F9-3A26-BF47-77D9A0D199E2> /usr/X11/lib/libpng15.15.dylib
0x7fff63689000 - 0x7fff636bdac7 dyld (195.5 - ???) <4A6E2B28-C7A2-3528-ADB7-4076B9836041> /usr/lib/dyld
0x7fff8e75f000 - 0x7fff8e771ff7 libz.1.dylib (1.2.5 - compatibility 1.0.0) <30CBEF15-4978-3DED-8629-7109880A19D4> /usr/lib/libz.1.dylib
0x7fff90530000 - 0x7fff9053ffff com.apple.opengl (1.7.4 - 1.7.4) <38AF4430-7E81-3C98-9330-21DCDA90507E> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff927b0000 - 0x7fff927ddfe7 libSystem.B.dylib (159.0.0 - compatibility 1.0.0) <7B4D685D-939C-3ABE-8780-77A1889E0DE9> /usr/lib/libSystem.B.dylib

Model: MacBook5,1, BootROM MB51.007D.B03, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.40f2
Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x802C, 0x384A5346323536363448592D314731443120
Memory Module: BANK 0/DIMM1, 2 GB, DDR3, 1067 MHz, 0x802C, 0x384A5346323536363448592D314731443120
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.100.98.75.6)
Bluetooth: Version 2.5.0f17, 2 service, 19 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: TOSHIBA MK2553GSX, 250.06 GB
Serial ATA Device: MATSHITADVD-R UJ-868
USB Device: Keyboard Hub, apple_vendor_id, 0x1006, 0x26200000 / 2
USB Device: Apple Keyboard, apple_vendor_id, 0x0221, 0x26220000 / 3
USB Device: Built-in iSight, apple_vendor_id, 0x8507, 0x24400000 / 2
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0237, 0x04600000 / 3
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x04500000 / 2
USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x06100000 / 2
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8213, 0x06110000 / 5


Link to comment
Share on other sites

but for the record, the app does not go full screen, nor is sound working (but u already knew that:P)



Aug 15 19:48:03 skelmac.local pyrogenesis[38288] <Warning>: CGDisplayBaseAddress is obsolete and returning NULL for display 0x4272940
WARNING: Failed to set the video mode to fullscreen for the chosen resolution 1024x768:32 ("Error setting OpenGL fullscreen: invalid fullscreen drawable"), falling back to windowed mode
WARNING: Audio has been disabled, due to problems with OpenAL on OS X.

Link to comment
Share on other sites

I think the fullscreen issue, possibly some others as well, is being caused somehow by SDL. We had the same problem over at xonotic. IIRC updating to the newest version of SDL fixed it. I will talk with one of the xonotic devs to see if I can get more information.

Edited by theShadow
Link to comment
Share on other sites

Would be so cool if we could get this into an Xcode Project,

then it would be easier for mac and iOS developers to start pitching in,

and would probably also be easier to package things into a Mac App.

You can try using our new build system (update-workspaces-new.sh instead of update-workspaces.sh), which creates an Xcode project - I've been able to successfully build in Xcode 3 on Snow Leopard. Hopefully it will be the only build system for Alpha 7, if we can squash the remaining bugs. Then I agree, it can only help OS X development :)

Link to comment
Share on other sites

You can try using our new build system (update-workspaces-new.sh instead of update-workspaces.sh), which creates an Xcode project - I've been able to successfully build in Xcode 3 on Snow Leopard. Hopefully it will be the only build system for Alpha 7, if we can squash the remaining bugs. Then I agree, it can only help OS X development :)

brilliant, ill give it a go asap :D

Link to comment
Share on other sites

i did give it a go, not building anymore in most recent commit.

git-svn-id: http://svn.wildfireg.../ps/trunk@10020 3db68df2-c116-0410-a063-a993310a9797


==== Building scriptinterface (release) ====
AutoRooters.cpp
NetClient.cpp
cc1plus: error: obj/scriptinterface_Release/precompiled.h: No such file or directory
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
cc1plus: error: obj/network_Release/precompiled.h: No such file or directory
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
Simulation2.cpp
cc1plus: error: obj/simulation2_Release/precompiled.h: No such file or directory
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
In file included from ../../../source/lib/precompiled.h:73,
from ../../../source/pch/scriptinterface/precompiled.h:19,
from ../../../source/scriptinterface/AutoRooters.cpp:18:
../../../source/lib/secure_crt.h:55: warning: redundant redeclaration of 'size_t strnlen(const char*, size_t)' in same scope
/usr/include/string.h:143: warning: previous declaration of 'size_t strnlen(const char*, size_t)'
../../../source/lib/secure_crt.h:56: warning: redundant redeclaration of 'size_t wcsnlen(const wchar_t*, size_t)' in same scope
/usr/include/wchar.h:227: warning: previous declaration of 'size_t wcsnlen(const wchar_t*, size_t)'
In file included from ../../../source/lib/precompiled.h:89,
from ../../../source/pch/scriptinterface/precompiled.h:19,
from ../../../source/scriptinterface/AutoRooters.cpp:18:
../../../source/lib/posix/posix.h:111: warning: redundant redeclaration of 'wchar_t* wcsdup(const wchar_t*)' in same scope
/usr/include/wchar.h:224: warning: previous declaration of 'wchar_t* wcsdup(const wchar_t*)'
../../../source/lib/posix/posix.h:115: warning: redundant redeclaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)' in same scope
/usr/include/wchar.h:225: warning: previous declaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)'
In file included from ../../../source/lib/precompiled.h:73,
from ../../../source/pch/simulation2/precompiled.h:19,
from ../../../source/simulation2/Simulation2.cpp:18:
../../../source/lib/secure_crt.h:55: warning: redundant redeclaration of 'size_t strnlen(const char*, size_t)' in same scope
/usr/include/string.h:143: warning: previous declaration of 'size_t strnlen(const char*, size_t)'
../../../source/lib/secure_crt.h:56: warning: redundant redeclaration of 'size_t wcsnlen(const wchar_t*, size_t)' in same scope
/usr/include/wchar.h:227: warning: previous declaration of 'size_t wcsnlen(const wchar_t*, size_t)'
In file included from ../../../source/lib/precompiled.h:73,
from ../../../source/pch/network/precompiled.h:19,
from ../../../source/network/NetClient.cpp:18:
../../../source/lib/secure_crt.h:55: warning: redundant redeclaration of 'size_t strnlen(const char*, size_t)' in same scope
/usr/include/string.h:143: warning: previous declaration of 'size_t strnlen(const char*, size_t)'
../../../source/lib/secure_crt.h:56: warning: redundant redeclaration of 'size_t wcsnlen(const wchar_t*, size_t)' in same scope
/usr/include/wchar.h:227: warning: previous declaration of 'size_t wcsnlen(const wchar_t*, size_t)'
In file included from ../../../source/lib/precompiled.h:89,
from ../../../source/pch/simulation2/precompiled.h:19,
from ../../../source/simulation2/Simulation2.cpp:18:
../../../source/lib/posix/posix.h:111: warning: redundant redeclaration of 'wchar_t* wcsdup(const wchar_t*)' in same scope
/usr/include/wchar.h:224: warning: previous declaration of 'wchar_t* wcsdup(const wchar_t*)'
../../../source/lib/posix/posix.h:115: warning: redundant redeclaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)' in same scope
/usr/include/wchar.h:225: warning: previous declaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)'
make[1]: *** [obj/scriptinterface_Release/AutoRooters.o] Error 1
make: *** [scriptinterface] Error 2
make: *** Waiting for unfinished jobs....
CCmpAIManager.cpp
cc1plus: error: obj/simulation2_Release/precompiled.h: No such file or directory
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
In file included from ../../../source/lib/precompiled.h:89,
from ../../../source/pch/network/precompiled.h:19,
from ../../../source/network/NetClient.cpp:18:
../../../source/lib/posix/posix.h:111: warning: redundant redeclaration of 'wchar_t* wcsdup(const wchar_t*)' in same scope
/usr/include/wchar.h:224: warning: previous declaration of 'wchar_t* wcsdup(const wchar_t*)'
../../../source/lib/posix/posix.h:115: warning: redundant redeclaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)' in same scope
/usr/include/wchar.h:225: warning: previous declaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)'
In file included from ../../../source/lib/precompiled.h:73,
from ../../../source/pch/simulation2/precompiled.h:19,
from ../../../source/simulation2/components/CCmpAIManager.cpp:18:
../../../source/lib/secure_crt.h:55: warning: redundant redeclaration of 'size_t strnlen(const char*, size_t)' in same scope
/usr/include/string.h:143: warning: previous declaration of 'size_t strnlen(const char*, size_t)'
../../../source/lib/secure_crt.h:56: warning: redundant redeclaration of 'size_t wcsnlen(const wchar_t*, size_t)' in same scope
/usr/include/wchar.h:227: warning: previous declaration of 'size_t wcsnlen(const wchar_t*, size_t)'
In file included from ../../../source/lib/precompiled.h:89,
from ../../../source/pch/simulation2/precompiled.h:19,
from ../../../source/simulation2/components/CCmpAIManager.cpp:18:
../../../source/lib/posix/posix.h:111: warning: redundant redeclaration of 'wchar_t* wcsdup(const wchar_t*)' in same scope
/usr/include/wchar.h:224: warning: previous declaration of 'wchar_t* wcsdup(const wchar_t*)'
../../../source/lib/posix/posix.h:115: warning: redundant redeclaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)' in same scope
/usr/include/wchar.h:225: warning: previous declaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)'
make[1]: *** [obj/network_Release/NetClient.o] Error 1
make: *** [network] Error 2
CCmpCommandQueue.cpp
make[1]: *** [obj/simulation2_Release/Simulation2.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1plus: error: obj/simulation2_Release/precompiled.h: No such file or directory
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
In file included from ../../../source/lib/precompiled.h:73,
from ../../../source/pch/simulation2/precompiled.h:19,
from ../../../source/simulation2/components/CCmpCommandQueue.cpp:18:
../../../source/lib/secure_crt.h:55: warning: redundant redeclaration of 'size_t strnlen(const char*, size_t)' in same scope
/usr/include/string.h:143: warning: previous declaration of 'size_t strnlen(const char*, size_t)'
../../../source/lib/secure_crt.h:56: warning: redundant redeclaration of 'size_t wcsnlen(const wchar_t*, size_t)' in same scope
/usr/include/wchar.h:227: warning: previous declaration of 'size_t wcsnlen(const wchar_t*, size_t)'
In file included from ../../../source/lib/precompiled.h:89,
from ../../../source/pch/simulation2/precompiled.h:19,
from ../../../source/simulation2/components/CCmpCommandQueue.cpp:18:
../../../source/lib/posix/posix.h:111: warning: redundant redeclaration of 'wchar_t* wcsdup(const wchar_t*)' in same scope
/usr/include/wchar.h:224: warning: previous declaration of 'wchar_t* wcsdup(const wchar_t*)'
../../../source/lib/posix/posix.h:115: warning: redundant redeclaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)' in same scope
/usr/include/wchar.h:225: warning: previous declaration of 'int wcscasecmp(const wchar_t*, const wchar_t*)'
make[1]: *** [obj/simulation2_Release/CCmpCommandQueue.o] Error 1
make[1]: *** [obj/simulation2_Release/CCmpAIManager.o] Error 1
make: *** [simulation2] Error 2

Edited by skela
Link to comment
Share on other sites

Looks like you need to run "make clean" to get rid of those "cc1plus: error: obj/scriptinterface_Release/precompiled.h: No such file or directory" errors (which are caused by outdated build files).

Thanks Ykkrosh, I tried cleaning it by running sh clean-workspaces.sh

then i got this error after rebuilding again:



Linking pyrogenesis
ld: warning: directory not found for option '-L../../../libraries/cxxtest/lib'
ld: warning: directory not found for option '-L../../../libraries/valgrind/lib'
ld: in ../../../binaries/system/libnetwork.a, malformed archive TOC entry for CBinarySerializer<CLengthBinarySerializerImpl>::PutNumber(char const*, unsigned char), offset 1868707150 is beyond end of file 3635216
for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../../binaries/system/pyrogenesis.app/Contents/MacOS/pyrogenesis] Error 1
make: *** [pyrogenesis] Error 2
make: *** Waiting for unfinished jobs....

Edited by skela
Link to comment
Share on other sites

Thanks Ykkrosh, I tried cleaning it by running sh clean-workspaces.sh

then i got this error after rebuilding again:



Linking pyrogenesis
ld: warning: directory not found for option '-L../../../libraries/cxxtest/lib'
ld: warning: directory not found for option '-L../../../libraries/valgrind/lib'
ld: in ../../../binaries/system/libnetwork.a, malformed archive TOC entry for CBinarySerializer<CLengthBinarySerializerImpl>::PutNumber(char const*, unsigned char), offset 1868707150 is beyond end of file 3635216
for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../../binaries/system/pyrogenesis.app/Contents/MacOS/pyrogenesis] Error 1
make: *** [pyrogenesis] Error 2
make: *** Waiting for unfinished jobs....

Hmm maybe it compiled the library for the wrong architecture? Can you paste the result of running:

uname -v

Link to comment
Share on other sites

Hmm maybe it compiled the library for the wrong architecture? Can you paste the result of running:

uname -v



skelmac:workspaces skela$ uname -v
Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64

btw i tried make clean again, then re-ran it, now it compiled ok, weird thing is,

when i ran the clean script it didn't work? :/ I'm confused.

so anyways, it seems to be compiling again ok.

But it still freezes 10 seconds or so into any game,

is there any way for me to run this in Xcode with the debugger and everything?

have u guys managed to do that on yer mac test box?

Link to comment
Share on other sites

Use Run > Debugger (for me in Xcode 3) > Build and Run, seems to work fine :)

Brilliant, thx! :D

That is one trouble with it. Nevertheless, you can downgrade to Alpha 5 Edatania also it runs completely as much as I can tell.

you mean the 10 second app crash bug?

and that it won't happen in alpha5?

Link to comment
Share on other sites

What's the call stack like when it crashes?

still haven't managed to get it running or building from Xcode :/ sorry

for example if i try to build and run pyrogenesis.xcodeproj,

it gives me 8 errors (about pch for network, simulation2, scriptinterface, engine,graphics,atlas,gui and lowlevel), the errors all complain about similar things:


i686-apple-darwin10-gcc-4.2.1: /Users/skela/Desktop/0ad/git/0ad/build/workspaces/xcode3/../../source/pch/network/precompiled.h: No such file or directory

i686-apple-darwin10-gcc-4.2.1: warning: '-x c++-header' after last input file has no effect

i686-apple-darwin10-gcc-4.2.1: no input files

Command /Developer-old/usr/bin/gcc-4.2 failed with exit code 1


Link to comment
Share on other sites

still haven't managed to get it running or building from Xcode :/ sorry

for example if i try to build and run pyrogenesis.xcodeproj,

it gives me 8 errors (about pch for network, simulation2, scriptinterface, engine,graphics,atlas,gui and lowlevel), the errors all complain about similar things:


i686-apple-darwin10-gcc-4.2.1: /Users/skela/Desktop/0ad/git/0ad/build/workspaces/xcode3/../../source/pch/network/precompiled.h: No such file or directory

i686-apple-darwin10-gcc-4.2.1: warning: '-x c++-header' after last input file has no effect

i686-apple-darwin10-gcc-4.2.1: no input files

Command /Developer-old/usr/bin/gcc-4.2 failed with exit code 1


Oh right, I misinterpreted your comments :) Think the PCH support is still broken for Xcode, we haven't applied the patch for it yet. Try adding the --without-pch flag when running update-workspaces-new.

Link to comment
Share on other sites

whenever I try and compile it, I get this error


...

Linking CXX shared library libnvimage.dylib
ld: warning: ignoring file /usr/local/lib/libz.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: ignoring file /usr/local/lib/libjpeg.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"_jpeg_std_error", referenced from:
nv::ImageIO::loadJPG(nv::Stream&) in ImageIO.cpp.o
"_jpeg_CreateDecompress", referenced from:
nv::ImageIO::loadJPG(nv::Stream&) in ImageIO.cpp.o
"_jpeg_resync_to_restart", referenced from:
nv::ImageIO::loadJPG(nv::Stream&) in ImageIO.cpp.o
"_jpeg_read_header", referenced from:
nv::ImageIO::loadJPG(nv::Stream&) in ImageIO.cpp.o
"_jpeg_start_decompress", referenced from:
nv::ImageIO::loadJPG(nv::Stream&) in ImageIO.cpp.o
"_jpeg_read_scanlines", referenced from:
nv::ImageIO::loadJPG(nv::Stream&) in ImageIO.cpp.o
"_jpeg_finish_decompress", referenced from:
nv::ImageIO::loadJPG(nv::Stream&) in ImageIO.cpp.o
"_jpeg_destroy_decompress", referenced from:
nv::ImageIO::loadJPG(nv::Stream&) in ImageIO.cpp.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [src/nvimage/libnvimage.dylib] Error 1
make[2]: *** [src/nvimage/CMakeFiles/nvimage.dir/all] Error 2
make[1]: *** [src/nvtt/CMakeFiles/nvtt.dir/rule] Error 2
make: *** [nvtt] Error 2
ERROR: NVTT build failed
Pearce-Michals-MacBook-Pro:workspaces pearcemichal$

I can post more of the output if it's needed, but this seems to be the relevant bit.

EDIT: fixed. I installed libjpeg with homebrew instead of macports and now it works.

EDIT2: ok, when I try and compile it, i get this error

Command /Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

someone on IRC asked my why i was using LLVM, and I don't know what that it. what is it, and how do I not use it?

EDIT3: disregard that XD the error was the same as what skela had.

Edited by theShadow
Link to comment
Share on other sites

ok, i got it to build successfully in xcode, but ic an't get it to run. if I try to run it from xcode, it tells me there is not path to the executable. I tried looking around for it, and the only thing I can find is in 0ad/binaries/system called pyrogenesis.dbg, which crashes.

what are the correct settings in xcode to play?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...