• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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

11
Posts
4
Years
    • Seen Jun 1, 2023
    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
     
    2
    Posts
    3
    Years
    • Seen Jun 16, 2021
    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:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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.
     
    2
    Posts
    3
    Years
    • Seen Jun 16, 2021
    I fixed it! but im unsure how. Thanks for replying at 3 am tho! Greetings from the opposite side of the river (?)
     
    2
    Posts
    5
    Years
    • Seen May 31, 2022
    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.
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    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:
    3
    Posts
    3
    Years
    • Seen Nov 26, 2023
    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?
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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.
     
    2
    Posts
    2
    Years
    • Seen Feb 25, 2022
    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:
    19
    Posts
    4
    Years
  • 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)
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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.
     
    19
    Posts
    4
    Years
  • 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.
     

    RuFF

    Hope you're having a RuFF day!
    365
    Posts
    11
    Years
  • 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?
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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).
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Lately, MSys2 has been giving weird errors about signature keys that couldn't be trusted or something.
    Using pacman -Sy msys2-keyring solves it, so I edited the main post accordingly.
     
    Back
    Top