Issues compiling Wii cores

I’m trying to compile a simple revision of Retroarch where pressing the power actually turns off the console instead of returning to loader. I’m having some difficulty though and would really appreciate any help!

First, I’m just trying to compile retroarch wii without any changes on my Ubuntu machine. I installed devkitppc and the necessary libraries by following this site: https://devkitpro.org/wiki/Getting_Started/devkitPPC

Then I started following the directions here: https://github.com/libretro/docs/blob/master/docs/compilation/wii.md

However, I cannot seem to find a ‘.a’ file that I can rename to ‘libretro_wii.a’ for when I execute the ‘make -f Makefile.griffin platform=wii’ command. I downloaded libretro-super-master because I read that’s a way to get a ‘.a’ file, however, after fetching snes9x2002 and attempting to make the file, I only found a ‘.so’ file.

Does anyone know what I may be doing wrong here, or how I can get a libretro_wii.a file?

If you’re getting an *.so library, you’re still compiling for your host operating system. Make sure you use the devkitpro toolchain and not the native gcc.

You need as you mentioned the libretro-super downloaded. Then inside of it you need to clone any core you want to build. I never tried snes9x2002 but to be sure try snes9x2010. The folder has a convention naming so it should be libretro-{core name} (i.e. libretro-snes9x2010, libretro-genesis_plus_gx, etc) and after this you need to run inside of libretro-super the command: ./libretro-build-wii.sh

After this it will look for folders with the cores you cloned and compile them. You will get a notification after this of how many cores were successfully compiled.

You can find the .a objects inside of libretro-super/dist/wii folder after completion.

As a side note, an easier way to compile RetroArch after getting the .a objects is to copy them inside the dist-scripts and then run: ./platform=wii dist-cores.sh inside of the dist-scripts folder. You will get the final build (all cores you provided) inside the wii folder inside the main ReatroArch folder.

Hope this helps you!

2 Likes

Great! Thank you for the concise directions. I was able to get a ‘.a’ file from the snes9x2010 core and renamed it to libretro_wii.a.

However, now I have a new issue. I threw libretro_wii.a into my retroarch-master folder and after compiling salamander I executed make -f Makefile.griffin platform=wii. I get an error in griffin/…/menu/menu_displaylist.c with the line if (settings->bools.quick_menu_show_take_screenshot) . It says there’s an error and ‘settings’ is undeclared. This is odd, because as I said, I haven’t made any changes to the code. Is settings called out in a library or file that I’m missing?

Yes that’s weird. Are you using the latest version from RetroArch or an old version? I suggest using the latest but instead of trying to compile manually as you did, drop your .a object (don’t rename it!, leave it as it comes…) to the dist-scripts folder and then run the dist-cores.sh there this way: “./dist-cores.sh wii” and it will do all the work for you… if it is successful it will generate the output in pkg/wii folder. You can drop multiple .a in this folder and the script will take care of them all.

Good Luck!

1 Like

I don’t know what was wrong with my version of retroarch I pulled from github, but after redownloading it with the git clone command I was fine. I then added my 1 line of code and compiled each core, giving me the desired function of shutting down when the power button is pressed.

Thanks for all your help!

1 Like

Hello people i have issues when compiling retroarch for WII i just straight downloaded DEVKITPRO which include MSYS2 and maybe all libraries needed *checked boxes for wii and GC DEV and at end i saw all stuff update pacman etc libogc … somebody explained on GBA temp tthat is best option to leave all default . and followed this mini guide after ./libretro-build-wii.sh i saw that i have only one successful core build fbneo_libretro_wii.a there where 30 fails !!! AND from there i get one BIG MESS

$ ./dist-cores.sh wii make: Entering directory ‘/home/Fusion/retroarch’ rm -f retroarch-salamander_wii.dol rm -f retroarch-salamander_wii.elf rm -f frontend/frontend_salamander.o frontend/frontend_driver.o frontend/drivers/platform_gx.o frontend/drivers/platform_wii.o libretro-common/file/file_path.o libretro-common/file/file_path_io.o libretro-common/hash/rhash.o libretro-common/string/stdstring.o libretro-common/lists/string_list.o libretro-common/lists/dir_list.o libretro-common/streams/file_stream.o libretro-common/vfs/vfs_implementation.o libretro-common/file/retro_dirent.o libretro-common/encodings/encoding_utf.o libretro-common/compat/compat_strl.o libretro-common/compat/compat_strcasestr.o libretro-common/compat/fopen_utf8.o libretro-common/file/config_file.o file_path_str.o verbosity.o wii/app_booter/app_booter.binobj wii/libogc/libfat/cache.o wii/libogc/libfat/directory.o wii/libogc/libfat/disc.o wii/libogc/libfat/fatdir.o wii/libogc/libfat/fatfile.o wii/libogc/libfat/file_allocation_table.o wii/libogc/libfat/filetime.o wii/libogc/libfat/libfat.o wii/libogc/libfat/lock.o wii/libogc/libfat/partition.o make -C wii/app_booter clean make[1]: Entering directory ‘/home/Fusion/retroarch/wii/app_booter’ rm -f app_booter.bin rm -f app_booter.elf rm -f crt0.o main.o …/…/libretro-common/crt/string.o make[1]: Leaving directory ‘/home/Fusion/retroarch/wii/app_booter’ make: Leaving directory ‘/home/Fusion/retroarch’ make: Entering directory ‘/home/Fusion/retroarch’ rm -f retroarch_wii.dol rm -f retroarch_wii.elf rm -f griffin/griffin.o wii/app_booter/app_booter.binobj make -C wii/app_booter clean make[1]: Entering directory ‘/home/Fusion/retroarch/wii/app_booter’ rm -f app_booter.bin rm -f app_booter.elf rm -f crt0.o main.o …/…/libretro-common/crt/string.o make[1]: Leaving directory ‘/home/Fusion/retroarch/wii/app_booter’ make: Leaving directory ‘/home/Fusion/retroarch’ make: Entering directory ‘/home/Fusion/retroarch’ /opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc -Wall -std=gnu99 -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Iwii/libogc/include -std=gnu99 -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_RARCH_EXEC -DGEKKO -Wno-char-subscripts -O3 -c -o frontend/frontend_salamander.o frontend/frontend_salamander.c make: *** [Makefile.wii.salamander:124: frontend/frontend_salamander.o] Error 1

HELP