Can't compile Gecko OS on latest dkP

Post Reply
User avatar
waffeln
Posts: 2
Joined: Wed Sep 12, 2018 2:44 pm

Can't compile Gecko OS on latest dkP

Post by waffeln » Wed Sep 12, 2018 3:07 pm

I'm trying to compile Gecko OS (source on the right below Download) using the latest devkitPro installation but when i run make in \Gecko_src next to the Makefile file, i get this console output:

Code: Select all

D:\Git\geckoos_source\Gecko_src>make
gfx.c
D:/Git/geckoos_source/Gecko_src/source/gfx.c: In function 'gfx_draw_image':
D:/Git/geckoos_source/Gecko_src/source/gfx.c:126:2: error: unknown type name 'Vector'; did you mean 'vector'?
  Vector axis =(Vector) {0 , 0, 1 };
  ^~~~~~
  vector
D:/Git/geckoos_source/Gecko_src/source/gfx.c:126:16: error: 'Vector' undeclared (first use in this function); did you mean 'vector'?
  Vector axis =(Vector) {0 , 0, 1 };
                ^~~~~~
                vector
D:/Git/geckoos_source/Gecko_src/source/gfx.c:126:16: note: each undeclared identifier is reported only once for each function it appears in
D:/Git/geckoos_source/Gecko_src/source/gfx.c:126:24: error: expected ',' or ';' before '{' token
  Vector axis =(Vector) {0 , 0, 1 };
                        ^
In file included from C:/devkitPro/libogc/include/gccore.h:51,
                 from D:/Git/geckoos_source/Gecko_src/source/gfx.c:7:
D:/Git/geckoos_source/Gecko_src/source/gfx.c:127:23: warning: passing argument 2 of 'ps_guMtxRotAxisRad' from incompatible pointer type [-Wincompatible-pointer-types]
  guMtxRotAxisDeg (m2, &axis, degrees);
                       ^~~~~
C:/devkitPro/libogc/include/ogc/gu.h:493:57: note: in definition of macro 'guMtxRotAxisDeg'
 #define guMtxRotAxisDeg(mt,axis,deg) guMtxRotAxisRad(mt,axis,DegToRad(deg))
                                                         ^~~~
C:/devkitPro/libogc/include/ogc/gu.h:416:60: note: expected 'guVector *' {aka 'struct _vecf *'} but argument is of type 'int *'
 void ps_guMtxRotAxisRad(register Mtx mt,register guVector *axis,register f32 tmp0);
                                         ~~~~~~~~~~~~~~~~~~~^~~~
D:/Git/geckoos_source/Gecko_src/source/gfx.c: In function 'gfx_drawtile':
D:/Git/geckoos_source/Gecko_src/source/gfx.c:179:2: error: unknown type name 'Vector'; did you mean 'vector'?
  Vector axis =(Vector) {0 , 0, 1 };
  ^~~~~~
  vector
D:/Git/geckoos_source/Gecko_src/source/gfx.c:179:16: error: 'Vector' undeclared (first use in this function); did you mean 'vector'?
  Vector axis =(Vector) {0 , 0, 1 };
                ^~~~~~
                vector
D:/Git/geckoos_source/Gecko_src/source/gfx.c:179:24: error: expected ',' or ';' before '{' token
  Vector axis =(Vector) {0 , 0, 1 };
                        ^
In file included from C:/devkitPro/libogc/include/gccore.h:51,
                 from D:/Git/geckoos_source/Gecko_src/source/gfx.c:7:
D:/Git/geckoos_source/Gecko_src/source/gfx.c:180:23: warning: passing argument 2 of 'ps_guMtxRotAxisRad' from incompatible pointer type [-Wincompatible-pointer-types]
  guMtxRotAxisDeg (m2, &axis, degrees);
                       ^~~~~
