Building IOP gcc/binuitils under Cygwin?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
Barbarian
Posts: 28
Joined: Tue Jan 27, 2004 4:31 am

Building IOP gcc/binuitils under Cygwin?

Post by Barbarian »

I managed to compile and install the EE toolchain under Cygwin following the excellent guide provided on ps2dev.org.
Then I tried compiling the IOP gcc and binutils and that failed miserably. I run the provided script with -u option, it patched some files and then configured fine, but failed make almost right away!
Are there any detailed guides how to build IOP toolchain under Cygwin?
It will be greatly appreciated.

Btw, the EE toolchain had couple of problems that weren't mentioned in the guide - two headers had colliding defines. Commenting out one of the includes seemed to solve the problem. Is this a known issue?
boman666
Posts: 33
Joined: Fri Jan 30, 2004 10:25 am
Location: Hell

Post by boman666 »

Been there, done that, just a couple of days ago. The prb is that the file, configure.in is patched after configure, hence it'll have a more recent filedate and the makefile will try to build configure from configure.in which will fail because it invokes XSLoader which doesn't exist on cygwin.

I resolved the prb by just doing a touch on configure after the patch is applied, then it compiled fine.
OptiRoc
Posts: 22
Joined: Mon Feb 02, 2004 12:26 am
Location: Sweden

Post by OptiRoc »

I also ran into the same problem trying to build the IOP toolchain. I tried to touch configure after patching, like this:

tar xfvz binutils-2.9.1.tar.gz
cd binutils-2.9.1
cat ../ps2dev-iop-binutils-20020804.patch | patch -p1
touch configure
./configure --target=iop --prefix=$PS2DEV/iop
make

...make bombs rather immediately, though, with the following output:

make[1]: Entering directory `/home/OptiRoc/binutils-2.9.1/libiberty'
if [ -n "" ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
echo "# !Automatically generated from ./functions.def"\
"- DO NOT EDIT!" >needed2.awk
grep '^DEFVAR(' < ./functions.def \
| sed -e '/DEFVAR/s|DEFVAR.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define
NEED_\1\\n#endif\\n" }|' \
>>needed2.awk
grep '^DEFFUNC(' < ./functions.def \
| sed -e '/DEFFUNC/s|DEFFUNC.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#defi
ne NEED_\1\\n#endif\\n" }|' \
>>needed2.awk
gcc -c -g -O2 -I. -I./../include -DNEED_sys_siglist -DNEED_basename -DNEED_strsi
gnal ./dummy.c 2>/dev/null
make[1]: *** [dummy.o] Error 1
make[1]: Leaving directory `/home/OptiRoc/binutils-2.9.1/libiberty'
make: *** [all-libiberty] Error 2

Any ideas? I have successfully built ee-gcc 3.2.2 (with newlib and ps2lib) on the very same Cygwin setup, so there shouldn't be any problems there (or perhaps you need to use an old gcc?). Out of desperation I also tried to touch and some other files, before and after running configure, without success.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

There's problems compiling older versions of binutils and gcc with newer versions of the same. However, there's patches on my site ( http://www.oopo.net/consoledev ) that will allow you to compile these for the IOP.
boman666
Posts: 33
Joined: Fri Jan 30, 2004 10:25 am
Location: Hell

Post by boman666 »

Could you add an patch for the binutils aswell, that enables the possibility to build .irx binaries. Currently one have to use --target=mipsel-scei-irx to enable that feature, but then there will be a clash with the target of gcc-2.8.1.
OptiRoc
Posts: 22
Joined: Mon Feb 02, 2004 12:26 am
Location: Sweden

Post by OptiRoc »

ooPo: Worked like a charm, thanks! I'll look into making a ps2dev installation package for Cygwin during the weekend (no such exist, right?).
Oobles
Site Admin
Posts: 347
Joined: Sat Jan 17, 2004 9:49 am
Location: Melbourne, Australia
Contact:

Post by Oobles »

I did some cygwin installable packages a long time ago for a number of the compilers and ps2lib and hosted them on ps2dev.sf.net. These packages haven't been updated in a long time.

If you create new ones I will be happy to setup a directory on ps2dev.org.

You can see the packages created at http://ps2dev.sourceforge.net/cygwin/
I got told the ini file is broken for some reason. I must admit I haven't looked into updating them at all. With the new changes to compilers now would be a good time to update.

Oobles.
OptiRoc
Posts: 22
Joined: Mon Feb 02, 2004 12:26 am
Location: Sweden

Post by OptiRoc »

OK, I'll roll some packages during the weekend and send them over. What do you think about having only one EE package (binutils 2.13.2.1, gcc 3.2.2 with c++ support including newlib + the old dvp binutils), one IOP package (binutils 2.9.1, gcc 2.8.1) and a ps2lib 2.1 package?
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

abit of this discussion is already ongoing in the toolchain forum.
seems both Oobles and me are offering hosting :) but we will sort that out to have one entry point ( I have *bigger* bandwidth ;).
Pixel has made some debian packages and tgz's.
So putting up binary tarballs ( or package installers ) in one place would be a nice thing todo.
Kung VU
OptiRoc
Posts: 22
Joined: Mon Feb 02, 2004 12:26 am
Location: Sweden

Post by OptiRoc »

Allright, I have the packages here now. I suppose your *bigger* bandwidth settles the question of where to put them? :)

Some more testing needs to be done, or the purpose of the packages -- minimizing the amount of cygwin build questions on the forum -- is defeated.. I really don't have any code to stress-test the IOP compiler (hmm, perhaps one ought to create some sort of test-suite for current and future compilers?), but I suppose I can upload them right away so they can be tried out on some more machines.

The DVP binutils are pulled straight from the old cygwin packages, but as they operate on a rather stand-alone basis that shouldn't generate any problems, should it?
Post Reply