Open villasenor opened 10 months ago
I believe there may have been several big changes in Libdragon since I last worked on this, as I see a lot of announcements in the N64Brew discord I haven't caught up on. Could you tell me a bit about the build environment? I'll have to research what exactly changed or find out if it's just a symptom of later libdragon releases.
If it's not the latest, what commit / branch / tag of libdragon are you using? If it was the docker build environment or the prebuilt stable binaries, did it say which version?
That makes sense. This particular machine is running Ubuntu 22.04 with the following compoents/versions that finally got me to a .z64
file (which doesn't work - see screenshot above, but at least it built):
libdragon@11.0.0
(Commit hash df42e632b6ee05045becd12f49d65573402a822c
)node v18.4.0
npm v8.12.1
Docker 25.0.0
ares version 134
The first time I ran libdragon init
I did get this error (probably because I didn't do a recursive clone and grab the submodule files):
Initializing a libdragon project at /home/user/git/N64-RPG
/home/user/git/N64-RPG/.libdragon exists. This is already a libdragon project, starting it...
Creating new container...
Successfully initialized docker container: /musing_shirley
Reinitialized existing Git repository in /home/user/git/N64-RPG/.git/
-bba7de75b8bc90110001e6d076942524a637d8be libdragon
'libdragon' already exists and is not a valid git repo
Unable to create submodule. If you have copied the executable in your project folder or you have a file named libdragon, removing it might solve this issue. Original error:
Command git -C /home/user/git/N64-RPG submodule add --force --name libdragon --branch trunk https://github.com/DragonMinded/libdragon libdragon exited with code 1.
...which I resolved by just deleting the folder and letting init clone it down again with latest (which is how I achieved the version stack mentioned in the beginning):
Reinitialized existing Git repository in /home/user/git/N64-RPG/.git/
Initializing a libdragon project at /home/user/git/N64-RPG
/home/user/git/N64-RPG/.libdragon exists. This is already a libdragon project, starting it...
Reinitialized existing Git repository in /home/user/git/N64-RPG/.git/
Cloning into '/home/user/git/N64-RPG/libdragon'...
remote: Enumerating objects: 63036, done.
remote: Counting objects: 100% (3792/3792), done.
remote: Compressing objects: 100% (1387/1387), done.
remote: Total 63036 (delta 2895), reused 3186 (delta 2387), pack-reused 59244
Receiving objects: 100% (63036/63036), 39.74 MiB | 60.11 MiB/s, done.
Resolving deltas: 100% (56573/56573), done.
Installing libdragon to the container...
When I do a fresh recursive clone so that I get the hash you used, it errors out at libdragon init
:
Initializing a libdragon project at /home/user/git/N64-RPG
/home/user/git/N64-RPG/.libdragon exists. This is already a libdragon project, starting it...
Creating new container...
Successfully initialized docker container: /heuristic_raman
Reinitialized existing Git repository in /home/user/git/N64-RPG/.git/
bba7de75b8bc90110001e6d076942524a637d8be libdragon (toolchain-continuous-prerelease-132-gbba7de75)
Adding existing repo at 'libdragon' to the index
Installing libdragon to the container...
Command docker exec --workdir /libdragon/libdragon -u 1000:1000 -i d5b5755b40086cb0281948c5e27354e007c9f7d27839962b38dc50d5765457f9 /bin/bash ./build.sh exited with code 127.
Command error output:
mksprite.c:6:10: fatal error: png.h: No such file or directory
6 | #include <png.h>
| ^~~~~~~
compilation terminated.
make[2]: *** [Makefile:7: mksprite] Error 1
make[1]: *** [Makefile:49: mksprite] Error 2
make[1]: *** Waiting for unfinished jobs....
n64sym.c: In function 'symbol_add':
n64sym.c:136:13: warning: ignoring return value of 'asprintf' declared with attribute 'warn_unused_result' [-Wunused-result]
136 | asprintf(&addrbin, "%s/bin/mips64-elf-addr2line", n64_inst);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
n64sym.c:183:9: warning: ignoring return value of 'getline' declared with attribute 'warn_unused_result' [-Wunused-result]
183 | getline(&line_buf, &line_buf_size, addr2line_r);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
n64sym.c:205:5: warning: ignoring return value of 'getline' declared with attribute 'warn_unused_result' [-Wunused-result]
205 | getline(&line_buf, &line_buf_size, addr2line_r);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
n64sym.c:206:5: warning: ignoring return value of 'getline' declared with attribute 'warn_unused_result' [-Wunused-result]
206 | getline(&line_buf, &line_buf_size, addr2line_r);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
n64sym.c: In function 'elf_find_callsites':
n64sym.c:213:5: warning: ignoring return value of 'asprintf' declared with attribute 'warn_unused_result' [-Wunused-result]
213 | asprintf(&cmd, "%s/bin/mips64-elf-objdump -d %s", n64_inst, elf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:68: tools-install] Error 2
./build.sh: line 26: sudo: command not found
Hi! I just tried to build and run your project in Ares (with no modifications), and I got this error:
ASSERTION FAILED: unsupported bitdepth (16) for sprite
I wasn't able to figure out how to change the bitdepth to accommodate that. Any ideas?