Homebrew [HELP] Problem with 'make' & 'make install' in ctrulib/libctru!

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
I was installing devkitARM and ctrulib to my linuxbox via the references found on 3dbrew, and I ran into a bump in my last two commands. I will leave the url of the page, the error code, and a picture for reference.

URL:
http://3dbrew.org/wiki/Setting_up_Development_Environment

Code:
Code:
root@bbnorman-Veriton-M460:~/devkitPro/ctrulib/libctru# make
Makefile:9: /opt/devkitpro/devkitARM/base_rules: No such file or directory
make: *** No rule to make target `/opt/devkitpro/devkitARM/base_rules'.  Stop.
root@bbnorman-Veriton-M460:~/devkitPro/ctrulib/libctru# make install
Makefile:9: /opt/devkitpro/devkitARM/base_rules: No such file or directory
make: *** No rule to make target `/opt/devkitpro/devkitARM/base_rules'.  Stop.
root@bbnorman-Veriton-M460:~/devkitPro/ctrulib/libctru#

Picture:


I was hoping that maybe smealum could help me, but any help would be immensely appreciated!
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,721
Trophies
2
XP
8,471
Country
Tuvalu
ha, that's like saying i have a problem with my pc, i want bill gates to help me. (you get the idea)
i'm sure smealum has better things to do then to help you with this, no offense :) many people would be able to sort it out.
i set it up on my mac myself, i don't see there was a guide on 3dbrew, that's helpful though. did you follow every step?
 

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
ha, that's like saying i have a problem with my pc, i want bill gates to help me. (you get the idea)
i'm sure smealum has better things to do then to help you with this, no offense :) many people would be able to sort it out.
i set it up on my mac myself, i don't see there was a guide on 3dbrew, that's helpful though. did you follow every step?

I was talking with him earlier, so I was hopeful he was still in a talkative mood, kek. I know what you mean, though.

As for following 'each step', I followed the directions for the from the link below. from there, I followed from 'git close https://github.com/smealum/ctrulib.git'. All the link below did was explain things a bit more. The updater perl simply downloaded all the files I needed, but I moved them all to the places they needed to be, and unpacked the tarballs.

http://devkitpro.org/wiki/Getting_Started/devkitARM
 
  • Like
Reactions: cearp

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,721
Trophies
2
XP
8,471
Country
Tuvalu
hmm, on mac i just copied the devkit arm stuff to a folder, set the bin folder inside that to be looked in (put it in my path etc), and really that is all i did.
basically it looks like it can't see your files in the path (at least to me) "/opt/devkitpro/devkitARM/base_rules: No such file or directory"
maybe you set up the path wrong? like, set it up to the wrong folder? something cannot be found/something is looking in the wrong place :)
 

yusuo

Well-Known Member
Member
Joined
Oct 19, 2006
Messages
3,498
Trophies
2
Age
38
XP
6,120
Country
United Kingdom
Dude by the look of things you don't have make, easy just install build essentials from synaptic. Or use this command (assuming you're using a debian based distro like Ubuntu) from terminal "sudo apt-get install build-essential"

Remember to update your repos first" sudo apt-get update"
 

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
Dude by the look of things you don't have make, easy just install build essentials from synaptic. Or use this command (assuming you're using a debian based distro like Ubuntu) from terminal "sudo apt-get install build-essential"

Remember to update your repos first" sudo apt-get update"

It seems I already build essentials. I've used make before, so I have no clue why it isn't working.

Code:
bbnorman@bbnorman-Veriton-M460:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree     
Reading state information... Done
build-essential is already the newest version.
The following packages were automatically installed and are no longer required:
  libswt-cairo-gtk-3-jni libswt-webkit-gtk-3-jni libswt-gnome-gtk-3-jni
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 240 not upgraded.
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/restricted i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages)
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_main_binary-i386_Packages)
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/multiverse i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_multiverse_binary-i386_Packages)
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/universe i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_universe_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

hmm, on mac i just copied the devkit arm stuff to a folder, set the bin folder inside that to be looked in (put it in my path etc), and really that is all i did.
basically it looks like it can't see your files in the path (at least to me) "/opt/devkitpro/devkitARM/base_rules: No such file or directory"
maybe you set up the path wrong? like, set it up to the wrong folder? something cannot be found/something is looking in the wrong place :)

