Anybody with a precompiled version of the libfat library?

Duamutef_MC

Well-Known Member
OP
Newcomer
Joined
Mar 15, 2018
Messages
78
Trophies
0
Age
39
XP
177
Country
United Kingdom
The last version of devkitpro is not successfully compiling the libfat library on github.

Anybody here has got a precompiled version?

Let me know. Even a copy of your devkitpro folder works if you got it installed. Thanks!
 

Duamutef_MC

Well-Known Member
OP
Newcomer
Joined
Mar 15, 2018
Messages
78
Trophies
0
Age
39
XP
177
Country
United Kingdom
The correct command to compile is btw
Code:
make wiiu-release

Hi mate.

Still get this error message:

C:\Users\Duamutef_MC\Downloads\libfat-master>make wiiu-release && make wiiu-install
make -C wiiu BUILD=release
make[1]: Entering directory '/home/Duamutef_MC/Downloads/libfat-master/wiiu'
directory.c
c:\users\duamutef_mc\downloads\libfat-master\source\directory.c: In function '_FAT_directory_entryStat':
c:\users\duamutef_mc\downloads\libfat-master\source\directory.c:1115:13: error: 'struct stat' has no member named 'st_spare1'; did you mean 'st_spare4'?
1115 | st->st_spare1 = 0;
| ^~~~~~~~~
| st_spare4
c:\users\duamutef_mc\downloads\libfat-master\source\directory.c:1120:13: error: 'struct stat' has no member named 'st_spare2'; did you mean 'st_spare4'?
1120 | st->st_spare2 = 0;
| ^~~~~~~~~
| st_spare4
c:\users\duamutef_mc\downloads\libfat-master\source\directory.c:1125:13: error: 'struct stat' has no member named 'st_spare3'; did you mean 'st_spare4'?
1125 | st->st_spare3 = 0;
| ^~~~~~~~~
| st_spare4
make[2]: *** [/opt/devkitpro/devkitPPC/base_rules:18: directory.o] Error 1
make[1]: *** [Makefile:83: release] Error 2
make[1]: Leaving directory '/home/Duamutef_MC/Downloads/libfat-master/wiiu'
make: *** [Makefile:36: wiiu-release] Error 2


Same thing happens with other libfat repositories.

Can you let me know what goes wrong? If you're not able to pinpoint the issue can you send me a precompiled library?
 

Duamutef_MC

Well-Known Member
OP
Newcomer
Joined
Mar 15, 2018
Messages
78
Trophies
0
Age
39
XP
177
Country
United Kingdom
Even worse, when changing directory.c to clear the error and compiling menu_sort, I get this:

C:\Users\Duamutef_MC\Downloads\menu_sort-1.2.0>make
entry.c
main.c
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c: In function 'MCPHookOpen':
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:88:13: error: too many arguments to function 'IOSUHAX_Open'
88 | if (IOSUHAX_Open("/dev/mcp") < 0)
| ^~~~~~~~~~~~
In file included from C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:9:
C:/devkitPro/portlibs/ppc/include/iosuhax.h:63:5: note: declared here
63 | int IOSUHAX_Open(void);
| ^~~~~~~~~~~~
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c: In function 'smartStrcmp':
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:135:17: warning: implicit declaration of function 'removeThe'; did you mean 'remove'? [-Wimplicit-function-declaration]
135 | removeThe(ac);
| ^~~~~~~~~
| remove
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:154:30: warning: implicit declaration of function 'prepend'; did you mean 'popen'? [-Wimplicit-function-declaration]
154 | ac = prepend(ac, np->defn);
| ^~~~~~~
| popen
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:154:28: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | ac = prepend(ac, np->defn);
| ^
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:160:28: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
160 | bc = prepend(bc, np->defn);
| ^
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c: In function 'Menu_Main':
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:419:19: error: too many arguments to function 'IOSUHAX_Open'
419 | int res = IOSUHAX_Open(NULL);
| ^~~~~~~~~~~~
In file included from C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:9:
C:/devkitPro/portlibs/ppc/include/iosuhax.h:63:5: note: declared here
63 | int IOSUHAX_Open(void);
| ^~~~~~~~~~~~
make[1]: *** [/home/Duamutef_MC/Downloads/menu_sort-1.2.0/Makefile:170: main.o] Error 1
make: *** [Makefile:127: build] Error 2


