• 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.

Unable to 'make" a .gba file

1
Posts
284
Days
    • Seen Sep 6, 2023
    I'm attempting to build DraftEmerald (https://github.com/Kobazco/DraftEmerald) from Alpharad's Youtube video of him and 5 others playing this hack. (https://www.youtube.com/watch?v=svgylR1xRwk&t=727s)

    I'm using MSYS2 and every time I attempt to build it it gives me this error despite downloading everything in the tutorial:

    "
    convert_png.c:5:10: fatal error: png.h: No such file or directory
    5 | #include <png.h>
    | ^~~
    compilation terminated.
    make[2]: [Makefile:18: gbagfx] Error 1
    make[1]: [Makefile:169: tools/gbagfx] Error 2
    arm-none-eabi-gcc -Wall -Wextra -Wno-switch -Werror -std=c11 -O2 main.c extended.c -o aif2pcm -lm
    arm-none-eabi-gcc -Wall -Wextra -Werror -std=c11 -O2 bin2c.c -o bin2c
    arm-none-eabi-gcc gbafix.c -o gbafix
    arm-none-eabi-gcc -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK main.c convert_png.c gfx.c jasc_pal.c lz.c rl.c util.c font.c huff.c -o gbagfx -lpng -lz
    /bin/bash: line 1: tools/scaninc/scaninc.exe: No such file or directory
    "

    It says I'm missing a file called png.h and scaninc.exe but I have no idea where these files could located or how I could get them. This is the last thing I need to build this and I'm out of ideas.... can anyone help?
     
    Last edited:

    Lunos

    Random Uruguayan User
    3,115
    Posts
    15
    Years
  • I'm attempting to build DraftEmerald (https://github.com/Kobazco/DraftEmerald) from Alpharad's Youtube video of him and 5 others playing this hack. (https://www.youtube.com/watch?v=svgylR1xRwk&t=727s)

    I'm using MSYS2 and every time I attempt to build it it gives me this error despite downloading everything in the tutorial:

    "
    convert_png.c:5:10: fatal error: png.h: No such file or directory
    5 | #include <png.h>
    | ^~~
    compilation terminated.
    make[2]: [Makefile:18: gbagfx] Error 1
    make[1]: [Makefile:169: tools/gbagfx] Error 2
    arm-none-eabi-gcc -Wall -Wextra -Wno-switch -Werror -std=c11 -O2 main.c extended.c -o aif2pcm -lm
    arm-none-eabi-gcc -Wall -Wextra -Werror -std=c11 -O2 bin2c.c -o bin2c
    arm-none-eabi-gcc gbafix.c -o gbafix
    arm-none-eabi-gcc -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK main.c convert_png.c gfx.c jasc_pal.c lz.c rl.c util.c font.c huff.c -o gbagfx -lpng -lz
    /bin/bash: line 1: tools/scaninc/scaninc.exe: No such file or directory
    "

    It says I'm missing a file called png.h and scaninc.exe but I have no idea where these files could located or how I could get them. This is the last thing I need to build this and I'm out of ideas.... can anyone help?
    Errors involving the png.h header file tend to be caused by a lack of libpng.
    You don't have libpng installed in your environment, or your environment can't find your installation of libpng.
    I teach how to build it from the source code and install it in MSys2 right here.
     
    2
    Posts
    116
    Days
    • Seen Mar 2, 2024
    Hijacking this old post since I'm running into a similar issue on MSys2--

    I followed your tutorial to install libpng, with the only substitution replacing pokeruby with pokeemerald-ex-speedchoice from github. I did not run into any errors with missing a png.h file, but still get the error about scaninc.exe not being present in the directory. It ran for a few seconds before it spat out ~100 lines of the following error after I input make -j2:

    /bin/bash: line 1: tools/scaninc/scaninc.exe: No such file or directory
    And then ended with:

    tools/jsonproc/jsonproc.exe src/data/wild_encounters.json src/data/wild_encounters.json.txt src/data/wild_encounters.h /bin/bash: line 1: tools/jsonproc/jsonproc.exe: No such file or directory /bin/bash: line 1: tools/scaninc/scaninc.exe: No such file or directory make: *** [json_data_rules.mk:8: src/data/wild_encounters.h] Error 127

    I'm relatively new to this stuff so still trying to figure it all out... Any ideas?
     

    Lunos

    Random Uruguayan User
    3,115
    Posts
    15
    Years
  • Hijacking this old post since I'm running into a similar issue on MSys2--

    I followed your tutorial to install libpng, with the only substitution replacing pokeruby with pokeemerald-ex-speedchoice from github. I did not run into any errors with missing a png.h file, but still get the error about scaninc.exe not being present in the directory. It ran for a few seconds before it spat out ~100 lines of the following error after I input make -j2:

    /bin/bash: line 1: tools/scaninc/scaninc.exe: No such file or directory
    And then ended with:

    tools/jsonproc/jsonproc.exe src/data/wild_encounters.json src/data/wild_encounters.json.txt src/data/wild_encounters.h /bin/bash: line 1: tools/jsonproc/jsonproc.exe: No such file or directory /bin/bash: line 1: tools/scaninc/scaninc.exe: No such file or directory make: *** [json_data_rules.mk:8: src/data/wild_encounters.h] Error 127

    I'm relatively new to this stuff so still trying to figure it all out... Any ideas?
    Speedchoice needs additional packages such as capstone. Perhaps that's the reason why preproc and scaninc weren't built on your end.
    sudo apt install libcapstone-dev, make clean, make tools and if that doesn't throw any errors, proceed with make -jN where N is the number of CPU threads you want to assign.
     
    2
    Posts
    116
    Days
    • Seen Mar 2, 2024
    Where would I run those commands? In the home folder or the cloned Speedchoice folder?
     
    Back
    Top