devkitPro/devkitARM help!

Discussion in '3DS - Homebrew Development and Emulators' started by Megalegacy98, Jan 29, 2016.

  1. Megalegacy98
    OP

    Megalegacy98 ( ͡° ͜ʖ ͡°)™

    Member
    505
    259
    Aug 11, 2015
    United States
    Just around the corner™
    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, Jan 29, 2016
  2. apprentice57

    apprentice57 Newbie

    Newcomer
    9
    6
    Jul 8, 2007
    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.
     
  3. Slashcash

    Slashcash GBAtemp Fan

    Member
    334
    461
    Oct 15, 2015
    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
    
     
  4. Megalegacy98
    OP

    Megalegacy98 ( ͡° ͜ʖ ͡°)™

    Member
    505
    259
    Aug 11, 2015
    United States
    Just around the corner™
    That helped, thanks, but now i get this error:
    Warning: Spoilers inside!
     
  5. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,546
    3,953
    Jun 9, 2007
    Antarctica
    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, Jan 29, 2016
  6. Slashcash

    Slashcash GBAtemp Fan

    Member
    334
    461
    Oct 15, 2015
    Italy
    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. ;)
     
  7. Megalegacy98
    OP

    Megalegacy98 ( ͡° ͜ʖ ͡°)™

    Member
    505
    259
    Aug 11, 2015
    United States
    Just around the corner™
    I'm compiling an example.
     
  8. Slashcash

    Slashcash GBAtemp Fan

    Member
    334
    461
    Oct 15, 2015
    Italy
    So you are probably compiling an example written from an old version of ctrulib. This zip should contain only updated examples. Try to compile one of them.
     

    Attached Files:

  9. Megalegacy98
    OP

    Megalegacy98 ( ͡° ͜ʖ ͡°)™

    Member
    505
    259
    Aug 11, 2015
    United States
    Just around the corner™
    Yay! It works now! Thanks!
     
  10. Megalegacy98
    OP

    Megalegacy98 ( ͡° ͜ʖ ͡°)™

    Member
    505
    259
    Aug 11, 2015
    United States
    Just around the corner™
    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...
     
  11. Slashcash

    Slashcash GBAtemp Fan

    Member
    334
    461
    Oct 15, 2015
    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, Jan 30, 2016
  12. MarcusD

    MarcusD nobody's hero

    Member
    1,179
    2,387
    Oct 16, 2015
    Hungary
    a pixel between life and death
    You don't need to sudo it if you make the devkitPro folder writable / make it yours.

    Make devkitPro read/write/executable:
    Code:
    sudo chmod -r 777 /opt/devkitPro
    Make devkitPro folder yours:
    Code:
    sudo chown -R yourusername:yourusername /opt/devkitPro
     
    Last edited by MarcusD, Jan 30, 2016
  13. Slashcash

    Slashcash GBAtemp Fan

    Member
    334
    461
    Oct 15, 2015
    Italy
    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, Jan 30, 2016
  14. MarcusD

    MarcusD nobody's hero

    Member
    1,179
    2,387
    Oct 16, 2015
    Hungary
    a pixel between life and death
    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
     
  15. Slashcash

    Slashcash GBAtemp Fan

    Member
    334
    461
    Oct 15, 2015
    Italy
    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, Jan 30, 2016
  16. MarcusD

    MarcusD nobody's hero

    Member
    1,179
    2,387
    Oct 16, 2015
    Hungary
    a pixel between life and death
    Or you could just get rid of the graphical login, and use the big fullscreen terminal to login + startx :P

    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 MarcusD, Jan 30, 2016