Is it me, or the general quality, reliability and robustness of Devkitpro - as well as the libraries - is a load of bullcrap?

How come the compiler finds error each and every step of the way? Am I using the wrong version? Am I on the wrong OS?
 

Duamutef_MC

Well-Known Member
OP
Newcomer
Joined
Mar 15, 2018
Messages
78
Trophies
0
Age
39
XP
177
Country
United Kingdom
Thanks for the library mate.

I reach the ELF linking phase and this marvellous list shows:

linking ... menu_sort.elf
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: main.o: in function `fSortCond':
main.c:(.text.fSortCond+0xc): undefined reference to `stricmp'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: main.o: in function `getXMLelement':
main.c:(.text.getXMLelement+0x80): undefined reference to `strcmpi'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: main.o: in function `Menu_Main':
main.c:(.text.Menu_Main+0x646): undefined reference to `IOSUHAX_sdio_disc_interface'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: main.c:(.text.Menu_Main+0x64a): undefined reference to `IOSUHAX_sdio_disc_interface'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: main.c:(.text.Menu_Main+0x656): undefined reference to `IOSUHAX_usb_disc_interface'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: main.c:(.text.Menu_Main+0x65a): undefined reference to `IOSUHAX_usb_disc_interface'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/devkitPro/portlibs/ppc/lib\libfat.a(disc.o): in function `get_io_wiiu_sd':
e:\wiiu\libfat-master-crem\source/disc.c:47: undefined reference to `IOSUHAX_sdio_disc_interface'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: e:\wiiu\libfat-master-crem\source/disc.c:47: undefined reference to `IOSUHAX_sdio_disc_interface'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/devkitPro/portlibs/ppc/lib\libfat.a(disc.o): in function `get_io_wiiu_usb':
e:\wiiu\libfat-master-crem\source/disc.c:51: undefined reference to `IOSUHAX_usb_disc_interface'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: e:\wiiu\libfat-master-crem\source/disc.c:51: undefined reference to `IOSUHAX_usb_disc_interface'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/Users/Duamutef_MC/Downloads/menu_sort-master/menu_sort-master/libxml2/lib\libxml2.a(encoding.o): in function `xmlGetEncodingAlias':
c:\libxml2-2.9.4/encoding.c:1017: undefined reference to `__ctype_ptr__'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: c:\libxml2-2.9.4/encoding.c:1017: undefined reference to `__ctype_ptr__'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/Users/Duamutef_MC/Downloads/menu_sort-master/menu_sort-master/libxml2/lib\libxml2.a(encoding.o): in function `xmlAddEncodingAlias':
c:\libxml2-2.9.4/encoding.c:1052: undefined reference to `__ctype_ptr__'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: c:\libxml2-2.9.4/encoding.c:1052: undefined reference to `__ctype_ptr__'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/Users/Duamutef_MC/Downloads/menu_sort-master/menu_sort-master/libxml2/lib\libxml2.a(encoding.o): in function `xmlParseCharEncoding':
c:\libxml2-2.9.4/encoding.c:1154: undefined reference to `__ctype_ptr__'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/Users/Duamutef_MC/Downloads/menu_sort-master/menu_sort-master/libxml2/lib\libxml2.a(encoding.o):c:\libxml2-2.9.4/encoding.c:1154: more undefined references to `__ctype_ptr__' follow
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/home/Duamutef_MC/Downloads/menu_sort-master/menu_sort-master/Makefile:149: /home/Duamutef_MC/Downloads/menu_sort-master/menu_sort-master/menu_sort.elf] Error 1
make: *** [Makefile:127: build] Error 2


This is quite ridicolous.
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
30,073
Trophies
2
XP
19,743
Country
United States
I should mention that that's a fork of libfat. I can't get libfat to compile either, and I think in both of our cases. our dependencies are too new. @V10lator or someone else will have to compile it on their systems. I only have one error, and I think it's related to that.
 

V10lator

Well-Known Member
Member
Joined
Apr 21, 2019
Messages
974
Trophies
0
Age
34
XP
2,338
Country
Germany
c:\users\duamutef_mc\downloads\libfat-master\source\directory.c:1115:13: error: 'struct stat' has no member named 'st_spare1'; did you mean 'st_spare4'?
C:/Users/Duamutef_MC/Downloads/menu_sort-1.2.0/src/main.c:88:13: error: too many arguments to function 'IOSUHAX_Open'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: main.o: in function `Menu_Main':
main.c:(.text.Menu_Main+0x646): undefined reference to `IOSUHAX_sdio_disc_interface'
All of this sounds like a wrong / too old libiosuhax. Try this one: https://github.com/Crementif/libiosuhax (yea, current situation is a bit messy with all these forks. This will hopefully solve itself over time through).

//EDIT: Also make sure to actually link the libraries / add V=1 to the make command to see the exact linker command used.
Here's one examle of how to link correctly. Note that the ordering of these args is important: https://github.com/V10lator/NUSspli/blob/master/Makefile#L58-L64
 
  • Like
Reactions: godreborn

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
30,073
Trophies
2
XP
19,743
Country
United States
All of this sounds like a wrong / too old libiosuhax. Try this one: https://github.com/Crementif/libiosuhax (yea, current situation is a bit messy with all these forks. This will hopefully solve itself over time through).

//EDIT: Also make sure to actually link the libraries / add V=1 to the make command to see the exact linker command used.
Here's one examle of how to link correctly. Note that the ordering of these args is important: https://github.com/V10lator/NUSspli/blob/master/Makefile#L58-L64
I tried docker with libfat, but I'm not sure where to go from here:

C:\Users\GODREBORN\Desktop\a\libfat>docker image build wiiu
[+] Building 13.2s (11/11) FINISHED
=> [internal] load build definition from Dockerfile 0.4s
=> => transferring dockerfile: 449B 0.0s
=> [internal] load .dockerignore 0.5s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/wiiulegacy/core:0.1 2.1s
=> FROM docker.io/wiiulegacy/libiosuhax:0.3 2.5s
=> => resolve docker.io/wiiulegacy/libiosuhax:0.3 1.9s
=> => sha256:c6eaedb4f55d0cb314e6d9c3f0a8ef12bbd1a10ecace3e132f0ecc4b6f4a68b9 5.80kB / 5.80kB 0.0s
=> => sha256:57b2f9275a413c4dc322ef37a685f4aeb3d013014feac25dae32b40da60d725c 1.80kB / 1.80kB 0.0s
=> => sha256:a55787c537e66fedbbb3c1dce886a148efee0d017bef678c04c1ed7ea5cb892b 53.19kB / 53.19kB 0.9s
=> => sha256:38b17103a934b705694789c3b02d1d877361193da38857481abb11d6b593c080 110.72kB / 110.72kB 1.1s
=> => extracting sha256:38b17103a934b705694789c3b02d1d877361193da38857481abb11d6b593c080 0.0s
=> => extracting sha256:a55787c537e66fedbbb3c1dce886a148efee0d017bef678c04c1ed7ea5cb892b 0.0s
=> [stage-0 1/6] FROM docker.io/wiiulegacy/core:[email protected]:97b420db50a57ae085e4546b48bd49d3bf9115a9f7692801d2371 2.2s
=> => resolve docker.io/wiiulegacy/core:[email protected]:97b420db50a57ae085e4546b48bd49d3bf9115a9f7692801d237128ba9107 0.0s
=> => sha256:97b420db50a57ae085e4546b48bd49d3bf9115a9f7692801d237128ba9107cd3 1.38kB / 1.38kB 0.0s
=> => sha256:6cd2604e8fc7616ca36212592deda11dce1dacb5527056e8ee3e3e3f52579162 4.42kB / 4.42kB 0.0s
=> [stage-0 2/6] COPY --from=wiiulegacy/libiosuhax:0.3 /artifacts /opt/devkitpro/portlibs 0.5s
=> [stage-0 3/6] RUN git clone https://github.com/Maschell/libfat && cd libfat && git checkout v1.1.3a 1.9s
=> [stage-0 4/6] WORKDIR libfat 0.3s
=> [stage-0 5/6] RUN make wiiu-release && find /opt/devkitpro/portlibs -maxdepth 3 -type f -delete && make -C 2.9s
=> [stage-0 6/6] WORKDIR /artifacts 0.0s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:5dc91f44b8231151c1ceea35030e5933eaa624b6024d7c39316f09c474f6189d 0.0s

