aboood40091/sm64-port

Strugging to set up the build environment

Closed this issue · 6 comments

Hi!

I'm trying to build this SM64 port so I can run it on my Wii U. I'm currently using Microsofts Ubuntu terminal, so for all I know, this is a fully-featured Ubuntu terminal.

I've followed the installation guide on how to build for Wii U on Linux, but I'm getting this error when I'm trying to run the makefile:

$ make VERSION=us
make: gcc: Command not found
make: *** [Makefile:66: n64graphics] Error 127
Traceback (most recent call last):
  File "./extract_assets.py", line 292, in <module>
    main()
  File "./extract_assets.py", line 162, in main
    subprocess.check_call(
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-s', '-C', 'tools/', 'n64graphics', 'skyconv', 'mio0', 'aifc_decode']' returned non-zero exit status 2.
Makefile:209: *** Failed to extract assets.  Stop.

However, I can confirm that powerpc-eabi-gcc is installed in /opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc. I've tried to create an alias for it, so I can just run the command gcc, but I'm getting the same error. Any idea what's wrong?

try this
sudo dkp-pacman -S devkit-env

source /etc/profile.d/devkit-env.sh

Also use WSL instead of MSYS2.
Lastly this is not devkitPro / WUT support.

I fired up Ubuntu in VirtualBox and followed the same procedure there. There I got an error saying that g++ was missing. After a bit of reading over at the Gbatemp forum, all I had to do was to install g++ from apt.

apt-get install g++

after I did this, I was able to compile a working binary! So for the Ubuntu for windows part, I'd probably just have to install gcc and g++.

try this
sudo dkp-pacman -S devkit-env
source /etc/profile.d/devkit-env.sh

Just for fun, I did try this on Ubuntu Windows, and the error were exactly the same. However, I tried to install gcc (apt-get install gcc), and the script ran for a while and extracted a bunch of textures from the ROM file. After a while I got this error:

make[1]: g++: Command not found
make[1]: *** [Makefile:7: audiofile.o] Error 127
make: *** [Makefile:53: audiofile/libaudiofile.a] Error 2
Makefile:216: *** Failed to build tools.  Stop.

I installed g++ (apt-get install g++), and now everything worked perfectly.

Anyways, it should be documented somewhere that you probably may have to install gcc and g++ to be able to build.

I was a little too quick there.

After a while I'm getting this error now:

levels/lll/leveldata.c:37:10: fatal error: ./levels/lll/sinking_rectangular_platform/model.inc.c: Invalid argument
   37 | #include "levels/lll/sinking_rectangular_platform/model.inc.c"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Looks to be an issue in WSL:
https://stackoverflow.com/questions/60139985/invalid-argument-error-compiling-stdio-h-iostream

For msys2, you need to run the mingw64 version and "pacman -S mingw-w64-x86_64-gcc" to get gcc.