Help compiling swiss

Discuss one of the most feature filled GameCube applications here :)
Post Reply
Paul.str
Posts: 134
Joined: Thu Dec 02, 2010 2:49 am

Help compiling swiss

Post by Paul.str » Mon Jan 16, 2012 4:21 am

Hi,
When I try to compile swiss, I get tons of errors. I am quite new to all this building stuff, so I was hoping somebody could help me decipher this:

Code: Select all

paul@IBM:~/swiss-gc-read-only/cube/swiss$ make -if Makefile
bba.c
/home/paul/swiss-gc-read-only/cube/swiss/source/bba.c:4:21: fatal error: network.h: No such file or directory
compilation terminated.
make[1]: [bba.o] Error 1 (ignored)
exi.c
/home/paul/swiss-gc-read-only/cube/swiss/source/exi.c:19:72: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [exi.o] Error 1 (ignored)
gcm.c
/home/paul/swiss-gc-read-only/cube/swiss/source/gcm.c:2:72: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [gcm.o] Error 1 (ignored)
httpd.c
/home/paul/swiss-gc-read-only/cube/swiss/source/httpd.c:6:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [httpd.o] Error 1 (ignored)
main.c
/home/paul/swiss-gc-read-only/cube/swiss/source/main.c:2:72: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [main.o] Error 1 (ignored)
patcher.c
/home/paul/swiss-gc-read-only/cube/swiss/source/patcher.c:5:72: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [patcher.o] Error 1 (ignored)
swiss.c
/home/paul/swiss-gc-read-only/cube/swiss/source/swiss.c:8:72: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [swiss.o] Error 1 (ignored)
sidestep.c
/home/paul/swiss-gc-read-only/cube/swiss/source/aram/sidestep.c:9:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [sidestep.o] Error 1 (ignored)
ssaram.c
/home/paul/swiss-gc-read-only/cube/swiss/source/aram/ssaram.c:5:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [ssaram.o] Error 1 (ignored)
banner.c
/home/paul/swiss-gc-read-only/cube/swiss/source/gui/banner.c:6:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [banner.o] Error 1 (ignored)
blankbanner.c
FrameBufferMagic.c
/home/paul/swiss-gc-read-only/cube/swiss/source/gui/FrameBufferMagic.c:14:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [FrameBufferMagic.o] Error 1 (ignored)
info.c
/home/paul/swiss-gc-read-only/cube/swiss/source/gui/info.c:6:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [info.o] Error 1 (ignored)
IPLFontWrite.c
/home/paul/swiss-gc-read-only/cube/swiss/source/gui/IPLFontWrite.c:9:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [IPLFontWrite.o] Error 1 (ignored)
settings.c
/home/paul/swiss-gc-read-only/cube/swiss/source/gui/settings.c:6:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [settings.o] Error 1 (ignored)
config.c
/home/paul/swiss-gc-read-only/cube/swiss/source/config/config.c:6:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [config.o] Error 1 (ignored)
deviceHandler.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/deviceHandler.c:7:20: fatal error: ogcsys.h: No such file or directory
compilation terminated.
make[1]: [deviceHandler.o] Error 1 (ignored)
deviceHandler-DVD.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/dvd/deviceHandler-DVD.c:10:21: fatal error: ogc/dvd.h: No such file or directory
compilation terminated.
make[1]: [deviceHandler-DVD.o] Error 1 (ignored)
dvd.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/dvd/dvd.c:2:72: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [dvd.o] Error 1 (ignored)
ata.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/fat/ata.c:9:72: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [ata.o] Error 1 (ignored)
deviceHandler-FAT.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/fat/deviceHandler-FAT.c:6:17: fatal error: fat.h: No such file or directory
compilation terminated.
make[1]: [deviceHandler-FAT.o] Error 1 (ignored)
frag.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/fat/frag.c:8:20: fatal error: ogcsys.h: No such file or directory
compilation terminated.
make[1]: [frag.o] Error 1 (ignored)
deviceHandler-CARD.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/memcard/deviceHandler-CARD.c:9:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [deviceHandler-CARD.o] Error 1 (ignored)
deviceHandler-Qoob.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/qoob/deviceHandler-Qoob.c:6:17: fatal error: fat.h: No such file or directory
compilation terminated.
make[1]: [deviceHandler-Qoob.o] Error 1 (ignored)
deviceHandler-WODE.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/wode/deviceHandler-WODE.c:10:21: fatal error: ogc/dvd.h: No such file or directory
compilation terminated.
make[1]: [deviceHandler-WODE.o] Error 1 (ignored)
wode.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/wode/wode.c:3:71: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [wode.o] Error 1 (ignored)
cheats.c
gcars.c
/home/paul/swiss-gc-read-only/cube/swiss/source/cheats/gcars.c:6:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [gcars.o] Error 1 (ignored)
qchparse.c
/home/paul/swiss-gc-read-only/cube/swiss/source/cheats/qchparse.c:8:20: fatal error: gccore.h: No such file or directory
compilation terminated.
make[1]: [qchparse.o] Error 1 (ignored)
dvdreadasync_int.s
dvdreadasync.s
dvdread_int.s
dvdread.s
SlotA-HDD.s
SlotA-SD.s
SlotB-HDD.s
SlotB-SD.s
linking ... swiss.elf
powerpc-eabi-gcc: error: bba.o: No such file or directory
powerpc-eabi-gcc: error: exi.o: No such file or directory
powerpc-eabi-gcc: error: gcm.o: No such file or directory
powerpc-eabi-gcc: error: httpd.o: No such file or directory
powerpc-eabi-gcc: error: main.o: No such file or directory
powerpc-eabi-gcc: error: patcher.o: No such file or directory
powerpc-eabi-gcc: error: swiss.o: No such file or directory
powerpc-eabi-gcc: error: sidestep.o: No such file or directory
powerpc-eabi-gcc: error: ssaram.o: No such file or directory
powerpc-eabi-gcc: error: banner.o: No such file or directory
powerpc-eabi-gcc: error: FrameBufferMagic.o: No such file or directory
powerpc-eabi-gcc: error: info.o: No such file or directory
powerpc-eabi-gcc: error: IPLFontWrite.o: No such file or directory
powerpc-eabi-gcc: error: settings.o: No such file or directory
powerpc-eabi-gcc: error: config.o: No such file or directory
powerpc-eabi-gcc: error: deviceHandler.o: No such file or directory
powerpc-eabi-gcc: error: deviceHandler-DVD.o: No such file or directory
powerpc-eabi-gcc: error: dvd.o: No such file or directory
powerpc-eabi-gcc: error: ata.o: No such file or directory
powerpc-eabi-gcc: error: deviceHandler-FAT.o: No such file or directory
powerpc-eabi-gcc: error: frag.o: No such file or directory
powerpc-eabi-gcc: error: deviceHandler-CARD.o: No such file or directory
powerpc-eabi-gcc: error: deviceHandler-Qoob.o: No such file or directory
powerpc-eabi-gcc: error: deviceHandler-WODE.o: No such file or directory
powerpc-eabi-gcc: error: wode.o: No such file or directory
powerpc-eabi-gcc: error: gcars.o: No such file or directory
powerpc-eabi-gcc: error: qchparse.o: No such file or directory
make[1]: [/home/paul/swiss-gc-read-only/cube/swiss/swiss.elf] Error 1 (ignored)
output ... swiss.dol
Could not open ELF file: No such file or directory
make[1]: [/home/paul/swiss-gc-read-only/cube/swiss/swiss.dol] Error 1 (ignored)
paul@IBM:~/swiss-gc-read-only/cube/swiss$ 
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Help compiling swiss