C:/devkitPro/libogc/include/ogc/gu.h:493:57: note: in definition of macro 'guMtxRotAxisDeg'
 #define guMtxRotAxisDeg(mt,axis,deg) guMtxRotAxisRad(mt,axis,DegToRad(deg))
                                                         ^~~~
C:/devkitPro/libogc/include/ogc/gu.h:416:60: note: expected 'guVector *' {aka 'struct _vecf *'} but argument is of type 'int *'
 void ps_guMtxRotAxisRad(register Mtx mt,register guVector *axis,register f32 tmp0);
                                         ~~~~~~~~~~~~~~~~~~~^~~~
make[1]: *** [/opt/devkitpro/devkitPPC/base_rules:18: gfx.o] Error 1
make: *** [Makefile:100: build] Error 2
Note that i used normal cmd for running the command but that shouldn't affect anything, right?

I tried to fix some things in the code (i started replacing "Vector" with "guVector" in the gfx.c) but then new errors show up. I guess it doesn't show all the errors since it already stops at this file.
Note that i didn't make any changes to the code (yet), first i want to be able to compile it as it is.

Any help is appretiated =) I will reply to any more questions or request for information as fast as possible!
Regards, waffeln

DacoTaco
Posts: 9
Joined: Tue Sep 22, 2009 5:37 pm

Re: Can't compile Gecko OS on latest dkP

Post by DacoTaco » Fri Sep 14, 2018 9:01 pm

So, ive gotten it to compile
you'll need to install ppc-libpng & ppc-zlib via https://devkitpro.org/wiki/devkitPro_pacman

does it work? probably not.
what you'd need to do next is look at all the warnings youre going to get
many of them are leftovers from very old code and variables being a different type (like in file.c/sd.c still using DIR_ITER from diropen)
also look through the file.c at the code looping through the directory, that is broken for sure

compare menu_scandir() to something (less broken but still ugly as shit) like
https://github.com/DacoTaco/priiloader/ ... .cpp#L2028

enjoy, and if you have issues dont hesitate to poke me or anyone :')

http://upload.dacotaco.com/geckoos_source.zip


PS : you probably didn't see it on irc, so im posting it here as well
(9:16:52 PM) DacoTaco: http://upload.dacotaco.com/wiird.zip
(9:36:09 PM) DacoTaco: waffeln: wiird calls them wgc, but the files look the same

and i just notice it also accepts GCT. the thing with wiird is though, its meant as a PC tool connected to a wii/gcn through a usbgecko. not inapp like geckoOS

User avatar
waffeln
Posts: 2
Joined: Wed Sep 12, 2018 2:44 pm

Re: Can't compile Gecko OS on latest dkP

Post by waffeln » Sun Sep 16, 2018 11:01 am

WinterMute edited the code a bit more and now i'm able to compile it,
but there's still some broken stuff that makes it crash upon choosing "Launch Game" in latest Dolphin versions (where the original Gecko OS works).
The menu - surprisingly - seems fully functional!

I hosted the code you posted with WinterMute's edit (as the latest two commits) here: https://gitlab.com/waffeln/gecko-os

WinterMute said some more things about the code and what needs some touch-ups and what's broken but unfortunately i can't see the IRC history.

What can i do now? Are there resources for me to learn how to fix this project with the functions from libogc etc.?

WinterMute
Site Admin
Posts: 1369
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Can't compile Gecko OS on latest dkP

Post by WinterMute » Wed Nov 14, 2018 1:09 am

The point of the fork I did on gitlab was to PR changes back again but you kind of jumped the gun and I think you applied my earlier changes manually.

I fixed up the directory reading code & some warnings at https://gitlab.com/WinterMute/gecko-os but now I can't PR that back because of the conflicts. It would probably be best if you reverted the tree back to the point before I added some commits @ 775fdaaa then we can merge it in & see what's left to do.

I'm thinking that sdio_Shutdown/sdio_Deinitialize code should probably be handled in libfat with the fatUnmount somewhere.
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest