Homebrew Help compiling some yawmm mod

Devnol

Member
OP
Newcomer
Joined
Apr 2, 2020
Messages
16
Trophies
0
Age
24
XP
94
Country
Greece
Hello everyone, I'm having a bit of a problem compiling Fix94's Some-Yawmm-Mod (macOS, latest versions of devkitppc and other packages). It throws a bunch of errors, even when trying to compile the source as-is without changing anything.
I spoke to @XFlak on Discord about it and he told me that perhaps @fledge68 or @blackb0x could be of help.

The first time I try to run make, libwiidrc is missing, so I installed that and it proceeds. Next, running make throws a few warnings and stops after erroring out about fill3 in title.c:65:27. The full output is below:
ehcmodule.elf
fat.c
gui.c
iospatch.c
menu.c
mload.c
nand.c
restart.c
sha1.c
sys.c
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/sys.c: In function 'Sys_Init':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/sys.c:111:30: warning: passing argument 1 of 'SYS_SetResetCallback' from incompatible pointer type [-Wincompatible-pointer-types]
111 | SYS_SetResetCallback(__Sys_ResetCallback);
| ^~~~~~~~~~~~~~~~~~~
| |
| void (*)(void)
In file included from /opt/devkitpro/libogc/include/gccore.h:62,
from /opt/devkitpro/libogc/include/ogcsys.h:4,
from /Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/sys.c:4:
/opt/devkitpro/libogc/include/ogc/system.h:367:50: note: expected 'resetcallback' {aka 'void (*)(unsigned int, void *)'} but argument is of type 'void (*)(void)'
367 | resetcallback SYS_SetResetCallback(resetcallback cb);
| ~~~~~~~~~~~~~~^~
title.c
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/title.c: In function 'Title_FakesignTMD':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/title.c:65:27: error: 'tmd' {aka 'struct _tmd'} has no member named 'fill3'; did you mean 'fill2'?
65 | tmd_data->fill3 = fill;
| ^~~~~
| fill2
make[1]: *** [title.o] Error 1
make: *** [build] Error 2

I am given the suggestion that the code meant to say fill2 instead of fill3, but I doubt that is the case since this is how the code shipped from Fix94. I tried changing it to fill2 and it does go over that but it introduces a bunch of other errors, so I would like to first resolve this error properly instead of trying a random sugggestion the compiler makes.

So, what can I do to get this working?
Thanks in advance.
 

Stone_Wings

Well-Known Member
Member
Joined
Jan 18, 2022
Messages
407
Trophies
0
XP
435
Country
United States
Just curious, why do you need to compile it? Why not just download the pre-compiled elf or dol? Just for the fun of doing it yourself?
 
  • Like
Reactions: Kopimist

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,825
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,815
Country
Cyprus
To be clear, yawmm works on the wii mini, but yawmm is preventing installation of system menu wads as part of its brick protection, because it can't determine the current region due to an unknown SM version number, similar to what would happen on the wii with a custom maxxed out system menu version of 65535. Yawmm won't let u install a system menu for a different region, and since it can't detect the region, it won't permit installation of any region system menu
 

blackb0x

Well-Known Member
Member
Joined
Apr 22, 2019
Messages
788
Trophies
1
XP
3,545
Country
United Kingdom
expected 'resetcallback' {aka 'void (*)(unsigned int, void *)'} but argument is of type 'void (*)(void)'
Change this into void __Sys_ResetCallback(__attribute__((unused)) u32 irq, __attribute__((unused)) void *ctx)

error: 'tmd' {aka 'struct _tmd'} has no member named 'fill3'; did you mean 'fill2'?
Change fill3 into fill2.

You'll probably run into more warnings and errors since the app hasn't been updated to work with the latest version of devkitPPC and libogc. So you can either correct all of the issues or use an older version of devkitPro.

If you use a much older version of devkitPPC and libogc then you won't need to apply the above changes.
 
Last edited by blackb0x,

Devnol

Member
OP
Newcomer
Joined
Apr 2, 2020
Messages
16
Trophies
0
Age
24
XP
94
Country
Greece
I tried using an older devkitppc and libogc version and I had all sorts of different issues.

I applied the changes you suggested and now it appears that all the errors are gone (I still get a myriad of warnings) and the problem now is in linking. It appears that something is defined multiple times but I don't understand what exactly.

