Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
I would like to compile PPC on my windows 10 or my OSX 10.14 Intel, but I have no idea how to do it (I'm learning everything on my own), I have git on my windows and the source code of the OSX version
 

2984839

Cancelled
Apr 19, 2014
2,114
2,241
It's a very broad question. What are you trying to compile and what language?

You'll need a compiler, at a minimum. You'll probably want 'make', though strictly speaking, you don't need it. You can get various Xcode versions from Macintosh Garden that will have both. You'll need any libraries the code depends on.

Assuming you're compiling C on OS X, I would recommend IBM's XL compiler. I found it produces slightly faster code, though it may not necessarily work for you depending on the project.
 
  • Like
Reactions: dextructor

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
It's a very broad question. What are you trying to compile and what language?

You'll need a compiler, at a minimum. You'll probably want 'make', though strictly speaking, you don't need it. You can get various Xcode versions from Macintosh Garden that will have both. You'll need any libraries the code depends on.

Assuming you're compiling C on OS X, I would recommend IBM's XL compiler. I found it produces slightly faster code, though it may not necessarily work for you depending on the project.

I'm trying to port eDuke32 to powerpc, because the version available on the website (already compiled) is too old.



I tried to compile it on my powerbook, but it is miserably slow, it took 24 hours for it to compile GCC (~ 180mb). It takes about 15 minutes to compile anything around 3mb. In addition, the tools for compiling within osx ppc are very outdated, so I decided to compile on another newer and faster system
 

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
Good luck with that ! I like that game, but to make it run on PPC - you are many years too late for this. Try doing it for ARM which will be the replacement for PPC and Intel.
But the intuition of doing for ppc is to keep the ppc platform active. I don't have to worry about arm, as every mobile developer will easily port everything to the new arm
 
  • Like
Reactions: Raging Dufus

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
I would start with the MacPorts instruction of https://wiki.eduke32.com/wiki/Building_EDuke32_on_macOS using either 10.5 or 10.6 with corresponding latest Xcode 3:

NOTE, MacPorts could be a bit "invasive". Do proper backup or try it on a disposable system.

Yes, I have Homebrew and Macports installed, I also have the latest version of Xcode for ppc

However, I can't compile luajit at all
 

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
But the intuition of doing for ppc is to keep the ppc platform active. I don't have to worry about arm, as every mobile developer will easily port everything to the new arm

But, the issue is we all still want to use PPC machines for an everyday driver. I know and support your efforts to keep the PowerPC platform alive, at least under Leopard.. But, realistically, how much longer do we have until PPC will be useless ? Once Kaiser retires and decides to not further develop tenfourfox, what then ? I can see PowerPC lasting at least until the end of 2025.. but by then it would be over 2.5 decades since PPC G3,G4, and G5 came into existence. I hope I am wrong, but once we lose Kaiser, who will develop and keep tenfourfox going ?
 

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
Good luck with that ! I like that game, but to make it run on PPC - you are many years too late for this. Try doing it for ARM which will be the replacement for PPC and Intel.

I understand your being angry, but time waits for no one.. and PowerPC's days are numbered.. Kaiser won't last forever and eventually in the not so distant future, I can see on his website that tenfourfox has reached end of development because he wants to retire. Maybe I am wrong.. Maybe PPC will last into the next decade and beyond. By that time I will be in my 60's and 70's - I wouldn't care at that point.
 

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
But, the issue is we all still want to use PPC machines for an everyday driver. I know and support your efforts to keep the PowerPC platform alive, at least under Leopard.. But, realistically, how much longer do we have until PPC will be useless ? Once Kaiser retires and decides to not further develop tenfourfox, what then ? I can see PowerPC lasting at least until the end of 2025.. but by then it would be over 2.5 decades since PPC G3,G4, and G5 came into existence. I hope I am wrong, but once we lose Kaiser, who will develop and keep tenfourfox going ?

Well in fact I don't want ppc for daily use, and I don't recommend a ppc for daily use (due to lack of security and low energy efficiency). I regard my ppc macs as old video game consoles, when I'm bored in my spare time, I call one and play with it. Mac OS 9 hasn't had a decent browser for 8 years, I don't use internet on my old macs, I just like to play games and try to develop new things for them (just like old Amiga and Ataris)
 

mmphosis

macrumors regular
Jan 3, 2017
219
298
Yes, of course, many of us on this forum have knowledge of PowerPC (Mac) development. It took me reading a few posts, here's what I gather so far: EDuke32 (2000) the 32-bit/64-bit cross-platform port of Duke Nukem 3D (1996) running on Mac OS X 10.4 (2005-2009) and 10.5 (2007-2011).

And yes, of course, building toolchains is not going to be as fast.

 

AC910

macrumors member
Jul 10, 2016
95
86
I understand your being angry, but time waits for no one.. and PowerPC's days are numbered.. Kaiser won't last forever and eventually in the not so distant future, I can see on his website that tenfourfox has reached end of development because he wants to retire. Maybe I am wrong.. Maybe PPC will last into the next decade and beyond. By that time I will be in my 60's and 70's - I wouldn't care at that point.

So what? People still on on powerpc mac are doing it for nostalgia and/or the challenge. That's not going to change regardless of what Tim Cook or Cameron Kaiser decide to do. Also going into someone else's thread and complaining about the death of a 15 year old platform is rude. Stop.

I would like to compile PPC on my windows 10 or my OSX 10.14 Intel, but I have no idea how to do it (I'm learning everything on my own), I have git on my windows and the source code of the OSX version

So I looked a bit into this. If all you want to do is run Duke on ppc then there's a prebuilt binary from 2013 that still works. eduke32_osx-sdl_leopard_svn3898.dmg 4160KB Nov 20 2013 12:20:27 AM

If you're trying to actually build it, then that's going to be more challenging. I gave it a go and spent a couple of hours on it. I was able to build the application and run it, but starting the actual game didn't work. Seems like something broke rendering the video via SDL. The console output is in the spoiler below.

Code:
EDuke32 r(?)
Built Sep 13 2020 17:20:56, GCC 7.5.0, 32-bit big-endian
Using /Users/user/Library/Application Support/EDuke32/ for game data
Application parameters: /Users/user/Downloads/DUKE3D.GRP
Using /Users/user/edukeolder/EDuke32.app/Contents/Resources/ for game data
Using /Users/user/edukeolder/EDuke32.app/Contents/MacOS/ for game data
Using /Users/user/.config/eduke32/ for game data
Initializing SDL system interface (compiled against SDL version 1.2.15, found version 1.2.15)
Using "Quartz" video driver
Searching for game data...
Found no recognized game data!
Warning: could not find main data file "DUKE3D.GRP"!
Using file "/Users/user/Downloads/DUKE3D.GRP" as game data.
Compiling: GAME.CON (99639 bytes)
Including: DEFS.CON (28893 bytes)
Including: USER.CON (36930 bytes)
USER.CON:751: warning: sound 261 already defined (hydro43.voc)
GAME.CON: In state `blimphitstate':
GAME.CON:157: warning: expected action, found define.
GAME.CON: In actor `ORGANTIC':
GAME.CON:1923: warning: found `else' with no `if'
GAME.CON: In state `pigshootenemystate':
GAME.CON:2817: warning: found `else' with no `if'
Found 4 warning(s), 0 error(s).
Compiled 49820 bytes in 37ms, v1.3D compatibility mode
WARNING: Calculated sine and arctangent tables differ from original!
Cache object array initialized with 8192 entries.
Initialized 96.0M cache
Sound hlminhal.voc(#23) not found!
Sound hlmexhal.voc(#24) not found!
Sound yes.voc(#45) not found!
Sound fan.voc(#77) not found!
Sound hover.voc(#80) not found!
Sound turrrm.voc(#145) not found!
Sound turrrg.voc(#146) not found!
Sound turrat.voc(#147) not found!
Sound b3atk01.voc(#152) not found!
Sound turrpn.voc(#161) not found!
Sound turrdy.voc(#162) not found!
Sound b3atk01.voc(#176) not found!
Sound vpiss2.voc(#182) not found!
Initializing OSD...
No game controllers found
Executing "settings.cfg"
bind <key> <string>: associates a keypress with a string of console input. Type "bind showkeys" for a list of keys and "listsymbols" for a list of valid console commands.
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Trying next mode...
Setting video mode 1680x1050 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1680x1050x8 windowed! Trying next mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Trying next mode...
Setting video mode 1680x1050 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1680x1050x8 windowed! Trying next mode...
Setting video mode 1600x900 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1600x900x8 windowed! Trying next mode...
Setting video mode 1366x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1366x768x8 windowed! Trying next mode...
Setting video mode 1280x960 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1280x960x8 windowed! Trying next mode...
Setting video mode 1280x720 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1280x720x8 windowed! Trying next mode...
Setting video mode 1152x864 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1152x864x8 windowed! Trying next mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 1024x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x600x8 windowed! Trying next mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Trying next mode...
Setting video mode 640x480 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 640x480x8 windowed! Trying next mode...
Setting video mode 1680x1050 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1680x1050x8 windowed! Trying next mode...
Setting video mode 1600x900 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1600x900x8 windowed! Trying next mode...
Setting video mode 1366x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1366x768x8 windowed! Trying next mode...
Setting video mode 1280x960 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1280x960x8 windowed! Trying next mode...
Setting video mode 1280x720 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1280x720x8 windowed! Trying next mode...
Setting video mode 1152x864 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1152x864x8 windowed! Trying next mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 1024x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x600x8 windowed! Trying next mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Trying next mode...
Setting video mode 640x480 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 640x480x8 windowed! Trying next mode...
Fatal error: unable to set any video mode!

So this app uses Cocoa for the launcher and other things. I don't think you'd be able to compile those on a modern mac as Apple is very aggressive on removing depreciated build tools. I think trying to get the development files and a toolchain working on a modern mac would be a major task onto itself. So you'll pretty much have to use a real ppc device. If all you have is a slow powerbook, then yeah that'll be rough. Maybe a VM might be a better solution? I personally have a headless quad g5 I use for all compiling. I ssh into it and build on there.

I can give you more info on how to build this if you want. But it's kinda involved and it'll take a lot of fudging the files to get it to build. And that's not even getting into resolving the SDL issue which you'll have to tackle on your own.
 

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
I managed to compile a version I modified from the latest eduke32 with support for ionfury. It just needs a few more adjustments, but I'm happy with the result. As soon as I finish carrying it, I will make some changes to the game file to improve the performance, since the game requires 10x more performance than duke nukem 3d
Imagem1.png
 

AC910

macrumors member
Jul 10, 2016
95
86
That's awesome! You should definitely post it. I'm sure someone will appreciate it.

Bonus points if you have time to post instructions on how you did it. Great for others in the future.
 

Project Alice

macrumors 68020
Jul 13, 2008
2,051
2,137
Post Falls, ID
I might be totally wrong here, as I have next to no experience in development other than compiling source code occasionally.
Doesn't Snow Leopard's xcode still have the ability to target PPC Leopard or Tiger? If so, running Snow Leopard on a reasonably quick intel mac might speed something like this up in the future. Even a Mac Pro 5,1 should be capable of booting Snow Leopard, depending on the GPU that's in it.
 

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
So what? People still on on powerpc mac are doing it for nostalgia and/or the challenge. That's not going to change regardless of what Tim Cook or Cameron Kaiser decide to do. Also going into someone else's thread and complaining about the death of a 15 year old platform is rude. Stop.



So I looked a bit into this. If all you want to do is run Duke on ppc then there's a prebuilt binary from 2013 that still works. eduke32_osx-sdl_leopard_svn3898.dmg 4160KB Nov 20 2013 12:20:27 AM

If you're trying to actually build it, then that's going to be more challenging. I gave it a go and spent a couple of hours on it. I was able to build the application and run it, but starting the actual game didn't work. Seems like something broke rendering the video via SDL. The console output is in the spoiler below.

Code:
EDuke32 r(?)
Built Sep 13 2020 17:20:56, GCC 7.5.0, 32-bit big-endian
Using /Users/user/Library/Application Support/EDuke32/ for game data
Application parameters: /Users/user/Downloads/DUKE3D.GRP
Using /Users/user/edukeolder/EDuke32.app/Contents/Resources/ for game data
Using /Users/user/edukeolder/EDuke32.app/Contents/MacOS/ for game data
Using /Users/user/.config/eduke32/ for game data
Initializing SDL system interface (compiled against SDL version 1.2.15, found version 1.2.15)
Using "Quartz" video driver
Searching for game data...
Found no recognized game data!
Warning: could not find main data file "DUKE3D.GRP"!
Using file "/Users/user/Downloads/DUKE3D.GRP" as game data.
Compiling: GAME.CON (99639 bytes)
Including: DEFS.CON (28893 bytes)
Including: USER.CON (36930 bytes)
USER.CON:751: warning: sound 261 already defined (hydro43.voc)
GAME.CON: In state `blimphitstate':
GAME.CON:157: warning: expected action, found define.
GAME.CON: In actor `ORGANTIC':
GAME.CON:1923: warning: found `else' with no `if'
GAME.CON: In state `pigshootenemystate':
GAME.CON:2817: warning: found `else' with no `if'
Found 4 warning(s), 0 error(s).
Compiled 49820 bytes in 37ms, v1.3D compatibility mode
WARNING: Calculated sine and arctangent tables differ from original!
Cache object array initialized with 8192 entries.
Initialized 96.0M cache
Sound hlminhal.voc(#23) not found!
Sound hlmexhal.voc(#24) not found!
Sound yes.voc(#45) not found!
Sound fan.voc(#77) not found!
Sound hover.voc(#80) not found!
Sound turrrm.voc(#145) not found!
Sound turrrg.voc(#146) not found!
Sound turrat.voc(#147) not found!
Sound b3atk01.voc(#152) not found!
Sound turrpn.voc(#161) not found!
Sound turrdy.voc(#162) not found!
Sound b3atk01.voc(#176) not found!
Sound vpiss2.voc(#182) not found!
Initializing OSD...
No game controllers found
Executing "settings.cfg"
bind <key> <string>: associates a keypress with a string of console input. Type "bind showkeys" for a list of keys and "listsymbols" for a list of valid console commands.
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Trying next mode...
Setting video mode 1680x1050 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1680x1050x8 windowed! Trying next mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Trying next mode...
Setting video mode 1680x1050 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1680x1050x8 windowed! Trying next mode...
Setting video mode 1600x900 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1600x900x8 windowed! Trying next mode...
Setting video mode 1366x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1366x768x8 windowed! Trying next mode...
Setting video mode 1280x960 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1280x960x8 windowed! Trying next mode...
Setting video mode 1280x720 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1280x720x8 windowed! Trying next mode...
Setting video mode 1152x864 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1152x864x8 windowed! Trying next mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 1024x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x600x8 windowed! Trying next mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Trying next mode...
Setting video mode 640x480 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 640x480x8 windowed! Trying next mode...
Setting video mode 1680x1050 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1680x1050x8 windowed! Trying next mode...
Setting video mode 1600x900 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1600x900x8 windowed! Trying next mode...
Setting video mode 1366x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1366x768x8 windowed! Trying next mode...
Setting video mode 1280x960 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1280x960x8 windowed! Trying next mode...
Setting video mode 1280x720 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1280x720x8 windowed! Trying next mode...
Setting video mode 1152x864 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1152x864x8 windowed! Trying next mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Trying next mode...
Setting video mode 1024x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x600x8 windowed! Trying next mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Trying next mode...
Setting video mode 640x480 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 640x480x8 windowed! Trying next mode...
Fatal error: unable to set any video mode!

So this app uses Cocoa for the launcher and other things. I don't think you'd be able to compile those on a modern mac as Apple is very aggressive on removing depreciated build tools. I think trying to get the development files and a toolchain working on a modern mac would be a major task onto itself. So you'll pretty much have to use a real ppc device. If all you have is a slow powerbook, then yeah that'll be rough. Maybe a VM might be a better solution? I personally have a headless quad g5 I use for all compiling. I ssh into it and build on there.

I can give you more info on how to build this if you want. But it's kinda involved and it'll take a lot of fudging the files to get it to build. And that's not even getting into resolving the SDL issue which you'll have to tackle on your own.


Yes I know the port of 2013, but it is not able to handle ion because for this game, changes were made to the engine, only newer eduke versions manage to run it. I had no choice, I had to do it the hard way, install all the tools on my G4 and work directly on it. I am happy to have this hard work, because I learned many things, I never touched mac programming. I wasted a lot of time compiling and recompiling libraries and tools with macports, because he is stupid, if I compile something universal, he requires that all dependencies be the same. If by chance something was written just for powerpc (which would work normally) it prevents it from installing due to arch missmach.

If I can compile all the tools as up to date as possible, I will be able to port other games for powerpc. This morning, I tried to port NFS2 (an open source port), but unfortunately it has a little bit of asm code, which was written for x86, and this is far beyond my reach.
 

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
That's awesome! You should definitely post it. I'm sure someone will appreciate it.

Bonus points if you have time to post instructions on how you did it. Great for others in the future.

This build is not yet functional (can't play) I'm still working on finding all the most up-to-date build tools possible to be able to build it completely successfully. As soon as I get it, I will definitely post it. I will also do a diary to teach how I managed to install modern development tools on powerpc.


It would be much easier to port to linux ppc, but for me, Mac OS lives in my heart, and it wouldn't be as much fun if it were on linux.
 

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
I didn't actually get SDL through macports, I downloaded it elsewhere, but I don't remember where. You may have downloaded it from the macintosh garden or archive.org
 

Rikintosh

macrumors regular
Original poster
Apr 22, 2020
204
242
São Paulo, Brazil
Update: Compiling these things on my G4 1.33 is painful. My machine is connected to 3 days compiling. It took me a day and a few more hours to compile "libgcc7" and another whole day and a few many hours (so far compiling) for gcc7. I even lost my line of reasoning, before that I compiled something that took 5 hours, but I no longer remember what it was.

I think I will create an image of my HD with all these tools already compiled, and post for download for those who want to venture without going through this suffering that I am going through.



It's funny, because all this rube goldberg machine is only needed to compile the damn luajit library, needed for compile eduke32.
 
  • Like
Reactions: dextructor
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.