Homebrew Ctrulib compiling error

kprovost7314

GBAtemp's Official Shota and Bara Master
OP
Member
Joined
Dec 24, 2014
Messages
1,992
Trophies
1
Age
19
Location
Somewhere, nowhere
XP
2,007
Country
United States
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?
 

kprovost7314

GBAtemp's Official Shota and Bara Master
OP
Member
Joined
Dec 24, 2014
Messages
1,992
Trophies
1
Age
19
Location
Somewhere, nowhere
XP
2,007
Country
United States
@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
 

Rusb

Well-Known Member
Member
Joined
Apr 17, 2014
Messages
176
Trophies
0
XP
873
Country
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
 

rtur

Member
Newcomer
Joined
Jan 19, 2017
Messages
20
Trophies
0
Age
121
XP
56
Country
I've just cloned the repo and gave it a try, it works fine on my laptop (I'm running linux though)

--------------------- MERGED ---------------------------

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>
 

kprovost7314

GBAtemp's Official Shota and Bara Master
OP
Member
Joined
Dec 24, 2014
Messages
1,992
Trophies
1
Age
19
Location
Somewhere, nowhere
XP
2,007
Country
United States
I've just cloned the repo and gave it a try, it works fine on my laptop (I'm running linux though)

--------------------- MERGED ---------------------------

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>
I got it to compile after updating devkitARM. Thanks!
 
  • Like
Reactions: rtur
General chit-chat
Help Users
    Coto @ Coto: the best way to cope with life is to get a life