also,

this is the error with libiosuhax:

C:\Users\GODREBORN\Desktop\a>cd libiosuhax

C:\Users\GODREBORN\Desktop\a\libiosuhax>make install
iosuhax.c
C:/Users/GODREBORN/Desktop/a/libiosuhax/source/iosuhax.c: In function 'IOSUHAX_FSA_ReadDir':
C:/Users/GODREBORN/Desktop/a/libiosuhax/source/iosuhax.c:502:33: error: 'FS_STAT_FILE' undeclared (first use in this function)
502 | out_data->info.flags |= FS_STAT_FILE;
| ^~~~~~~~~~~~
C:/Users/GODREBORN/Desktop/a/libiosuhax/source/iosuhax.c:502:33: note: each undeclared identifier is reported only once for each function it appears in
C:/Users/GODREBORN/Desktop/a/libiosuhax/source/iosuhax.c: In function 'IOSUHAX_FSA_StatFile':
C:/Users/GODREBORN/Desktop/a/libiosuhax/source/iosuhax.c:731:28: error: 'FS_STAT_FILE' undeclared (first use in this function)
731 | out_data->flags |= FS_STAT_FILE;
| ^~~~~~~~~~~~
C:/Users/GODREBORN/Desktop/a/libiosuhax/source/iosuhax.c: In function 'IOSUHAX_FSA_GetStat':
C:/Users/GODREBORN/Desktop/a/libiosuhax/source/iosuhax.c:829:28: error: 'FS_STAT_FILE' undeclared (first use in this function)
829 | out_data->flags |= FS_STAT_FILE;
| ^~~~~~~~~~~~
make[1]: *** [/opt/devkitpro/devkitPPC/base_rules:18: iosuhax.o] Error 1
make: *** [Makefile:123: lib/libiosuhax.a] Error 2
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
30,073
Trophies
2
XP
19,743
Country
United States
I think that's the same as the one I uploaded. where is it supposed to go? I have the fat library in my environmental variables, and I know it's working, because I compiled something else. however, I'm trying to compile his wiiu_sort. it's giving an error that points to that being the problem.
 

Xpl0itU

Well-Known Member
Member
Joined
Jul 8, 2021
Messages
187
Trophies
0
Age
22
XP
565
Country
Spain
I think that's the same as the one I uploaded. where is it supposed to go? I have the fat library in my environmental variables, and I know it's working, because I compiled something else. however, I'm trying to compile his wiiu_sort. it's giving an error that points to that being the problem.
Put it in the same directory as the Makefile and look at savemii’s Makefile for more info
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
30,073
Trophies
2
XP
19,743
Country
United States
Put it in the same directory as the Makefile and look at savemii’s Makefile for more info
C:\Users\GODREBORN\Desktop\a\menu_sort-y0.1.0>make
linking ... menu_sort.elf
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: cannot find -lfat
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/home/GODREBORN/Desktop/a/menu_sort-y0.1.0/Makefile:149: /home/GODREBORN/Desktop/a/menu_sort-y0.1.0/menu_sort.elf] Error 1
make: *** [Makefile:127: build] Error 2
 
General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: They call me the king of the spreadsheets, got em all printed out on my bed sheets