Here's the new output of make:
ehcmodule.elf
fat.c
gui.c
iospatch.c
menu.c
mload.c
nand.c
restart.c
sha1.c
sys.c
title.c
usbstorage.c
video.c
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/video.c: In function 'Con_FgColor':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/video.c:49:24: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'u32' {aka 'unsigned int'} [-Wformat=]
49 | printf("\x1b[%lu;%um", color + 30, bold);
| ~~^ ~~~~~~~~~~
| | |
| | u32 {aka unsigned int}
| long unsigned int
| %u
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/video.c: In function 'Con_BgColor':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/video.c:56:24: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'u32' {aka 'unsigned int'} [-Wformat=]
56 | printf("\x1b[%lu;%um", color + 40, bold);
| ~~^ ~~~~~~~~~~
| | |
| | u32 {aka unsigned int}
| long unsigned int
| %u
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/video.c: In function 'Con_FillRow':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/video.c:66:24: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'u32' {aka 'unsigned int'} [-Wformat=]
66 | printf("\x1b[%lu;%um", color + 40, bold);
| ~~^ ~~~~~~~~~~
| | |
| | u32 {aka unsigned int}
| long unsigned int
| %u
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/video.c:77:24: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'u32' {aka 'unsigned int'} [-Wformat=]
77 | printf("\x1b[%lu;0H", row);
| ~~^ ~~~
| | |
| | u32 {aka unsigned int}
| long unsigned int
| %u
wad-manager.c
In file included from /Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c:6:
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c: In function 'ReadConfigFile':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c:240:56: warning: array subscript has type 'char' [-Wchar-subscripts]
240 | else if (isalpha(tmpStr[0]))
| ~~~~~~^~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c: In function 'GetIntParam':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c:381:34: warning: array subscript has type 'char' [-Wchar-subscripts]
381 | while ((isdigit(inputStr ) == 0) && (i < len))
| ~~~~~~~~~^~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c:388:34: warning: array subscript has type 'char' [-Wchar-subscripts]
388 | while ((isdigit(inputStr )) && (i < len) && (outCount < 40))
| ~~~~~~~~~^~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c: In function 'GetStringParam':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c:412:34: warning: array subscript has type 'char' [-Wchar-subscripts]
412 | while ((isalpha(inputStr ) == 0) && (i < len))
| ~~~~~~~~~^~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad-manager.c:419:34: warning: array subscript has type 'char' [-Wchar-subscripts]
419 | while ((isalnum(inputStr )) && (i < len) && (outCount < maxChars))
| ~~~~~~~~~^~~
wad.c
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad.c: In function 'get_title_ios':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad.c:76:55: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
76 | sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));
| ~~~~^
| |
| long unsigned int
| %08x
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad.c:76:61: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=]
76 | sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));
| ~~~~^
| |
| long unsigned int
| %08x
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad.c: In function 'Wad_Install':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad.c:330:53: warning: format '%li' expects argument of type 'long int', but argument 2 has type 'unsigned int' [-Wformat=]
330 | printf("\n This Title wants IOS%li but the installed version\n is a stub.\n", TITLE_LOWER(tmd_data->sys_version));
| ~~^
| |
| long int
| %i
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/wad.c:452:58: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'u32' {aka 'unsigned int'} [-Wformat=]
452 | printf("\r\t\t>> Installing content #%02ld...", content->cid);
| ~~~~^ ~~~~~~~~~~~~
| | |
| long int u32 {aka unsigned int}
| %02d
wkb.c
wpad.c
pngu.c
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c: In function 'PNGU_SelectImageFromDevice':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:91:33: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
91 | ctx->filename = malloc (strlen (filename) + 1);
| ^~~~~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:14:1: note: include '<string.h>' or provide a declaration of 'strlen'
13 | #include <png.h>
+++ |+#include <string.h>
14 |
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:91:33: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
91 | ctx->filename = malloc (strlen (filename) + 1);
| ^~~~~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:91:33: note: include '<string.h>' or provide a declaration of 'strlen'
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:97:9: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
97 | strcpy(ctx->filename, filename);
| ^~~~~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:97:9: note: include '<string.h>' or provide a declaration of 'strcpy'
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:97:9: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:97:9: note: include '<string.h>' or provide a declaration of 'strcpy'
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c: In function 'PNGU_DecodeToRGBA8':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:217:25: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
217 | memcpy (buffer + (y * buffWidth * 4), ctx->row_pointers[y], width * 4);
| ^~~~~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:217:25: note: include '<string.h>' or provide a declaration of 'memcpy'
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:217:25: warning: incompatible implicit declaration of built-in function 'memcpy' [-Wbuiltin-declaration-mismatch]
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:217:25: note: include '<string.h>' or provide a declaration of 'memcpy'
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c: In function 'pngu_info':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:850:17: warning: incompatible implicit declaration of built-in function 'memcpy' [-Wbuiltin-declaration-mismatch]
850 | memcpy (magic, ctx->buffer, 8);
| ^~~~~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:850:17: note: include '<string.h>' or provide a declaration of 'memcpy'
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c: In function 'pngu_read_data_from_buffer':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:1101:9: warning: incompatible implicit declaration of built-in function 'memcpy' [-Wbuiltin-declaration-mismatch]

