Ctrulib compiling error

Discussion in '3DS - Homebrew Development and Emulators' started by kprovost7314, Feb 4, 2017.

  1. kprovost7314
    OP

    kprovost7314 GBAtemp's Official Bara Master

    Member
    1,688
    883
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    So I decided to started working on 3DS homebrew again, and after a long hiatus I'm greeted with the following error when I compile the newest ctrulib:

    Code:
    (path)/libctru/source/console.c:467:2: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
      con_write,
      ^
    (path)/libctru/source/console.c:467:2: note: (near initialization for 'dotab_stdout.write_r') c:/Users/Kaleb/Desktop/ctrulib-master/libctru/source/console.c:485:2: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
      debug_write,
      ^
    (path)/libctru/source/console.c:485:2: note: (near initialization for 'dotab_3dmoo.write_r')
    cc1.exe: all warnings being treated as errors
    make[1]: *** [console.o] Error 1
    make: *** [build] Error 2
    Any fix for this?
     
  2. rtur

    rtur Member

    Newcomer
    19
    2
    Jan 19, 2017
    Dirty fix: You could go edit the Makefile, and remove the -Werror flags
     
  3. kprovost7314
    OP

    kprovost7314 GBAtemp's Official Bara Master

    Member
    1,688
    883
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    @rtur Removed -Werror and now I get:

    Code:
    In file included from (path)/libctru/source/services/soc/soc_select.c:5:0:
    (path)/libctru/include/sys/select.h:1:29: fatal error: sys/select.h: No such file or directory
    compilation terminated.
    make[1]: *** [soc_select.o] Error 1
    make: *** [build] Error 2
     
  4. Rusb

    Rusb GBAtemp Regular

    Member
    136
    55
    Apr 17, 2014
    sys/select.h: No such file or directory <- check if the file really exists in the directory and if in the makefile you are including that folder
     
  5. kprovost7314
    OP

    kprovost7314 GBAtemp's Official Bara Master

    Member
    1,688
    883
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    Yes it exists and the makefile only includes the include folder
     
  6. rtur

    rtur Member

    Newcomer
    19
    2
    Jan 19, 2017
  7. kprovost7314
    OP

    kprovost7314 GBAtemp's Official Bara Master

    Member
    1,688
    883
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
  8. rtur

    rtur Member

    Newcomer
    19
    2
    Jan 19, 2017
    I've just cloned the repo and gave it a try, it works fine on my laptop (I'm running linux though)

    — Posts automatically merged - Please don't double post! —

    my gcc version
    Code:
    arm-none-eabi-gcc (devkitARM release 46) 6.3.0
    
    when I compile, commands look like these, compare with yours to see if something different strikes you
    Code:
    arm-none-eabi-gcc -MMD -MP -MF /home/rtur/devel/nintendo/3ds/ctrulib/libctru/build/ctru_exit.d -g -Wall -Werror -O2 -mword-relocations -ffunction-sections -fomit-frame-pointer -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/home/rtur/devel/nintendo/3ds/ctrulib/libctru/include  -I/home/rtur/devel/nintendo/3ds/ctrulib/libctru/build -DARM11 -D_3DS -c <input_file> -o <output_file>
    
     
  9. kprovost7314
    OP

    kprovost7314 GBAtemp's Official Bara Master

    Member
    1,688
    883
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    I got it to compile after updating devkitARM. Thanks!
     
    rtur likes this.