Homebrew How to install Ctrulib? (Linux)

  • Thread starter Thread starter Monado_III
  • Start date Start date
  • Views Views 5,846
  • Replies Replies 14

Monado_III

Well-Known Member
Member
Joined
Feb 8, 2015
Messages
722
Reaction score
435
Trophies
1
Location
/dev/null
XP
1,495
Country
Canada
So I've done this tutorial http://devkitpro.org/wiki/Getting_Started/devkitARM (including the last line at the bottom) and followed the README.md that comes with Ctrulib but still, whenever I try to compile one of the ctrulib examples it still gives me an error ( fatal error: 3ds.h: No such file or directory ), everything should be set up correctly and in the right place but that error keeps happening. (I'm using gcc to compile and am not using an IDE or anything, just a txt editor). Any ideas on what I'm doing wrong? Any help is appreciated.
 
You need to add the following lines to your .bashrc file (it's a hidden file in your home folder):
Code:
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=$DEVKITPRO/devkitARM
then log out or reboot to apply the changes.

Alternatively, you can enter them into the terminal before compiling.
 
I wouldn't install it with that tutorial, but with the automated perl script and in my home directory instead of /opt.
But, since you seem to do it that way, didn't you notice that nowhere in the tutorial is explained how to install ctrulib?
EDIT: Also, ctrulib's README.md doesn't explain how to install it.

Well, to install it, either:
  • Clone the github repo (https://github.com/smealum/ctrulib), go to that directory, run "make" and then "sudo make install".
  • Download it from here, and install it the same way as libnds (in a folder named "libctru").
 
I wouldn't install it with that tutorial, but with the automated perl script and in my home directory instead of /opt.
But, since you seem to do it that way, didn't you notice that nowhere in the tutorial is explained how to install ctrulib?
EDIT: Also, ctrulib's README.md doesn't explain how to install it.

Well, to install it, either:
  • Clone the github repo (https://github.com/smealum/ctrulib), go to that directory, run "make" and then "sudo make install".
  • Download it from here, and install it the same way as libnds (in a folder named "libctru").
Trying to do that, but when I run make I get:
Makefile:10: EVKITPRO/devkitARM/base_rules: No such file or directory
make: *** No rule to make target 'EVKITPRO/devkitARM/base_rules'. Stop.
Here's a copy of the makefile: (with a txt extension so gbatemp will allow me to upload it)
 

Attachments

Start over, but this time follow this tutorial.
(just enter those commands into a terminal, one by one)

When I got down to make it gives me this error:

sdmc_dev.c
arm-none-eabi-gcc -MMD -MP -MF /opt/devkitpro/ctrulib/libctru/build/sdmc_dev.d -g -Wall -O2 -mword-relocations -fno-strict-aliasing -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/opt/devkitpro/ctrulib/libctru/include -I/opt/devkitpro/ctrulib/libctru/build -DARM11 -D_3DS -c /opt/devkitpro/ctrulib/libctru/source/sdmc_dev.c -o sdmc_dev.o
/opt/devkitpro/ctrulib/libctru/source/sdmc_dev.c:95:3: error: unknown field 'rmdir_r' specified in initializer
.rmdir_r = sdmc_rmdir,
^
/opt/devkitpro/ctrulib/libctru/source/sdmc_dev.c:95:3: warning: excess elements in struct initializer
/opt/devkitpro/ctrulib/libctru/source/sdmc_dev.c:95:3: warning: (near initialization for 'sdmc_devoptab')
/opt/devkitpro/devkitARM/base_rules:85: recipe for target 'sdmc_dev.o' failed
make[1]: *** [sdmc_dev.o] Error 1
Makefile:126: recipe for target 'build' failed
make: *** [build] Error 2

(I started from scratch)
 
When I got down to make it gives me this error:

sdmc_dev.c
arm-none-eabi-gcc -MMD -MP -MF /opt/devkitpro/ctrulib/libctru/build/sdmc_dev.d -g -Wall -O2 -mword-relocations -fno-strict-aliasing -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/opt/devkitpro/ctrulib/libctru/include -I/opt/devkitpro/ctrulib/libctru/build -DARM11 -D_3DS -c /opt/devkitpro/ctrulib/libctru/source/sdmc_dev.c -o sdmc_dev.o
/opt/devkitpro/ctrulib/libctru/source/sdmc_dev.c:95:3: error: unknown field 'rmdir_r' specified in initializer
.rmdir_r = sdmc_rmdir,
^
/opt/devkitpro/ctrulib/libctru/source/sdmc_dev.c:95:3: warning: excess elements in struct initializer
/opt/devkitpro/ctrulib/libctru/source/sdmc_dev.c:95:3: warning: (near initialization for 'sdmc_devoptab')
/opt/devkitpro/devkitARM/base_rules:85: recipe for target 'sdmc_dev.o' failed
make[1]: *** [sdmc_dev.o] Error 1
Makefile:126: recipe for target 'build' failed
make: *** [build] Error 2

(I started from scratch)
Which example are you trying to compile exactly?
 
none, that was when I did the make command. I was following the tutorial you linked.
It worked for me (just tried), maybe you didn't really start from scratch...
Make sure to remove the entire /opt/devkitpro folder, then try again.
Code:
sudo rm -r /opt/devkitpro
 
It worked for me (just tried), maybe you didn't really start from scratch...
Make sure to remove the entire /opt/devkitpro folder, then try again.
Code:
sudo rm -r /opt/devkitpro

and........ sourceforge is down for me. can't connect via 2 different routers, 2 web browsers or via terminal :(
 
Trying to do that, but when I run make I get:
Makefile:10: EVKITPRO/devkitARM/base_rules: No such file or directory
make: *** No rule to make target 'EVKITPRO/devkitARM/base_rules'. Stop.
Here's a copy of the makefile: (with a txt extension so gbatemp will allow me to upload it)

Why did you edit the Makefile?
Either way, if you really want to edit the makefile instead of just exporting the environment variables, use $(VARIABLENAME) instead of $VARIABLENAME. Makefiles aren't shell scripts.
 

Site & Scene News

Popular threads in this forum