Can't compile hblauncher_loader-1.0

Discussion in '3DS - Homebrew Development and Emulators' started by tobiobito, Jan 13, 2016.

  1. tobiobito
    OP

    tobiobito Member

    Newcomer
    41
    7
    Jan 4, 2016
    United States
    This is the log when I try to run the make file.

    c:\devkitPro\hbl>make
    hblauncher_loader.c
    arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/hbl/build/hblauncher_loader.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/c/devkitPro/hbl/include -I/c/devkitPro/libctru/include -I/c/devkitPro/hbl/build -DARM11 -D_3DS -DVERSION=\"v1.0\" -c /c/devkitPro/hbl/source/hblauncher_loader.c -o hblauncher_loader.o
    c:/devkitPro/hbl/source/hblauncher_loader.c: In function 'gxlowcmd_4':
    c:/devkitPro/hbl/source/hblauncher_loader.c:29:2: warning: implicit declaration of function 'GX_SetTextureCopy' [-Wimplicit-function-declaration]
    GX_SetTextureCopy(NULL, inadr, width0 | (height0<<16), outadr, width1 | (height1<<16), size, flags);
    ^
    c:/devkitPro/hbl/source/hblauncher_loader.c: In function 'gsp_flushdcache':
    c:/devkitPro/hbl/source/hblauncher_loader.c:34:37: warning: passing argument 2 of 'GSPGPU_FlushDataCache' makes integer from pointer without a cast [-Wint-conversion]
    return GSPGPU_FlushDataCache(NULL, adr, size);
    ^
    In file included from c:/devkitPro/libctru/include/3ds/gfx.h:11:0,
    from c:/devkitPro/libctru/include/3ds.h:20,
    from c:/devkitPro/hbl/source/hblauncher_loader.c:7:
    c:/devkitPro/libctru/include/3ds/services/gspgpu.h:171:8: note: expected 'u32 {aka long unsigned int}' but argument is of type 'u8 * {aka unsigned char *}'
    Result GSPGPU_FlushDataCache(const void* adr, u32 size);
    ^
    c:/devkitPro/hbl/source/hblauncher_loader.c:34:9: error: too many arguments to function 'GSPGPU_FlushDataCache'
    return GSPGPU_FlushDataCache(NULL, adr, size);
    ^
    In file included from c:/devkitPro/libctru/include/3ds/gfx.h:11:0,
    from c:/devkitPro/libctru/include/3ds.h:20,
    from c:/devkitPro/hbl/source/hblauncher_loader.c:7:
    c:/devkitPro/libctru/include/3ds/services/gspgpu.h:171:8: note: declared here
    Result GSPGPU_FlushDataCache(const void* adr, u32 size);
    ^
    c:/devkitPro/hbl/source/hblauncher_loader.c: In function 'load_hblauncher':
    c:/devkitPro/hbl/source/hblauncher_loader.c:218:8: warning: implicit declaration of function 'initCfgu' [-Wimplicit-function-declaration]
    ret = initCfgu();
    ^
    c:/devkitPro/hbl/source/hblauncher_loader.c:236:2: warning: implicit declaration of function 'exitCfgu' [-Wimplicit-function-declaration]
    exitCfgu();
    ^
    c:/devkitPro/hbl/source/hblauncher_loader.c:238:2: error: too many arguments to function 'APT_CheckNew3DS'
    APT_CheckNew3DS(NULL, &new3dsflag);
    ^
    In file included from c:/devkitPro/libctru/include/3ds.h:31:0,
    from c:/devkitPro/hbl/source/hblauncher_loader.c:7:
    c:/devkitPro/libctru/include/3ds/services/apt.h:388:8: note: declared here
    Result APT_CheckNew3DS(u8 *out);
    ^
    make[1]: *** [hblauncher_loader.o] Error 1
    make: *** [build] Error 2



    Any idea on how to fix it?
     
  2. James310

    James310 GBAtemp Advanced Fan

    Member
    879
    319
    Oct 4, 2015
    United States
    Somewhere in California
    There's a reason there's a option to download the pre compiled version
     
  3. tobiobito
    OP

    tobiobito Member

    Newcomer
    41
    7
    Jan 4, 2016
    United States
    Can't edit the code of a pre compiled version ;)
     
  4. Substance12

    Substance12 GBAtemp Advanced Fan

    Member
    562
    419
    Aug 2, 2015
    Argentina
    Download the latest commit, it just got updated yesterday.
     
  5. tobiobito
    OP

    tobiobito Member

    Newcomer
    41
    7
    Jan 4, 2016
    United States
    Sorry I may be missing something what do you mean by latest commit?
     
  6. Substance12

    Substance12 GBAtemp Advanced Fan

    Member
    562
    419
    Aug 2, 2015
    Argentina
    https://github.com/yellows8/hblauncher_loader

    Just press "Download ZIP" and it will download the latest version to compile. Keep in mind you also need two more applications to be in the folder, makerom and bannertool, and this file renamed as "hblauncher_loader_logo-padded.lz11" in the Resources folder.

    https://github.com/yellows8/ctr-logobuilder/raw/master/prebuilt_homebrew_logo-padded.lz11

    You can get makerom from here:

    https://github.com/d0k3/3DS-Tools-Collection

    There was a compiled version of bannertool somewhere, i'll post it here when I find it.
     
  7. tobiobito
    OP

    tobiobito Member

    Newcomer
    41
    7
    Jan 4, 2016
    United States

    I have all that already. I get the errors when I am doing the make cmd still.
     
  8. Substance12

    Substance12 GBAtemp Advanced Fan

    Member
    562
    419
    Aug 2, 2015
    Argentina
    Then you're not using the latest version, it was updated yesterday to fix these bugs specifically... are you using the latest ctrulib as well?
     
  9. tobiobito
    OP

    tobiobito Member

    Newcomer
    41
    7
    Jan 4, 2016
    United States
    Wow I am dumb I literally just downloaded the older version of hblauncher. Thanks for the help :) Happen to know where I put the bannertool.exe
     
  10. Substance12

    Substance12 GBAtemp Advanced Fan

    Member
    562
    419
    Aug 2, 2015
    Argentina
    Yeah, same folder where the makefile is. Same as with the makerom. Are you on Windows?
     
  11. tobiobito
    OP

    tobiobito Member

    Newcomer
    41
    7
    Jan 4, 2016
    United States
    yes I am in windows.
     
  12. Substance12

    Substance12 GBAtemp Advanced Fan

    Member
    562
    419
    Aug 2, 2015
    Argentina
    Then you'll have to change a couple lines in the makefile. Where it says @makerom and @bannertool, change it to ../makerom.exe and ../bannertool.exe.
     
  13. tobiobito
    OP

    tobiobito Member

    Newcomer
    41
    7
    Jan 4, 2016
    United States
    ../Resources/hblauncher_loader.icn : $(APP_ICON)
    @bannertool makesmdh -i "$(APP_ICON)" -o "$@" -s "$(APP_TITLE)" -l "$(APP_TITLE)" -p "$(APP_AUTHOR)"

    ../Resources/hblauncher_loader.bnr : ../banner.png
    @bannertool makebanner -i "$<" -ca ../Resources/hblauncher_loader.cwav -o "$@"

    $(OUTPUT).cia : $(OUTPUT).elf ../Resources/hblauncher_loader.icn ../Resources/hblauncher_loader.bnr
    @makerom -f cia -o "$@" -elf $(OUTPUT).elf -rsf ../Resources/hblauncher_loader.rsf -icon ../Resources/hblauncher_loader.icn -banner ../Resources/hblauncher_loader.bnr

    so where am I suppose to put it?
     
  14. Substance12

    Substance12 GBAtemp Advanced Fan

    Member
    562
    419
    Aug 2, 2015
    Argentina
    Change it to:

    Code:
    ../Resources/hblauncher_loader.icn : $(APP_ICON)
    ../bannertool.exe makesmdh -i "$(APP_ICON)" -o "$@" -s "$(APP_TITLE)" -l "$(APP_TITLE)" -p "$(APP_AUTHOR)"
    
    ../Resources/hblauncher_loader.bnr : ../banner.png
    ../bannertool.exe makebanner -i "$<" -ca ../Resources/hblauncher_loader.cwav -o "$@"
    
    $(OUTPUT).cia : $(OUTPUT).elf ../Resources/hblauncher_loader.icn ../Resources/hblauncher_loader.bnr
    ../makerom.exe -f cia -o "$@" -elf $(OUTPUT).elf -rsf ../Resources/hblauncher_loader.rsf -icon ../Resources/hblauncher_loader.icn -banner ../Resources/hblauncher_loader.bnr
    Make sure you have bannertool and makerom in the same folder where the makefile is.
     
  15. tobiobito
    OP

    tobiobito Member

    Newcomer
    41
    7
    Jan 4, 2016
    United States
    Great! I was able to get it to compile. I did have to a tab before the ../ due to makefile formats though. Thanks for the help! :D
     
    Substance12 likes this.
  16. subcon959

    subcon959 teh retro

    Member
    769
    470
    Dec 24, 2008
    Is it not more convenient to just put them in the msys/bin folder or whatevers in your path already?
     
  17. Rohul1997

    Rohul1997 GBAtemp Fan

    Member
    347
    345
    Dec 7, 2015
    Giant Chasm
    If this should be useful to anyone, I had that same problem but after updating ctrulib it worked perfectly.