Page 1 of 1

ps2lib-2.0-NEWGCC.patch error

Posted: Mon Feb 02, 2004 8:52 am
by VectiS
Hi,

I've managed to build the ps2dev tool-chain under Cygwin, by following your excellent guide.
Everything seems to have gone ok except when trying to apply the ps2lib-2.0-NEWGCC.patch, i'm
getting the following:

Administrator@computer /cygdrive/c/cygwin/usr/local/ps2lib-2.0
$ cat ../ps2lib-2.0-NEWGCC.patch | patch -p1
patching file Makefile.eeglobal
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 14.
2 out of 2 hunks FAILED -- saving rejects to file Makefile.eeglobal.rej


Contents of makefile.eeglobal.rej:

***************
*** 4,10 ****
-I. $(EE_INCS)

# C compiler flags
- EE_CFLAGS := -D_EE -fshort-double -O2 -G0 -c -Wall $(EE_INCS) $(EE_CFLAGS)

# C++ compiler flags
EE_CXXFLAGS := $(EE_CFLAGS) $(EE_CXXFLAGS)
--- 4,10 ----
-I. $(EE_INCS)

# C compiler flags
+ EE_CFLAGS := -D_EE -fshort-double -fno-builtin -O2 -G0 -c -Wall $(EE_INCS) $(EE_CFLAGS)

# C++ compiler flags
EE_CXXFLAGS := $(EE_CFLAGS) $(EE_CXXFLAGS)
***************
*** 14,20 ****
-L$(PS2LIB_TOP_DIR)/ee/lib $(EE_LDFLAGS)

# asssembler flags
- EE_ASFLAGS := -mips3 -mcpu=r5900 -EL -G0 $(EE_ASFLAGS)

# Link with following libraries. This is a special case, and instead of
# allowing the user to override the library order, we always make sure
--- 14,20 ----
-L$(PS2LIB_TOP_DIR)/ee/lib $(EE_LDFLAGS)

# asssembler flags
+ EE_ASFLAGS := -march=r5900 -EL -G0 $(EE_ASFLAGS)

# Link with following libraries. This is a special case, and instead of
# allowing the user to override the library order, we always make sure



I'm totally new to Cygwin, ps2dev and I know nothing (yet I hope) about programming.

Can anyone help?.

Posted: Mon Feb 02, 2004 9:02 am
by ooPo
That should work, in fact I just tried it myself just to be sure nothing happened to the patch since I last used it. I don't use cygwin though, so I'm not sure I can help you there.

Hmm. Did you set cygwin to use unix or dos linefeeds?

Posted: Mon Feb 02, 2004 9:06 am
by VectiS
I set Cygwin to use unix linefeeds.

Posted: Thu Feb 12, 2004 5:08 pm
by Orfax
ooPo,

it is because of ^M at the end of the lines in the patch file, where Makefile.eeglobal has none.

I had the same problem, using cygwin. Fixed by stripping all the ^M out of the patch.