Pages: [1]
|
|
|
Author
|
Topic: Compiling on a Mac (Read 2668 times)
|
iamnothere900
Zebranky food
Offline
Posts: 6
|
I haven't had any luck with compiling UQM on my G4 Powerbook (OS X 10.4.11) and was hoping someone had some tips.
I downloaded 0.6.2 source from this link ( http://prdownloads.sourceforge.net/sc2/uqm-0.6.2-source.tgz?download ). I downloaded 0.6.4 source from this page ( http://www.submedia.net/uqm/ ).
I downloaded macosx.zip from here ( https://bugs.uqm.stack.nl/show_bug.cgi?id=1042 ) which is an XCode project file.
Using just the build.sh from the source code file (either one) results in:
$ ./build.sh uqm 'echo -n' capable echo found. Sed stream editor found. tr found. Make found. build/unix/build.sh: line 1: libmikmod-config: command not found build/unix/build.sh: line 1: libmikmod-config: command not found build/unix/build.sh: line 1: libmikmod-config: command not found GNU C compiler found. We have a C preprocessor. We have a C dependency generator. We have a C compiler. We have a linker. We have a Objective-C preprocessor. We have a Objective-C dependency generator. We have a Objective-C compiler. Rez resource compiler (Apple Developer Tools) found. We have a MacOS X resource compiler (Rez). Little-endian machine detected. Simple DirectMedia Layer not found. $
The first time I used the XCode project file, I got this:
Building target “The Ur-Quan Masters” of project “uqm” with configuration “Debug - symlink content” — (4 errors) cd ~/Desktop/uqm-0.6.4-nic /usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -Wno-pointer-sign -DDEBUG -D__MACOSX__ -DHAVE_OPENGL -DGFXMODULE_SDL -DSOUNDMODULE_SDL -DTHREADLIB_SDL -DUSE_INTERNAL_MIKMOD -DNETPLAY=NETPLAY_FULL -DHAVE_JOYSTICK -DHAVE_ZIP=1 -fmessage-length=0 -mtune=G4 -fvisibility=hidden -F~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content -I. -I../.. -I../../src -I../../src/sc2code -I../../src/sc2code/libs -I~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content/include -I~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/DerivedSources -W -Wall -c ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/graphics/sdl/triscan2x.c -o ~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/Objects-normal/ppc/triscan2x.o In file included from ../../src/sc2code/libs/graphics/sdl/sdl_common.h:25, from ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/graphics/sdl/triscan2x.c:25: /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:30:17: error: SDL.h: No such file or directory /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:31:25: error: SDL_version.h: No such file or directory /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:32:24: error: begin_code.h: No such file or directory /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:114:24: error: close_code.h: No such file or directory from ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/graphics/sdl/triscan2x.c:25: In file included from ../../src/sc2code/libs/graphics/sdl/sdl_common.h:25, /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:30:17: error: SDL.h: No such file or directory /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:31:25: error: SDL_version.h: No such file or directory /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:32:24: error: begin_code.h: No such file or directory /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:114:24: error: close_code.h: No such file or directory Build failed (4 errors)
I commented out the 4 lines of code causing errors in SDL_image.h, and files started to compile but then I got this:
Building target “The Ur-Quan Masters” of project “uqm” with configuration “Debug - symlink content” — (1 error, 12 warnings) cd ~/Desktop/uqm-0.6.4-nic /usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -Wno-pointer-sign -DDEBUG -D__MACOSX__ -DHAVE_OPENGL -DGFXMODULE_SDL -DSOUNDMODULE_SDL -DTHREADLIB_SDL -DUSE_INTERNAL_MIKMOD -DNETPLAY=NETPLAY_FULL -DHAVE_JOYSTICK -DHAVE_ZIP=1 -fmessage-length=0 -mtune=G4 -fvisibility=hidden -F~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content -I. -I../.. -I../../src -I../../src/sc2code -I../../src/sc2code/libs -I~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content/include -I~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/DerivedSources -W -Wall -c ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c -o ~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/Objects-normal/ppc/vcontrol.o ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c: In function 'VControl_AddKeyBinding': ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:490: warning: comparison of unsigned expression < 0 is always false ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:490: warning: comparison between signed and unsigned ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c: In function 'VControl_RemoveKeyBinding': ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:501: warning: comparison of unsigned expression < 0 is always false ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:501: warning: comparison between signed and unsigned ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c: In function 'VControl_ProcessKeyDown': ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:739: warning: comparison of unsigned expression < 0 is always false ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:739: warning: comparison between signed and unsigned ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c: In function 'VControl_ProcessKeyUp': ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:750: warning: comparison of unsigned expression < 0 is always false ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:750: warning: comparison between signed and unsigned ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:490: warning: comparison of unsigned expression < 0 is always false ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:490: warning: comparison between signed and unsigned ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:501: warning: comparison of unsigned expression < 0 is always false ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:501: warning: comparison between signed and unsigned ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:739: warning: comparison of unsigned expression < 0 is always false ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:739: warning: comparison between signed and unsigned ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:750: warning: comparison of unsigned expression < 0 is always false ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/input/sdl/vcontrol.c:750: warning: comparison between signed and unsigned cd ~/Desktop/uqm-0.6.4-nic /usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -Wno-pointer-sign -DDEBUG -D__MACOSX__ -DHAVE_OPENGL -DGFXMODULE_SDL -DSOUNDMODULE_SDL -DTHREADLIB_SDL -DUSE_INTERNAL_MIKMOD -DNETPLAY=NETPLAY_FULL -DHAVE_JOYSTICK -DHAVE_ZIP=1 -fmessage-length=0 -mtune=G4 -fvisibility=hidden -F~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content -I. -I../.. -I../../src -I../../src/sc2code -I../../src/sc2code/libs -I~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content/include -I~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/DerivedSources -W -Wall -c ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/save.c -o ~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/Objects-normal/ppc/save.o ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/save.c: In function 'SaveGame': ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/save.c:814: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'long unsigned int' ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/save.c:814: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'long unsigned int' cd ~/Desktop/uqm-0.6.4-nic /usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -Wno-pointer-sign -DDEBUG -D__MACOSX__ -DHAVE_OPENGL -DGFXMODULE_SDL -DSOUNDMODULE_SDL -DTHREADLIB_SDL -DUSE_INTERNAL_MIKMOD -DNETPLAY=NETPLAY_FULL -DHAVE_JOYSTICK -DHAVE_ZIP=1 -fmessage-length=0 -mtune=G4 -fvisibility=hidden -F~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content -I. -I../.. -I../../src -I../../src/sc2code -I../../src/sc2code/libs -I~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content/include -I~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/DerivedSources -W -Wall -c ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/log/uqmlog.c -o ~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/Objects-normal/ppc/uqmlog.o ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/log/uqmlog.c:349: warning: unused parameter 'title' ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/log/uqmlog.c:349: warning: unused parameter 'isError' ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/log/uqmlog.c:349: warning: unused parameter 'msg' ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/log/uqmlog.c:349: warning: unused parameter 'title' ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/log/uqmlog.c:349: warning: unused parameter 'isError' ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/libs/log/uqmlog.c:349: warning: unused parameter 'msg' cd ~/Desktop/uqm-0.6.4-nic /usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -Wno-pointer-sign -DDEBUG -D__MACOSX__ -DHAVE_OPENGL -DGFXMODULE_SDL -DSOUNDMODULE_SDL -DTHREADLIB_SDL -DUSE_INTERNAL_MIKMOD -DNETPLAY=NETPLAY_FULL -DHAVE_JOYSTICK -DHAVE_ZIP=1 -fmessage-length=0 -mtune=G4 -fvisibility=hidden -F~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content -I. -I../.. -I../../src -I../../src/sc2code -I../../src/sc2code/libs -I~/Desktop/uqm-0.6.4-nic/build/Debug\ -\ symlink\ content/include -I~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/DerivedSources -W -Wall -c ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/cons_res.c -o ~/Desktop/uqm-0.6.4-nic/build/uqm.build/Debug\ -\ symlink\ content/The\ Ur-Quan\ Masters.build/Objects-normal/ppc/cons_res.o powerpc-apple-darwin8-gcc-4.0.1: ~/Desktop/uqm-0.6.4-nic/../../src/sc2code/cons_res.c: No such file or directory powerpc-apple-darwin8-gcc-4.0.1: warning: '-x c' after last input file has no effect powerpc-apple-darwin8-gcc-4.0.1: no input files powerpc-apple-darwin8-gcc-4.0.1: no input files powerpc-apple-darwin8-gcc-4.0.1: no input files powerpc-apple-darwin8-gcc-4.0.1: no input files powerpc-apple-darwin8-gcc-4.0.1: no input files Build failed (1 error, 12 warnings)
So now I'm hoping somebody can point me in the right direction.
|
|
|
Logged
|
|
|
|
0xDEC0DE
*Many bubbles*
Offline
Posts: 175
|
Oh dear.
The Xcode project was made against the current mainline tree (SVN), not the last stable release, or my old "unofficial" tree. This was done in the hopes that they'd commit something that worked against hat they had. There's been some files added and removed since those old version shipped, which is what Xcode is complaining about. To fix that, you'll need to find all the red files in Xcode and remove them, as well as adding any "missing" files that the project thinks it needs.
I find Xcode near-useless for the latter task, I usually open the sources in cscope, find what I'm looking for, then go back into Xcode and add the files. But unless you're familiar with all of those tools, you should probably stick with the old Unix-style build scripts when dealing with the old source trees.
But it also seems to be complaining about your SDL and SDL_image frameworks. I think the README.macosx file provided with the 0.6.2 sources might steer you in the right direction here (namely, override CFLAGS when building)
|
|
|
Logged
|
"I’m not a robot like you. I don’t like having disks crammed into me… unless they’re Oreos, and then only in the mouth." --Fry
|
|
|
|
iamnothere900
Zebranky food
Offline
Posts: 6
|
I forgot to mention that I started from the latest subversion snapshot, dated 20090104.
|
|
|
Logged
|
|
|
|
|
iamnothere900
Zebranky food
Offline
Posts: 6
|
Thank you so much! I got it to work!
I had to add these files:
src/sc2code/libs/video/vresins.c src/sc2code/libs/video/legacyplayer.c src/sc2code/libs/video/vidintrn.c
to the XCode project, which then threw an incredible amount of linker errors undefined symbols; apparently I don't have the necessary files to build Universal Binary (x86 and PowerPC) applications. I had to remove the i386 build target and now it finishes building!
(Of course the app immidately fails with an error about copying the default key config, but I'm reading through starcon2.c at the moment. It's kind of exciting to see the log messages in the window then look over and see them in code.)
Yay!
|
|
|
Logged
|
|
|
|
|
Pages: [1]
|
|
|
|
|