Homebrew devkitPro/devkitARM help!

Megalegacy98

Well-Known Member
OP
Member
Joined
Aug 11, 2015
Messages
505
Trophies
0
Location
United States
XP
430
Country
United States
Hey guys, I finally decided to go into C homebrew programming. I'm trying to get set up. I'm using this: http://3dbrew.org/wiki/Setting_up_Development_Environment to set up my environment and https://github.com/xem/3DShomebrew/wiki/ to get started. I get up to about here:
http://bit.ly/1lZs4SW (sorry for using URL shortener, link didn't work without it for some reason)
before getting stuck. I'm trying to build the app, but when I try to, I get this error:
Code:
make: *** No rule to make target `/devkitARM/3ds_rules'.  Stop.
I'm using Ubuntu 14.04 LTS. I can't find the answer to my question anywhere, so can anyone tell me what I'm doing wrong? Thanks.
 
Last edited by Megalegacy98,

apprentice57

Member
Newcomer
Joined
Jul 8, 2007
Messages
15
Trophies
1
XP
260
Country
United States
Funny, I was having the same exact problem (same OS even) a week ago. I would be curious as to the answer as well, as I did not find out a solution!

In the realm of ideas, its either files missing there (in a 3ds_rules folder) or a missing reference to that folder somewhere on the machine, I expect. I'm sure users here will know more.

Funny enough, I ended up just using my windows machine since I just needed to make one small change to EmuNAND9. Installation on windows is trivial, as you just have to run the exe the wiki links to. Everything is set up automatically (also, it adds the make command to the windows command prompt for you... very nice). Definitely not a good idea for serious development though, Windows is a bit of a pain normally.
 

Slashcash

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
338
Trophies
0
XP
611
Country
Italy
The problem can be anywhere in your enviroment so it's hard to troubleshoot. Maybe you don't have your enviromental variables set up correctly.

Have you tried to add this at the very start of the Makefile you're trying to compile?
Code:
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=/opt/devkitpro/devkitARM
 

Megalegacy98

Well-Known Member
OP
Member
Joined
Aug 11, 2015
Messages
505
Trophies
0
Location
United States
XP
430
Country
United States
The problem can be anywhere in your enviroment so it's hard to troubleshoot. Maybe you don't have your enviromental variables set up correctly.

Have you tried to add this at the very start of the Makefile you're trying to compile?
Code:
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=/opt/devkitpro/devkitARM
That helped, thanks, but now i get this error:
Code:
main.c
arm-none-eabi-gcc -MMD -MP -MF /home/dylan/Desktop/template/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softfp -I/home/dylan/Desktop/template/include -I/opt/devkitpro/libctru/include -I/home/dylan/Desktop/template/build -DARM11 -D_3DS -c /home/dylan/Desktop/template/source/main.c -o main.o
/home/dylan/Desktop/template/source/main.c: In function 'main':
/home/dylan/Desktop/template/source/main.c:10:3: error: too many arguments to function 'hidInit'
  hidInit(NULL);  // input
  ^
In file included from /opt/devkitpro/libctru/include/3ds.h:40:0,
  from /home/dylan/Desktop/template/source/main.c:3:
/opt/devkitpro/libctru/include/3ds/services/hid.h:89:8: note: declared here
 Result hidInit(void);
  ^
/home/dylan/Desktop/template/source/main.c:11:3: error: too few arguments to function 'gfxInit'
  gfxInit();  // graphics
  ^
In file included from /opt/devkitpro/libctru/include/3ds.h:20:0,
  from /home/dylan/Desktop/template/source/main.c:3:
/opt/devkitpro/libctru/include/3ds/gfx.h:66:6: note: declared here
 void gfxInit(GSPGPU_FramebufferFormats topFormat, GSPGPU_FramebufferFormats bot
  ^
/home/dylan/Desktop/template/source/main.c:15:7: warning: variable 'kUp' set but not used [-Wunused-but-set-variable]
  u32 kUp;  // keys up
  ^
/home/dylan/Desktop/template/source/main.c:14:7: warning: variable 'kHeld' set but not used [-Wunused-but-set-variable]
  u32 kHeld;  // keys pressed
  ^
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
That helped, thanks, but now i get this error:
Code:
main.c
arm-none-eabi-gcc -MMD -MP -MF /home/dylan/Desktop/template/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softfp -I/home/dylan/Desktop/template/include -I/opt/devkitpro/libctru/include -I/home/dylan/Desktop/template/build -DARM11 -D_3DS -c /home/dylan/Desktop/template/source/main.c -o main.o
/home/dylan/Desktop/template/source/main.c: In function 'main':
/home/dylan/Desktop/template/source/main.c:10:3: error: too many arguments to function 'hidInit'
  hidInit(NULL);  // input
  ^
In file included from /opt/devkitpro/libctru/include/3ds.h:40:0,
  from /home/dylan/Desktop/template/source/main.c:3:
/opt/devkitpro/libctru/include/3ds/services/hid.h:89:8: note: declared here
Result hidInit(void);
  ^
/home/dylan/Desktop/template/source/main.c:11:3: error: too few arguments to function 'gfxInit'
  gfxInit();  // graphics
  ^
In file included from /opt/devkitpro/libctru/include/3ds.h:20:0,
  from /home/dylan/Desktop/template/source/main.c:3:
/opt/devkitpro/libctru/include/3ds/gfx.h:66:6: note: declared here
void gfxInit(GSPGPU_FramebufferFormats topFormat, GSPGPU_FramebufferFormats bot
  ^
/home/dylan/Desktop/template/source/main.c:15:7: warning: variable 'kUp' set but not used [-Wunused-but-set-variable]
  u32 kUp;  // keys up
  ^
/home/dylan/Desktop/template/source/main.c:14:7: warning: variable 'kHeld' set but not used [-Wunused-but-set-variable]
  u32 kHeld;  // keys pressed
  ^
make[1]: *** [main.o] Error 1
make: *** [build] Error 2

That code is probably based on an outdated ctrulib. You'll have to fix it. For hidInit, just remove the NULL between the parenthesis, it doesn't require any arguments now. As for gfxInit, just change it to gfxInitDefault if you don't plan on changing any graphics options. Warnings can be "ignored" (but it's not good practice, they're there to help you fix potential mistakes, or to remind you to use/delete variables that aren't used). Know that even if you fix compilation, it won't necessarily work correctly after that; ancient homebrew like Smea's portal or minecraft can be fixed to compile, but they might not display graphics correctly with the various major overhauls ctrulib has had over the last year.
 
Last edited by daxtsu,

Slashcash

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
338
Trophies
0
XP
611
Country
Italy
That helped, thanks, but now i get this error:
Code:
main.c
arm-none-eabi-gcc -MMD -MP -MF /home/dylan/Desktop/template/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softfp -I/home/dylan/Desktop/template/include -I/opt/devkitpro/libctru/include -I/home/dylan/Desktop/template/build -DARM11 -D_3DS -c /home/dylan/Desktop/template/source/main.c -o main.o
/home/dylan/Desktop/template/source/main.c: In function 'main':
/home/dylan/Desktop/template/source/main.c:10:3: error: too many arguments to function 'hidInit'
  hidInit(NULL);  // input
  ^
In file included from /opt/devkitpro/libctru/include/3ds.h:40:0,
  from /home/dylan/Desktop/template/source/main.c:3:
/opt/devkitpro/libctru/include/3ds/services/hid.h:89:8: note: declared here
Result hidInit(void);
  ^
/home/dylan/Desktop/template/source/main.c:11:3: error: too few arguments to function 'gfxInit'
  gfxInit();  // graphics
  ^
In file included from /opt/devkitpro/libctru/include/3ds.h:20:0,
  from /home/dylan/Desktop/template/source/main.c:3:
/opt/devkitpro/libctru/include/3ds/gfx.h:66:6: note: declared here
void gfxInit(GSPGPU_FramebufferFormats topFormat, GSPGPU_FramebufferFormats bot
  ^
/home/dylan/Desktop/template/source/main.c:15:7: warning: variable 'kUp' set but not used [-Wunused-but-set-variable]
  u32 kUp;  // keys up
  ^
/home/dylan/Desktop/template/source/main.c:14:7: warning: variable 'kHeld' set but not used [-Wunused-but-set-variable]
  u32 kHeld;  // keys pressed
  ^
make[1]: *** [main.o] Error 1
make: *** [build] Error 2

You are having two compiler errors and two warnings. Are you trying to compile an example or code written by yourself? The errors are pretty obvious, just read what the compiler is saying. ;)
 

Megalegacy98

Well-Known Member
OP
Member
Joined
Aug 11, 2015
Messages
505
Trophies
0
Location
United States
XP
430
Country
United States
I have another problem, I'm trying to install libsf2d i get this error:
Code:
make[1]: `/home/dylan/sf2dlib-master/libsf2d/lib/libsf2d.a' is up to date.
cp: cannot create regular file ‘/opt/devkitpro/libctru/lib/libsf2d.a’: Permission denied
make: *** [install] Error 1
How do I make it have elevated privileges so it can install? I'm fairly new to Ubuntu...
 

