ctrulib - make Errors When Compiling Examples

Discussion in '3DS - Homebrew Development and Emulators' started by tankgrrrl, Nov 20, 2014.

  1. tankgrrrl
    OP

    tankgrrrl Member

    Newcomer
    12
    0
    Nov 16, 2014
    United States
    Fairly sure I have the everything set up right, the .smdh .elf .3dsx files and /bin directory are created, but make gives a Png error and another error that's unclear to me. I assume the first one has to do with the icon but the default_icon.png file is where the 3ds_rules expects it to be (C:\devkitPro\ctrulib-master\libctru). The full make output is below. Any help is greatly appreciated...

    Code:
    C:\devkitPro\ctrulib-master\examples\app_launch>make
    main.c
    arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/ctrulib-master/examples/app_launch/build/main
    .d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=
    mpcore -mfloat-abi=softfp -I/c/devkitPro/ctrulib-master/examples/app_launch/include -IC:\
    devkitPro\ctrulib-master\libctru/include -I/c/devkitPro/ctrulib-master/examples/app_launc
    h/build -DARM11 -D_3DS -c /c/devkitPro/ctrulib-master/examples/app_launch/source/main.c -
    o main.o
    linking app_launch.elf
    built ... app_launch.3dsx
    Png load/decode error.
    make[1]: *** [/c/devkitPro/ctrulib-master/examples/app_launch/app_launch.smdh] Error 1
    make: *** [build] Error 2
     
  2. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,557
    21,532
    Sep 13, 2009
    Poland
    Gaming Grotto
    Are you sure that your devkitPro installation is up-to-date?
     
  3. tankgrrrl
    OP

    tankgrrrl Member

    Newcomer
    12
    0
    Nov 16, 2014
    United States
    Fairly sure, I installed it this morning from the official site and just ran the updater. The only bit I didn't install was the PSP tools...
     
  4. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,557
    21,532
    Sep 13, 2009
    Poland
    Gaming Grotto
    Well, as the prompt says, it's a Png error. Are you using any .png resources that might be corrupt?
     
  5. tankgrrrl
    OP

    tankgrrrl Member

    Newcomer
    12
    0
    Nov 16, 2014
    United States
    Yeah that's what I though but the only thing I can think is the default_icon.png included in ctrulib and it opens file so I doubt it's corrupt. It's where the setup file expects it as well (C:\devkitPro\ctrulib-master\libctru).
     
  6. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,557
    21,532
    Sep 13, 2009
    Poland
    Gaming Grotto
    Your code links and builds just fine, it must be something wrong with your setup. Have you tried running make as an administrator?
     
  7. tankgrrrl
    OP

    tankgrrrl Member

    Newcomer
    12
    0
    Nov 16, 2014
    United States
    Just now, same deal. :(
     
  8. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,557
    21,532
    Sep 13, 2009
    Poland
    Gaming Grotto
    I'll hail over someone who might help ya in a more constructive way.

    Snailface
     
  9. tankgrrrl
    OP

    tankgrrrl Member

    Newcomer
    12
    0
    Nov 16, 2014
    United States
    Much obliged. :)
     
  10. thecamper

    thecamper Newbie

    Newcomer
    6
    5
    Nov 21, 2014
    Gambia, The
    I had the same error under Windows while trying to build the ctrulib examples.
    To resolve the issue I had to change the environment variable CTRULIB from "c:\devkitPro\ctrulib\libctru" into the unix-like "/c/devkitPro/ctrulib/libctru".
    Hope this helpls.
     
    JoostinOnline likes this.
  11. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,557
    21,532
    Sep 13, 2009
    Poland
    Gaming Grotto
    That sounds like... a bizarre fix.
     
  12. Lectem

    Lectem Member

    Newcomer
    43
    61
    Nov 21, 2014
    France
    I used to have the same problem, as far as I can remember it was because of Cygwin, do you have it installed ?
    I think it was linked to the way it handles paths and some cygwin binaries were being used.
     
  13. thecamper

    thecamper Newbie

    Newcomer
    6
    5
    Nov 21, 2014
    Gambia, The
    The environment variables DEVKITPRO and DEVKITARM which are created by devkitPro-Installer look the same, so I just tried it and it worked for me.
     
    Foxi4 likes this.
  14. JoostinOnline

    JoostinOnline Certified Crash Test Dummy

    Member
    10,970
    3,755
    Apr 2, 2011
    United States
    The Twilight Zone
    Son of a bitch, that did fix it! I thought it was strange that the format was different, but I stuck with the directions.
     
  15. Byny

    Byny Member

    Newcomer
    16
    0
    Sep 23, 2009
    Brazil
    I also had this problem, so I switched from cmd to cygwin and it worked.
     
  16. 128bit_benny

    128bit_benny Member

    Newcomer
    45
    27
    Aug 16, 2014
    Gambia, The
    Hi, dont wanted to create a new Thread for it.

    When trying to compile the example located under:
    examples\graphics\bitmap\24bit-color

    Im getting:
    C:\devkitPro\examples\examples\graphics\bitmap\24bit-color>make
    brew.png
    Unzulässiger Parameter - /devkitPro
    make[1]: *** [brew.bgr] Error 4
    make: *** [build] Error 2

    Other examples ive tested, are working

    PS: Using the latest devkitpro/arm tools
     
  17. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    806
    296
    Jul 28, 2008
    United States
    This example requires that imagemagick be installed.
     
    Evernew and 128bit_benny like this.
  18. 128bit_benny

    128bit_benny Member

    Newcomer
    45
    27
    Aug 16, 2014
    Gambia, The
    Thanks! That did the trick. For everyone else whos may getting the problem, try it! :)