I think I will try to redo everything tonight, I suppose.
 

MeisterFenster

Well-Known Member
Member
Joined
Nov 18, 2014
Messages
168
Trophies
0
Age
28
XP
165
Country
Gambia, The
I think you have to put the libctru in the devkitPro folder and not in a sub directory like ctrulib. Have you installed devkitARM manually or did you ran the script? The script worked fine for me with OSX.
 

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
I ran the script, and it created the correct folder architecture, but it was in ~/home, not /opt like in the code. I moved all of it there, and now when I use the make command, it tells me that I haven't set DEVKITARM in my environment. Any clue?

Code:
bbnorman@bbnorman-Veriton-M460:~$ cd /opt/devkitPro/ctrulib/libctru
bbnorman@bbnorman-Veriton-M460:/opt/devkitPro/ctrulib/libctru$ sudo make
Makefile:6: *** "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM".  Stop.

Edit: I opened my /.bashrc with gedit, and I added these two lines to the bottom, and they correctly point to my devkitARM.

Code:
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=$DEVKITPRO/devkitARM

Should I adding anything to that? I honestly don't understand why this isn't working correctly. Everything seems to be in place, yet I get this code in return.

Code:
bbnorman@bbnorman-Veriton-M460:~$ cd /opt/devkitPro/ctrulib/libctru
bbnorman@bbnorman-Veriton-M460:/opt/devkitPro/ctrulib/libctru$ sudo make
Makefile:6: *** "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM".  Stop.
 

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
Bumping to close thread.

I realized that the make command doesn't allow you to sudo it every time, so I switched into root user with sudo -s, and it seemed to work. I am going to delete the whole folder, and retry everything tomorrow in case I messed anything up. Thanks for all the help, guys!
 

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
you need to sudo? don't close this it until you have it all working, let us know tomorrow :)

I really dislike using sudo -s to give myself full privilege, so I was sudo-ing my make because the makefile is in /opt/. /opt/ is a system folder, so you need root privilege. For some reason, make doesn't play well with sudo in front of it, even though it would give the command the same permission as if I were to put myself in sudo -s. It's really strange, honestly.

Now, is this supposed to output some sort of IDE? If not, I'm unsure how I'm supposed to compile my code as .3DSX. This is the first time I've programmed anything outside of the computer zone. I prefer gedit alone, and compiling with my terminal, so that would definitely be optimal. It seems there isn't much good documentation of all of this. Can I compile .cpp files through terminal as .3DSX files as I would normal executables?
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,721
Trophies
2
XP
8,471
Country
Tuvalu
i have only worked with some launcher.dat homebrew, not the nice library smea made - but, sure, write the code in whatever you want it, make via the terminal.
it doesn't output an ide.
i don't want to give you wrong advice, so i can't help so much, sorry :( if you are on mac i would be a lot more confident, but i'm not too sure about the differences on your linux.
homebrew stuff won't have much documentation, it's not like there is a nice msdn site for it or something :)
just learn by looking at other people's code.
i'm not sure if you can use c++ with 3ds homebrew, i have only used c so far. - but i think i saw somewhere that c++ is possible. :)
 

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
i have only worked with some launcher.dat homebrew, not the nice library smea made - but, sure, write the code in whatever you want it, make via the terminal.
it doesn't output an ide.
i don't want to give you wrong advice, so i can't help so much, sorry :( if you are on mac i would be a lot more confident, but i'm not too sure about the differences on your linux.
homebrew stuff won't have much documentation, it's not like there is a nice msdn site for it or something :)
just learn by looking at other people's code.
i'm not sure if you can use c++ with 3ds homebrew, i have only used c so far. - but i think i saw somewhere that c++ is possible. :)

Always up for learning new languages.

I'm sure our commands are at least a bit similar. How have you been compiling your apps?
 

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
sure they are very similar, i'm just using a makefile (that i found online, i took it from a project in github)

Link? Your help is very much appreciated. I did just grab the template from here:
https://github.com/xem/3DShomebrew/wiki/III-Homebrew-development

Edit: I just used the template, tried to compile the first little source, got no build folder as it promised. I downloaded Staplebutter's source, attempted to compile, and got a new error. Hopefully the clean install tomorrow fixes this.

Edit again: Can you give me a link/upload your /aemstro_as.py file? It seems to be the only thing stopping me as of this moment. I found it, but where do I put it? Found the whole folder on Smea's git, and I placed it into the devkitPro folder, yet I'm still getting this error?

Code:
bbnorman@bbnorman-Veriton-M460:~/Downloads/blargSnes-master$ make                     
final.vsh
python /aemstro_as.py /home/bbnorman/Downloads/blargSnes-master/data/final.vsh ../final.vsh.shbin
python: can't open file '/aemstro_as.py': [Errno 2] No such file or directory
make[1]: *** [final.vsh.o] Error 2
make: *** [build] Error 2
 

Slushie3DS

Cold Beverage Lover
OP
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
I just set up the devkit via the tutorial for Linux found here: http://3dbrew.org/wiki/Setting_up_Development_Environment

Everything went perfectly, and there was no errors at all. Yet, when I tried to compile the template source with the 'make' command, I kept getting the error below. It made a 'build' folder for which my output files should store, but no output files appear. This is beyond frustrating, and I hope one of you can help me.

Code:
bbnorman@bbnorman-Veriton-M460:~/Documents/3DS/template$ make
main.c
arm-none-eabi-gcc -MMD -MP -MF /home/bbnorman/Documents/3DS/template/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softfp -I/home/bbnorman/Documents/3DS/template/include -I/opt/devkitpro/libctru/include -I/home/bbnorman/Documents/3DS/template/build -DARM11 -D_3DS -c /home/bbnorman/Documents/3DS/template/source/main.c -o main.o
/home/bbnorman/Documents/3DS/template/source/main.c: In function 'main':
/home/bbnorman/Documents/3DS/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:14:0,
                from /home/bbnorman/Documents/3DS/template/source/main.c:3:
/opt/devkitpro/libctru/include/3ds/gfx.h:23:6: note: declared here
void gfxInit(GSP_FramebufferFormats topFormat, GSP_FramebufferFormats bottomFormat, bool vrambuffers);
      ^
/home/bbnorman/Documents/3DS/template/source/main.c:15:7: warning: variable 'kUp' set but not used [-Wunused-but-set-variable]
  u32 kUp;          // keys up
      ^
/home/bbnorman/Documents/3DS/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
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,207
Trophies
4
Location
Space
XP
13,732
Country
Norway
I just set up the devkit via the tutorial for Linux found here: http://3dbrew.org/wiki/Setting_up_Development_Environment

Everything went perfectly, and there was no errors at all. Yet, when I tried to compile the template source with the 'make' command, I kept getting the error below. It made a 'build' folder for which my output files should store, but no output files appear. This is beyond frustrating, and I hope one of you can help me.

Code:
bbnorman@bbnorman-Veriton-M460:~/Documents/3DS/template$ make
main.c
arm-none-eabi-gcc -MMD -MP -MF /home/bbnorman/Documents/3DS/template/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softfp -I/home/bbnorman/Documents/3DS/template/include -I/opt/devkitpro/libctru/include -I/home/bbnorman/Documents/3DS/template/build -DARM11 -D_3DS -c /home/bbnorman/Documents/3DS/template/source/main.c -o main.o
/home/bbnorman/Documents/3DS/template/source/main.c: In function 'main':
/home/bbnorman/Documents/3DS/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:14:0,
                from /home/bbnorman/Documents/3DS/template/source/main.c:3:
/opt/devkitpro/libctru/include/3ds/gfx.h:23:6: note: declared here
void gfxInit(GSP_FramebufferFormats topFormat, GSP_FramebufferFormats bottomFormat, bool vrambuffers);
      ^
/home/bbnorman/Documents/3DS/template/source/main.c:15:7: warning: variable 'kUp' set but not used [-Wunused-but-set-variable]
  u32 kUp;          // keys up
      ^
/home/bbnorman/Documents/3DS/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
Looks like that template is a bit out of date and won't work with your version of ctrulib.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    LeoTCK @ LeoTCK: im going off now...I'll turn off my brain