1101 | memcpy (data, ctx->buffer + ctx->cursor, length);
| ^~~~~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:1101:9: note: include '<string.h>' or provide a declaration of 'memcpy'
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c: In function 'pngu_write_data_to_buffer':
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:1110:9: warning: incompatible implicit declaration of built-in function 'memcpy' [-Wbuiltin-declaration-mismatch]

1110 | memcpy (ctx->buffer + ctx->cursor, data, length);
| ^~~~~~
/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/source/libpng/pngu/pngu.c:1110:9: note: include '<string.h>' or provide a declaration of 'memcpy'
stub.S
linking ... Some-YAWMM-Mod.elf
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld: restart.o:(.sbss.boot2version+0x0): multiple definition of `boot2version'; menu.o:(.sbss.boot2version+0x0): first defined here
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld: sys.o:(.sbss.boot2version+0x0): multiple definition of `boot2version'; menu.o:(.sbss.boot2version+0x0): first defined here
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld: video.o:(.sbss.boot2version+0x0): multiple definition of `boot2version'; menu.o:(.sbss.boot2version+0x0): first defined here
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld: wad-manager.o:(.sbss.boot2version+0x0): multiple definition of `boot2version'; menu.o:(.sbss.boot2version+0x0): first defined here
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld: wad.o:(.sbss.boot2version+0x0): multiple definition of `boot2version'; menu.o:(.sbss.boot2version+0x0): first defined here
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld: wpad.o:(.sbss.boot2version+0x0): multiple definition of `boot2version'; menu.o:(.sbss.boot2version+0x0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [/Users/pakou/Documents/CS_Projects/Some-YAWMM-Mod/Some-YAWMM-Mod.elf] Error 1
make: *** [build] Error 2
(The emoji are derived from the text <colon-open bracket> and idk how to make it not do that)
Thanks again for your time, I hope this is the last problem I come across.
 
  • Like
Reactions: Alexander1970

Devnol

Member
OP
Newcomer
Joined
Apr 2, 2020
Messages
16
Trophies
0
Age
24
XP
94
Country
Greece
to avoid your code turning into emoji's use the code tag
Code:
[code]Like this :)
[/code]
Yeah I thought of that but I wanted to use the spoiler so I don't have a wall of text just hangin' there and for some reason my monkey brain thought these were mutually exclusive.
 
  • Like
Reactions: XFlak

blackb0x

Well-Known Member
Member
Joined
Apr 22, 2019
Messages
788
Trophies
1
XP
3,545
Country
United Kingdom
wad.c:76:55: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
Change this line into sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));

There's some other warnings similar to this, but you can most likely safely ignore them.

pngu.c:14:1: note: include '<string.h>' or provide a declaration of 'strlen'
Add <string.h> to this line.

powerpc-eabi/bin/ld: restart.o:(.sbss.boot2version+0x0): multiple definition of `boot2version'; menu.o:(.sbss.boot2version+0x0): first defined here
Add u32 boot2version; to this line and then change this line into extern u32 boot2version;


to avoid your code turning into emoji's use the code tag
It's also possible to use the plain tag within a spoiler tag.

Like this :)
 
Last edited by blackb0x,
  • Like
Reactions: XFlak

Devnol

Member
OP
Newcomer
Joined
Apr 2, 2020
Messages
16
Trophies
0
Age
24
XP
94
Country
Greece
Wow, it compiles now. Thank you so much! I'll try it on my Wii later. Fingers crossed. Should I make a pr with those changes and the part I wanted to change for it to work on the wii mini or do you think Fix94 won't see it at all, since he hasn't been active on github for 2 years?
 

blackb0x

Well-Known Member
Member
Joined
Apr 22, 2019
Messages
788
Trophies
1
XP
3,545
Country
United Kingdom
Should I make a pr with those changes and the part I wanted to change for it to work on the wii mini or do you think Fix94 won't see it at all, since he hasn't been active on github for 2 years?
He hasn't been active for a long time, so I wouldn't bother. But if your changes for the Wii mini work then it might be worth pushing all of your changes to a fork.
 

Devnol

Member
OP
Newcomer
Joined
Apr 2, 2020
Messages
16
Trophies
0
Age
24
XP
94
Country
Greece
He hasn't been active for a long time, so I wouldn't bother. But if your changes for the Wii mini work then it might be worth pushing all of your changes to a fork.
Good idea. My changes for the wii mini are like a single line but whatever
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    How do you know if the night will be good when you're asleep
  • BakerMan @ BakerMan:
    because i didn't say i was asleep
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
    Karma177 @ Karma177: @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really...