Post by emu_kidid » Mon Jan 16, 2012 4:32 am

Wow. Looks like it can't find anything... did you install libOGC?
Image
User avatar
infact
Posts: 346
Joined: Tue Mar 29, 2011 4:35 am
Location: Germany

Re: Help compiling swiss

Post by infact » Mon Jan 16, 2012 1:49 pm

Yep, looks like your DevkitPPC is installed correctly (it uses the right "powerpc-eabi-" prefix), but you have not installed libogc in the correct folder. It should sit in $DEVKITPRO/libogc and will then be included correctly by the Makefile. In my case it looks like this:

Code: Select all

$ find $DEVKITPRO -maxdepth 2 -type d
/opt/devkitpro
/opt/devkitpro/libogc
/opt/devkitpro/libogc/include
/opt/devkitpro/libogc/lib
/opt/devkitpro/portlibs
/opt/devkitpro/portlibs/ppc
/opt/devkitpro/devkitPPC
/opt/devkitpro/devkitPPC/include
/opt/devkitpro/devkitPPC/mn10200
/opt/devkitpro/devkitPPC/share
/opt/devkitpro/devkitPPC/bin
/opt/devkitpro/devkitPPC/powerpc-eabi
/opt/devkitpro/devkitPPC/lib
/opt/devkitpro/devkitPPC/libexec
/opt/devkitpro/examples
/opt/devkitpro/examples/wii
/opt/devkitpro/examples/gamecube
And please change line 28 in "source/devices/deviceHandler.h" to

Code: Select all

#include "devices/qoob/deviceHandler-Qoob.h"
__________________^ (lowercase q)
This resolves issue 56.
infact
Image Image
Paul.str
Posts: 134
Joined: Thu Dec 02, 2010 2:49 am

