 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Prism
Joined: 26 Sep 2007 Posts: 2
|
Posted: Fri Nov 09, 2007 9:13 am Post subject: Mac OS X toolchain script patches for Leopard and Tiger |
|
|
Hello everyone,
Here is a set of patches that will ensure proper compilation of the current version of the toolchain under Mac OS X. It includes all the fixes recently uncovered by strmnNrmn, bulb, the admin at ragnaru.com and probably others, plus a couple of fixes of my own which are needed for successful compilation under Leopard.
You can find the patches here: http://www.mediafire.com/?3s05b0xbimy
To build the toolchain, first setup your environment as described in http://forums.ps2dev.org/viewtopic.php?t=5391 but before running the toolchain.sh script, expand the patches in the psptoolchain directory and run the provided patch-osx-toolchain.sh script:
> svn co svn://svn.ps2dev.org/psp/trunk/psptoolchain
> cd psptoolchain
> tar xvfj /path/to/your/psptoolchain-osx-patches.tar.bz2
> ./patch-osx-toolchain.sh
> ./toolchain.sh
The toolchain should then build without a hitch. Please note that you will need XCode Tools 3.0 under Leopard. Also, make sure you get the latest packages (the tutorial above installs autoconf 2.5 which is too old, you need at least version 2.59). The very last bit of the toolchain requires packages not listed in the tutorial: readline and libusb, make sure you install these as well. Finally, if running Leopard, you will need to build fink from scratch and all the packages from source (in fink) since there are no binaries yet for Leopard.
For the record, here are the Leopard-related fixes:
- The binutils configure script insists on building executables of type "dSYM", which seems to be some kind of executable package. A dSYM is in fact a directory, and some parts of the binutils/binutils and binutils/ld configure scripts will fail as they try to link the .dSYM "file", so I simply axed the checks. Also, most of binutils executables ending in /usr/local/pspdev/bin after the build have the .dSYM extension, so these files have to be renamed as proper extension-less files. There is probably a smart configure parameter that handles this, but I don't know it, and the patch works, for now at least.
- For some reason, the pspsdk fails to find the symbol PSPSDK_TOPDIR when compiling psp-config. I added the definition at the top of the file, with the standard top directory hardcoded (so don't try to change the prefix of the installation, unless you adjust the patch file manually.)
I also added a little goody of my own for people who like me sometimes work on a laptop without internet access; the stock toolchain scripts will fail when the internet cannot be accessed, even if the tarballs are present (wget fails to find the host and the script dies). So basically I added patches to the toolchain scripts so that they will check if the files are downloaded before trying to connect. The patches are applied by calling the following script:
> ./patch-nodownload-toolchain.sh
By the way, this is not OS X-specific, and the nodownload patches should be usable on Linux, cygwin, etc.
A couple of notes before you run the script:
- The patches only need to be applied once (and indeed trying to apply them more than once will fail.)
- Most of these patches are fairly ugly hacks, really, and will eventually break as the toolchain evolves. (For the record, I last tested it on SVN version 2335.)
- The psplinkusb patch tries to locate the GNU readline by looking in the standard fink and macports directories, but if your prefix folder is exotic, it won't find it.
- Insight does not build successfully, but the original build script simply exits at the first line anyway (i.e, insight is not normally built in the toolchain.) Since I have no use for it, I did not track down the problem; it is possible it does not build on the other platforms either, for all I know.
That's all folks! Enjoy!
Last edited by Prism on Thu Nov 15, 2007 6:34 am; edited 1 time in total |
|
| Back to top |
|
 |
jait
Joined: 23 Oct 2006 Posts: 2
|
Posted: Wed Nov 14, 2007 8:01 am Post subject: |
|
|
Thanks for the work. I haven't installed fink and I think that's causing me some problems with stage 2. (I fixed that problem by now.)
I did end up changing a few lines in your binutils-script patch. I replaced the "/usr/local/pspdev/" entries with $PSPDEV. I wanted to install stuff outside of the /usr directories.
Again, thanks.
Here's a short diff:
| Code: | --- 001-binutils-2.16.1.sh 2007-11-14 10:48:47.000000000 -0600
+++ 001-binutils-2.16.1-jait.sh 2007-11-14 10:50:42.000000000 -0600
@@ -24,9 +24,8 @@
make clean && make -r -j 2 && make install && make clean || { exit 1; }
## Strip off the .dSYM extension from executables, if any
- cd /usr/local/pspdev/bin
- files=`ls -1 /usr/local/pspdev/bin/*.dSYM`
- for file in $files ; do
- basename=${file%%.dSYM}
- mv $file $basename
+ for file in `ls $PSPDEV/bin/*.dSYM`
+ do
+ BASENAME=`echo $file | cut -f 1 -d '.'`
+ mv $BASENAME.dSYM $BASENAME
done
|
|
|
| Back to top |
|
 |
Prism
Joined: 26 Sep 2007 Posts: 2
|
Posted: Thu Nov 15, 2007 6:42 am Post subject: |
|
|
| jait wrote: | I did end up changing a few lines in your binutils-script patch. I replaced the "/usr/local/pspdev/" entries with $PSPDEV. I wanted to install stuff outside of the /usr directories.
Here's a short diff:
<snip> |
That's a good patch to my patch :)
Actually, I modified the binutils script patch in the release to include your changes. The link above was updated accordingly.
Thanks for that! |
|
| Back to top |
|
 |
macdonag
Joined: 31 Dec 2006 Posts: 5
|
Posted: Fri Mar 21, 2008 8:34 pm Post subject: Alternative download? |
|
|
Would someone be able to provide an alternative way of getting the patch? The mediafire link times out when I try to download.
Thanks. |
|
| Back to top |
|
 |
macdonag
Joined: 31 Dec 2006 Posts: 5
|
Posted: Sat Mar 22, 2008 5:29 am Post subject: |
|
|
| Actually, the file's accessible now. And it seems to be building. Fingers crossed. Thanks for the patch. |
|
| Back to top |
|
 |
Archaemic
Joined: 18 Mar 2007 Posts: 38
|
Posted: Tue Oct 28, 2008 7:54 am Post subject: |
|
|
Augh, I just spent a few hours fixing it myself (most of that was finding WHERE ac_cv_exeext got set)!
Oddly, I only had to patch two lines, one in binutils/configure and ld/configure, and all of the toolchain built fine, except for psplinkusb. Freetype isn't compiling, either, but I think this is the fault of an old version of libtoolize being in OS X. I haven't gotten a chance to test if any of the compiled stuff actually WORKS because the only program I have at hand is PSPComic, and that requires Freetype...
Here is my patch (which could easily be included in a future revision of the toolchain, really. All it does is make it so that it doesn't compile anything to .dSYM ever. It doesn't properly remove the .dSYM tests that get made from the debugging symbols (as that's what a .dSYM is supposed to be), but that's not really a problem so much):
| Code: |
--- binutils-2.16.1/binutils/configure 2005-03-22 10:31:04.000000000 -0500
+++ binutils-2.16.1/binutils/configure 2008-10-27 15:54:42.000000000 -0400
@@ -1668,7 +1668,7 @@
if { (eval echo configure:1669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.dSYM) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
--- binutils-2.16.1/ld/configure 2005-02-21 06:49:47.000000000 -0500
+++ binutils-2.16.1/ld/configure 2008-10-27 16:25:48.000000000 -0400
@@ -1672,7 +1672,7 @@
if { (eval echo configure:1673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.dSYM) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
|
|
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Wed Oct 29, 2008 1:17 am Post subject: |
|
|
| Quote: | Sending patches/binutils-2.16.1-PSP.patch
Transmitting file data .
Committed revision 2440. |
Thanks for the patch. |
|
| Back to top |
|
 |
colleenex
Joined: 14 Aug 2009 Posts: 1
|
Posted: Wed Aug 19, 2009 4:18 pm Post subject: |
|
|
Is their a way to run a Mac Os and Windows Os on the same computer?
Like the title says, I have a windows xp and I would like to have a Mac Os and Windows Os on the same computer, is it kinda of the same way as having ubuntu's xandros presto and windows on the same pc. Otherwise is their to do that?
_________________________
external keyword tool ~ keyworddiscovery.com ~ keycompete.com ~ compete.com ~ webmasterworld.com
Last edited by colleenex on Fri Aug 21, 2009 5:29 pm; edited 1 time in total |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Wed Aug 19, 2009 5:00 pm Post subject: |
|
|
| colleenex wrote: | Is their a way to run a Mac Os and Windows Os on the same computer?
Like the title says, I have a windows xp and I would like to have a Mac Os and Windows Os on the same computer, is it kinda of the same way as having ubuntu's xandros presto and windows on the same pc. Otherwise is their to do that? |
Buy a Mac and Install Windows. |
|
| Back to top |
|
 |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Wed Aug 19, 2009 6:05 pm Post subject: |
|
|
| colleenex wrote: | Is their a way to run a Mac Os and Windows Os on the same computer?
Like the title says, I have a windows xp and I would like to have a Mac Os and Windows Os on the same computer, is it kinda of the same way as having ubuntu's xandros presto and windows on the same pc. Otherwise is their to do that? |
Google hackintosh. |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Thu Aug 20, 2009 5:06 am Post subject: |
|
|
| Its a spam bot.. Go figure. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|