Slashcash

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
338
Trophies
0
XP
611
Country
Italy
Hope you already figured it out by yourself, anyway a

Code:
sudo make

and then a

Code:
sudo make install

Should be able to compile and install correctly. Of course you can set up the access/write permission to that folder with the chmod command (just read the linux documentation for that) but i don't think giving write permissions to /opt to a standard user is a good thing to do anyway
 
Last edited by Slashcash,

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
You don't need to sudo it if you make the devkitPro folder writable / make it yours.

Make devkitPro read/write/executable:
Bash:
sudo chmod -r 777 /opt/devkitPro
Make devkitPro folder yours:
Bash:
sudo chown -R yourusername:yourusername /opt/devkitPro
 
Last edited by Sono,

Slashcash

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
338
Trophies
0
XP
611
Country
Italy
No, no sudo!
chmod -r 777 /opt/devkitPro

Don't want to start a religious war here but giving a 777 permission to a folder in /opt seems a bad idea to me, of course nothing will happen in this particular case. I don't know if it's worse than gaining sudo access but probably not even better
 
Last edited by Slashcash,

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
Don't want to start a religious war here but giving a 777 permission to a folder in /opt seems a bad idea to me, of course nothing will happen in this particular case. I don't know if it's worse than gaining sudo access but probably not even better

Sorry, I was a bit dumb and offensive. It's only giving 777 to everything in the /opt/devkitPro, the /opt itself is unaffected. And you'll need to sudo the chmod command anyways, because it's owned by root, so a recursive chown on the devkitPro folder won't hurt either :P
 

Slashcash

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
338
Trophies
0
XP
611
Country
Italy
Sorry, I was a bit dumb and offensive. It's only giving 777 to everything in the /opt/devkitPro, the /opt itself is unaffected. And you'll need to sudo the chmod command anyways, because it's owned by root, so a recursive chown on the devkitPro folder won't hurt either :P

Yes, you are right. But let's say that an infamous hacker which is against 3ds homebrew wants to stop homebrew development: he could step in our own house late night, login as a guest user to our linux machines and delete all our 777 /opt/devkitpro folder. :D Just joking anyway.

[EDIT]Oh my god he doesn't even need to break into our houses. He could connect to our local wireless network from outside the door and ssh the delete command on our machines O_O

[EDIT2]Of course my wireless network is encrypted and ssh disabled for everyone who is in fear of my security
 
Last edited by Slashcash,

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
Yes, you are right. But let's say that an infamous hacker which is against 3ds homebrew wants to stop homebrew development: he could step in our own house late night, login as a guest user to our linux machines and delete all our 777 /opt/devkitpro folder. :D Just joking anyway.

Or you could just get rid of the graphical login, and use the big fullscreen terminal to login + startx :P

I have another problem, I'm trying to install libsf2d i get this error:
Code:
make[1]: `/home/dylan/sf2dlib-master/libsf2d/lib/libsf2d.a' is up to date.
cp: cannot create regular file ‘/opt/devkitpro/libctru/lib/libsf2d.a’: Permission denied
make: *** [install] Error 1
How do I make it have elevated privileges so it can install? I'm fairly new to Ubuntu...

You don't even need to install sf2d, if you edit 2 lines in your makefile, you could even bundle libsf2d.a with its includes with your project, so others can build it easier :D

Edit:
https://github.com/MarcuzD/MM/blob/gpurender/Makefile
I suggest that you edit this Makefile if you need a portable sf2d in your project. For some reason git didn't push the libsf2d.a file, but copy libsf2d.a to <projectroot>/extlib/lib/libsf2d.a
 
Last edited by Sono,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: @SylverReZ, Indeed lol