a guide to compiling PearPC yourselves

[ARCHIVED] About PearPC, a mostly obsolete PPC Mac emulator for Windows and Linux to run MacOS X 10.1 up to 10.4. Using QEMU is now recommended.

Moderators: Cat_7, Ronald P. Regensburg

User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

a guide to compiling PearPC yourselves

Post by PPC_Digger »

Welcome to the PearPC compilation guide!
i hope this guide will help you compile PearPC yourselves using the latest CVS sources.

* UNIX/Linux users, and Windows users who already have Cygwin with the development packages: please skip section #1

Section #1: Downloading & Installing Cygwin:
1) Go to www.cygwin.com
2) On the right upper corner of the screen there is a link "Install Cygwin now", right-click it and select "Save Target As", and save it somewhere in your hard disk.
3) Run the saved file (setup.exe), click "Next", make sure "Install from Internet" is selected and click "Next" again, leave the default values intact and click "Next" and "Next".
4) If you use a proxy server, enter its address and port in the required field. if you do not use a proxy server, select "Direct Connection" and click "Next". if you are not sure, ask your system administrator.
5) Select a download site from the list (it doesn't matter which site you select) and click "Next", Select to install all the "Base" packages by clicking on the "Default" text next to them. Also select all the "Devel" packages using the same method.
6) Click "Next" and let it download and install all the packages. Once it is complete, it will display a message box informing you of a successful installation, close it by clicking "OK".

Section #2: Downloading the PearPC sources from CVS:
1) UNIX/Linux users: Open a shell window, or switch to a shell.
Windows users: Open Cygwin.
2) Login to the PearPC CVS server by typing:
cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/pearpc login
Press enter when it will ask for the CVS password.
3) Go to the directory you wish to put the sources in using the "cd" command.
4) Check out (download) the sources by typing:
cvs -z 4 -d:pserver:anonymous@cvs.sf.net:/cvsroot/pearpc co pearpc
Please note that if you already have the sources and you want to update them type instead:
cvs -z 4 -d:pserver:anonymous@cvs.sf.net:/cvsroot/pearpc update pearpc
Also, if you want to download the altivec (G4) sources, type:
cvs -z 4 -d:pserver:anonymous@cvs.sf.net:/cvsroot/pearpc co -r altivec pearpc
5) Log out from the CVS server by typing:
cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/pearpc logout

Section #3: Compiling the PearPC sources:
1) Go to the "pearpc" directory (without quotes) in the directory you put the sources in section #2.
2) Type:
./autogen.sh
3) Make sure everything is ok, and then type:
./configure
and see that it says ok about "Yes" or "Non Needed" about all the packages. if it says it's missing something, you should get it.
4) To finally compile PearPC, type:
make
5) Go to the 'src' directory and type:
strip ppc.exe (or 'ppc' if you use linux)
to strip the executable from the debugging code.


Enjoy your shiny new, compiled-by-you PearPC!

Good Luck,
PPC_Digger.
Last edited by PPC_Digger on Tue Nov 09, 2004 1:09 pm, edited 1 time in total.
rccola70
Tinkerer
Posts: 79
Joined: Fri Jun 04, 2004 12:03 am
Location: Hermosa Beach, California

how bout

Post by rccola70 »

whattabout for processor specifics such as P4 optimized or P3 optimized?
User avatar
Cat_7
Expert User
Posts: 6177
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Instead of just installing all of the development packages, install these along with the default selection. Info comes from:

http://www.kelley.ca/pearpc/wiki/index. ... nvironment

cvs
bison
byacc
autoconf
automake
gcc-c++
make
nasm
flex
w32api

Cat_7
Last edited by Cat_7 on Mon Aug 02, 2004 9:14 am, edited 1 time in total.
prasys
Forum All-Star
Posts: 548
Joined: Sun May 23, 2004 7:41 am
Location: MY
Contact:

Post by prasys »

Well , good guide...But its better to install all , if you plan to develop..but if you are on a slow connection/or just want to compile PearPC..Just install the packages what CAT_7 said
robojam
Forum All-Star
Posts: 779
Joined: Thu Apr 17, 2003 10:52 pm
Location: Charlotte, NC. USA

Re: how bout

Post by robojam »

