forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Building IOP gcc/binuitils under Cygwin?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
Barbarian



Joined: 27 Jan 2004
Posts: 28

PostPosted: Tue Feb 03, 2004 11:10 am    Post subject: Building IOP gcc/binuitils under Cygwin? Reply with quote

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?
Back to top
View user's profile Send private message
boman666



Joined: 30 Jan 2004
Posts: 33
Location: Hell

PostPosted: Tue Feb 03, 2004 12:08 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
OptiRoc



Joined: 02 Feb 2004
Posts: 22
Location: Sweden

PostPosted: Thu Feb 05, 2004 6:50 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Feb 05, 2004 7:30 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
boman666



Joined: 30 Jan 2004
Posts: 33
Location: Hell

PostPosted: Thu Feb 05, 2004 11:14 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
OptiRoc



Joined: 02 Feb 2004
Posts: 22
Location: Sweden

PostPosted: Fri Feb 06, 2004 6:26 pm    Post subject: Reply with quote

ooPo: Worked like a charm, thanks! I'll look into making a ps2dev installation package for Cygwin during the weekend (no such exist, right?).
Back to top
View user's profile Send private message
Oobles
Site Admin


Joined: 17 Jan 2004
Posts: 362
Location: Melbourne, Australia

PostPosted: Fri Feb 06, 2004 6:45 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
OptiRoc



Joined: 02 Feb 2004
Posts: 22
Location: Sweden

PostPosted: Fri Feb 06, 2004 8:43 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
blackdroid



Joined: 17 Jan 2004
Posts: 564
Location: Sweden

PostPosted: Fri Feb 06, 2004 10:14 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
OptiRoc



Joined: 02 Feb 2004
Posts: 22
Location: Sweden

PostPosted: Thu Feb 12, 2004 6:32 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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