Re: Help compiling swiss

Post by Paul.str » Mon Jan 16, 2012 3:43 pm

Okay. So I manually pasted the contents of libogc into the include folder of devkitpro.
(devkitppc->powerpc-eabi-include)
Maybe not the greatest idea, but whatever.

Now, I get:

Code: Select all

paul@IBM:~/swiss-gc-read-only/cube/swiss$ make -f Makefile
bba.c
exi.c
gcm.c
httpd.c
main.c
patcher.c
swiss.c
sidestep.c
ssaram.c
banner.c
FrameBufferMagic.c
info.c
IPLFontWrite.c
settings.c
config.c
deviceHandler.c
deviceHandler-DVD.c
dvd.c
ata.c
deviceHandler-FAT.c
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/fat/deviceHandler-FAT.c:6:17: fatal error: fat.h: No such file or directory
compilation terminated.
make[1]: *** [deviceHandler-FAT.o] Error 1
make: *** [build] Error 2
paul@IBM:~/swiss-gc-read-only/cube/swiss$ 
Where can I find fat.h?
Paul.str
Posts: 134
Joined: Thu Dec 02, 2010 2:49 am

Re: Help compiling swiss

Post by Paul.str » Mon Jan 16, 2012 4:01 pm

Oh. I just missed fat.h while copying libogc.

Will post more errors in a bit.
Paul.str
Posts: 134
Joined: Thu Dec 02, 2010 2:49 am

Re: Help compiling swiss

Post by Paul.str » Mon Jan 16, 2012 4:54 pm

All right.

I have gotten to this point:

Code: Select all

paul@IBM:~/swiss-gc-read-only/cube/swiss$ make -f Makefile
linking ... swiss.elf
frag.o: In function `get_frag_list':
/home/paul/swiss-gc-read-only/cube/swiss/source/devices/fat/frag.c:95: undefined reference to `_FAT_get_fragments'
collect2: ld returned 1 exit status
make[1]: *** [/home/paul/swiss-gc-read-only/cube/swiss/swiss.elf] Error 1
make: *** [build] Error 2
paul@IBM:~/swiss-gc-read-only/cube/swiss$
I have replaced every fat.h I can find with the fat.h from the libfat-frag folder (probably a bad idea), yet I still get this error.
User avatar
infact
Posts: 346
Joined: Tue Mar 29, 2011 4:35 am
Location: Germany

Re: Help compiling swiss

Post by infact » Mon Jan 16, 2012 4:59 pm

you need to copy (and maybe build) the patched libfat.

BUT:
I suggest removing the devkitpro-related stuff and using the Windows Installer (download) or the Linux/Mac instructions to create a clean build environment.
infact
Image Image
Paul.str
Posts: 134
Joined: Thu Dec 02, 2010 2:49 am

Re: Help compiling swiss

Post by Paul.str » Mon Jan 16, 2012 5:41 pm

Small update.

I rm'd devkitpro and the swiss source.

I then redownloaded both. I was much more careful in what I did. I am not getting the same error as above, but the files are less cluttered.

I have compared the fat.h included with libogc with the fat.h in linfat-frag included with swiss.
They are the same. There isn't a single difference.

I even copied and pasted this:
http://code.google.com/p/swiss-gc/sourc ... fat.h?r=23
into a fat.h and used that, but the error still occurs.
User avatar
infact
Posts: 346
Joined: Tue Mar 29, 2011 4:35 am
Location: Germany

Re: Help compiling swiss

Post by infact » Mon Jan 16, 2012 5:51 pm

that's a good start! ;-)

As said, you need the patched version of the library. you should have downloaded it with swiss, just change into the folder "swiss/cube/libfat-frag/src" and do a "make cube-release". Then copy the created "libfat.a" from folder "swiss/cube/libfat-frag/src/libogc/lib/cube" to your libogc-library folder "$DEVKITPRO/libogc/lib/cube" and overwrite the unpatched library.
infact
Image Image
Paul.str
Posts: 134
Joined: Thu Dec 02, 2010 2:49 am

Re: Help compiling swiss

Post by Paul.str » Mon Jan 16, 2012 7:04 pm

I had some trouble because the makefile wasn't telling me that devkitppc path wasn't set.
An export DEVKITPPC=whatevs fixed the problem.
libfat.a complied, I replaced the old file with it.

Code: Select all

paul@IBM:~/swiss/cube/swiss$ make -f Makefile
linking ... swiss.elf
output ... swiss.dol
paul@IBM:~/swiss/cube/swiss$
I can't test the files yet, but the fact that they compiled at all is awesome!

Thanks so much, infact.
Post Reply