rccola70 wrote:whattabout for processor specifics such as P4 optimized or P3 optimized?
You just need to use the correct compile switches (don't remember any of them offhand).
Once you've made something idiot proof, they go and invent a better idiot!
CaptainValor
Forum All-Star
Posts: 587
Joined: Mon May 17, 2004 11:57 pm

Post by CaptainValor »

Yes, this is a good guide, but I would like to know some of the arguments to use when compiling (for processor type and whatnot). If those were included, this guide would be complete, and I'd then it should be bound for the FAQ section. :)
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Re: how bout

Post by PPC_Digger »

robojam wrote:
rccola70 wrote:whattabout for processor specifics such as P4 optimized or P3 optimized?
You just need to use the correct compile switches (don't remember any of them offhand).
here it is:
you should use ./configure CFLAGS="the flags you wish to use"
i recommend using -pipe and -O3
as for the processor optimizations:
-march=pentium3
-march=pentium4
-march=athlon-xp
-march=athlon-4

enjoy!
Jon Davis
Inquisitive Elf
Posts: 39
Joined: Thu Jun 27, 2002 1:38 pm

Post by Jon Davis »

How do you apply patches? The only reason I would want to compile an executable for myself is to add the patches that I want before they make the main CVS. Any help?

Thanks,

Jon
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

dunno, i try to figure out patches too.
prasys
Forum All-Star
Posts: 548
Joined: Sun May 23, 2004 7:41 am
Location: MY
Contact:

Post by prasys »

It took me 7hrs to download cygwin...oh gosh , my bill is gonna raise..now to configure and fetch CVS
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

why don't you go dsl?
prasys
Forum All-Star
Posts: 548
Joined: Sun May 23, 2004 7:41 am
Location: MY
Contact:

Post by prasys »

Lets say , no DSL in my area and there is only 1 ISP company in Malaysia
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

what about cable?
or a foreign satellite isp?
templest
Tinkerer
Posts: 78
Joined: Fri Apr 16, 2004 2:33 am
Location: London, ON.

Post by templest »

meh...

Code: Select all

strip ppc.exe

strip:'ppc.exe': No Such File.
help? :?
templest
Tinkerer
Posts: 78
Joined: Fri Apr 16, 2004 2:33 am
Location: London, ON.

Post by templest »

nevermind, I'm a dumbass. Was doing it in the wrong folder. :oops:
prasys
Forum All-Star
Posts: 548
Joined: Sun May 23, 2004 7:41 am
Location: MY
Contact:

Post by prasys »

always remeber

cd pearpc before stripping it


anyway there is no DSL nor Cable in Malaysia


I will be compiling for Linux and OSX soon...:D
CaptainValor
Forum All-Star
Posts: 587
Joined: Mon May 17, 2004 11:57 pm

Post by CaptainValor »

Well, now that RemoteCVS is up on www.pearpc.net , I imagine less people will be doing their compiling this way. ;)
Havin_it
Mac Mechanic
Posts: 159
Joined: Wed Jul 21, 2004 3:06 pm

Post by Havin_it »

Yes, RemoteCVS looks like a very attractive alternative to downloading Cygwin, but the help file seems to be unavailable at present. Perhaps someone can explain:

1) What is meant by Win32 as an alternative to SDL? (I thought I had both already...)

2) In the processor type selector, does i686 equate to JITC - or something else? (Or is it 'Generic build' that means JITC?)

3) What does the -O2, -O3, -Os selector mean?

4) Do any other choices conflict with Altivec?

I'm still quite lost on terminology as you can see. Anyone?
CaptainValor
Forum All-Star
Posts: 587
Joined: Mon May 17, 2004 11:57 pm

Post by CaptainValor »

1) Don't know.

2) Don't know.

3) I imagine those refer to the version of PearPC you want to compile. As in 0.2, 0.3 etc.

4) Not that I know of. Just try different combinations and see if there's something that doesn't work.
User avatar
Yukon Kid
Mac Mechanic
Posts: 169
Joined: Thu May 20, 2004 6:27 pm

Post by Yukon Kid »

go to the help screen and it explains all the terms used in the remote compiler.
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

CaptainValor wrote:1) Don't know.

2) Don't know.

3) I imagine those refer to the version of PearPC you want to compile. As in 0.2, 0.3 etc.

4) Not that I know of. Just try different combinations and see if there's something that doesn't work.
1) Using Win32 window drawing as an alternative (just know that originally, sdl was the alternative), you should use sdl if your video card has more than 8 mb of memory
2) i686 means the standard jitc (e.g. no optimization)
3) -O3 takes more time to compile but works faster due to extra optimization - O2 takes less time to compile but works faster. It DOESN'T choose the version.
Havin_it
Mac Mechanic
Posts: 159
Joined: Wed Jul 21, 2004 3:06 pm

Post by Havin_it »

@Captain Valor: I'll give ya about minus 100 out of ten for helpful and insightful answering...

@Yukon Kid: read a bit slower. The help page is DOWN, or at least was at the time of my original post.

@PPC_Digger: Perfect ten. Thanks for clearing up the unclear.
CaptainValor
Forum All-Star
Posts: 587
Joined: Mon May 17, 2004 11:57 pm

Post by CaptainValor »

You're right, I probably shouldn't answer about it if I've never used it. lol

Just making an educated guess. ;)
User avatar
Yukon Kid
Mac Mechanic
Posts: 169
Joined: Thu May 20, 2004 6:27 pm

Post by Yukon Kid »

yeah well i did read it slow and I would still say the same, the help file explains all the fields.

might not help if you can't get to it but then I didn't copy and or memorize it.

I only know what was there because I looked shortly before I read your post.

just trying to help.... :D
xeshaan
Space Cadet
Posts: 4
Joined: Sun Nov 21, 2004 5:19 pm

Post by xeshaan »

its not working for me

i get fail at last step of configure

please help>>>>>>>>>>>>>


Regards

xeshaan
Locked