• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Tutorial] How to build Pokeruby/Pokeemerald using devkitPro's MSys2

convert_png.c:5:10: fatal error: png.h: No such file or directory
Are you sure that you installed libpng? The steps are in the main post.
 
Are you sure that you installed libpng? The steps are in the main post.

I don't think I installed libpng correctly (maybe accidentally skipped 'make install' altogether lol) because I reinstalled it and it is now working, thanks I appreciate the help
 
Are you sure that you installed libpng? The steps are in the main post.

I Have the same error and i installed png twice. Should libpng be on the same folder as the rest of the downloads or something?

Just in case, here's the fatal error message.
convert_png.c:5:10: fatal error: png.h: No such file or directory
5 | #include <png.h>
| ^~~~~~~
compilation terminated.
make[1]: *** [Makefile:18: gbagfx] Error 1
make: *** [Makefile:162: tools/gbagfx] Error 2
 
Last edited:
I Have the same error and i installed png twice. Should libpng be on the same folder as the rest of the downloads or something?

Just in case, here's the fatal error message.
convert_png.c:5:10: fatal error: png.h: No such file or directory
5 | #include <png.h>
| ^~~~~~~
compilation terminated.
make[1]: *** [Makefile:18: gbagfx] Error 1
make: *** [Makefile:162: tools/gbagfx] Error 2
No, it doesn't need to be. But yeah, you're missing libpng.
Are you sure that you're following the steps in the main post to a T? It should be working undeniably.
If you need to, there's a video tutorial where you can see quite clearly the exact steps.
 
I fixed it! but im unsure how. Thanks for replying at 3 am tho! Greetings from the opposite side of the river (?)
 
The make install command isn't working for me. I'm on mac. Everything up to there works properly. My home folder contains clean installations of pokeemerald and agbcc.
 
quick add on, when trying to change directories to a folder that has a space in its name, to avoid the "too many arguments" error, enclose the entire thing in quotations.

ex. cd downloads/"New folder"


edit also quick tip I found, msys2 uses a different short cut for pasting, so to speed things up, you can paste anything you've copied with
Shift+insert.
 
Last edited:
for the second step im getting that some .zst files in the pkg folder are invalid or corrupted also that the signature is unkown trust. any idea what could cause this and how to fix it?
 
for the second step im getting that some .zst files in the pkg folder are invalid or corrupted also that the signature is unkown trust. any idea what could cause this and how to fix it?
I can't help you because I never experienced that, but a quick google search took me here.
If I were you, I'd try pacman-key --refresh-keys and then pacman -S make gcc zlib-devel git like it says here.
 
for the second step im getting that some .zst files in the pkg folder are invalid or corrupted also that the signature is unkown trust. any idea what could cause this and how to fix it?

I'm not sure if you've solved this already or not, but I wanted to share that I had the same exact problem, and the first solution on this page (from HalosGhost) fixed it for me.
 
Last edited:
I'm not sure if you've solved this already or not, but I wanted to share that I had the same exact problem, and the first solution on this page (from HalosGhost) fixed it for me.
Just a quick heads up, you posted the link incorrectly using both the HTTP and the HTTPS protocols at the same time.
I suppose this is the link you wanted to share?
 
Coming back to decomp stuffs and wanted a fresh install. been sat here for 3hrs at this point and haven't even gotten agbcc built yet.
first I encountered an issue when using the devkitpro installer. when I used that I ended up with 403(forbidden) errors on some packages when running "pacman -S make gcc zlib-devel git". I tried running in administrator mode, same thing.
so I tried a manual install of msys2 and devkitpro. worked great, up until building agbcc. I get an error saying it couldn't find a binutils install and asks for devkitARM to be installed. I have reinstalled devkitARM multiple times, tried removing and cloning agbcc to different directories (wasn't in the home directory when first tried) and I still get the same error.

here it is with proof of install:
Code:
yknr3@DESKTOP-YKNR MSYS ~/projects/pokeemerald/util/agbcc
# pacman -Qi devkitARM
Name            : devkitARM
Version         : r57-8
Description     : Toolchain for gp2x, gp32, Nintendo gba, nds, dsi, (3)ds &
                  switch homebrew development
Architecture    : x86_64
URL             : https://github.com/devkitpro/buildscripts
Licenses        : Various
Groups          : gp32-dev  gp2x-dev  gba-dev  nds-dev  3ds-dev
Provides        : None
Depends On      : devkitarm-rules  devkitarm-crtls
Optional Deps   : None
Required By     : devkitARM-gdb  libgba  libtonc  maxmod-gba
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 238.03 MiB
Packager        : Dave Murphy <[email protected]>
Build Date      : Sat Jan 1 18:05:02 2022
Install Date    : Sat Feb 5 12:15:34 2022
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature


yknr3@DESKTOP-YKNR MSYS ~/projects/pokeemerald/util/agbcc
# ./build.sh
Could not find a binutils installation! Re-read the instructions and make sure you've installed either devkitARM or binutils-arm-none-eabi, depending on your system.

if someone has some idea of what's going on please tell me.

(I have xfinity internet if that maters, saw a tweet mentioning that xfinity will occasionally treat devkitpro packages as malware which might be why I was getting a 403 error, but I can't say for certain)
(also, as to why I'm making a fresh install is I periodically remove programs I haven't used recently, and my setup for decomp stuff was one of those)
 
I have xfinity internet if that maters, saw a tweet mentioning that xfinity will occasionally treat devkitpro packages as malware which might be why I was getting a 403 error, but I can't say for certain
Yes, that is correct. Xfinity blocks the addresses of devkitPro's servers by default, so the installer can't download any packages.
I'm not sure about the exact procedure because I'm not North American. Comcast has no presence at all in my country.
From what I remember reading in Pret's Discord, you have to disable something called "Protected Browsing"?
It would probably be better to ask for specific instructions there, to be completely safe.
 
I fixed my issue and everything is working now. problem ended up being the signature for "David macek" was broken.
I stared by wiping my setup from yesterday and doing a fresh install via the devkitpro installer
then I refreshed all the keyrings using the process mentioned here (github issues thread).
this un-signs all locally signed keyrings, so I locally signed the devkitpro key (copying the command from the devkitpro wiki under "customizing existing pacman install", cause I don't want to type out random characters).

after this the rest of the tutorial worked perfectly. so if anyone gets a credential issue involving "David macek", this is a way to fix it.
 
I don't know if this question has been asked already but is it possible to build pokeruby from an exisiting romhack or an already edited ruby rom?
 
I don't know if this question has been asked already but is it possible to build pokeruby from an exisiting romhack or an already edited ruby rom?
No. Common binary hacking and decomp hacking share no relation.
Pokeruby can build a clean ROM of Pokémon Ruby or Sapphire, in any of their 3 builds (v1.0, v1.1 and v1.2).
 
Back
Top