DevkitPro error

Discussion in '3DS - Homebrew Development and Emulators' started by Astrr, Feb 26, 2017.

  1. Astrr
    OP

    Astrr Newbie

    Newcomer
    8
    2
    Feb 10, 2017
    Serbia, Republic of
    When I tried to compile a 3dsx homebrew, this error appeared.
    Code:
    linking TSOI.elf
    g:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lctru
    collect2.exe: error: ld returned 1 exit status
    make[1]: *** [/g/tsoy/TSOI.elf] Error 1
    "make": *** [build] Error 2
    What should I do to fix it? Ask any questions if you need more info.
     
  2. Voxel

    Voxel Clumsy Coder

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,183
    5,850
    Jun 27, 2015
    United Kingdom
    England, UK
    It means you haven't yet installed ctrulib. (https://github.com/smealum/ctrulib)

    Just download the repository, and run "make install" in the root of the libctru folder, then it should install to your DevkitPro installation. After that, try again.
     
    Astrr likes this.
  3. Manurocker95

    Manurocker95 Game Dev & Pokémon Master

    Member
    657
    175
    May 29, 2016
    Spain
    Madrid
    You don't have ctrulib installed but that also means you don't have devkitpro installed as ctrulib is installed with the environment. Btw, as said above, reinstall devkitpro with everything selected (PSP is not needed) or make install un ctrulib máster to install It :)
     
  4. Astrr
    OP

    Astrr Newbie

    Newcomer
    8
    2
    Feb 10, 2017
    Serbia, Republic of
    I've tried. Error appears.
    Code:
    C:\Users\XXX>make install G:\libb\libctru
    make: *** No rule to make target `install'.  Stop.
    
    C:\Users\XXX>make G:\libb\libctru
    make: Nothing to be done for `G:\libb\libctru'.
    
    C:\Users\XXX>make install G:\libb\libctru\
    make: *** No rule to make target `install'.  Stop.
    
    C:\Users\XXX>make install G:\libb\libctru
    make: *** No rule to make target `install'.  Stop.
    
    C:\Users\XXX>
    What am i doing wrong?
     
  5. Manurocker95

    Manurocker95 Game Dev & Pokémon Master

    Member
    657
    175
    May 29, 2016
    Spain
    Madrid
    Seem you're trying to compile the wrong folder. You must do the make install where the makefile is
     
    Astrr likes this.
  6. Voxel

    Voxel Clumsy Coder

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,183
    5,850
    Jun 27, 2015
    United Kingdom
    England, UK
    In CMD, "cd" to the directory where the makefile is.
    Code:
    cd g:\libb\libctru
    Then just run "make install" (and nothing else)
     
  7. Astrr
    OP

    Astrr Newbie

    Newcomer
    8
    2
    Feb 10, 2017
    Serbia, Republic of
    upload_2017-2-26_13-26-52.png
    I think everything is in the right place, but it doesn't work
     
  8. Voxel

    Voxel Clumsy Coder

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,183
    5,850
    Jun 27, 2015
    United Kingdom
    England, UK
    In Windows Explorer, go to File -> Open Command Prompt while inside the directory with the Makefile, then type "make install". Alternatively, you can do what I said earlier and "cd" to that directory.
    Can't stress this enough.
     
    Last edited by Voxel, Feb 26, 2017
    Astrr likes this.
  9. Manurocker95

    Manurocker95 Game Dev & Pokémon Master

    Member
    657
    175
    May 29, 2016
    Spain
    Madrid
    Okay, do this: delete C:\devkitPro (if you got It installed there), download devkitpro installer and run it (install It normally). It should come with ctrulib installed by default.
     
  10. Astrr
    OP

    Astrr Newbie

    Newcomer
    8
    2
    Feb 10, 2017
    Serbia, Republic of
    IT WORKS! Thank you!)
     
    Last edited by Astrr, Feb 26, 2017
    Voxel likes this.
  11. Voxel

    Voxel Clumsy Coder

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,183
    5,850
    Jun 27, 2015
    United Kingdom
    England, UK
    Maybe copying libctru.a to "/DevkitPro/DevkitARM/arm-none-eabi/lib/" will do the trick, since the Makefile scans for specified lib files in that specific directory. This should be considered a temporary workaround though, since the Makefile should also pick up libctru from /Devkitpro/libctru/lib as well, but it sometimes doesn't for some weird reason (probably user error during setup)... I had that problem once, and I still do to this day, but that's how I worked aroud that issue anyway...

    If it returns a bunch of different errors after that, try also merging the whole "include" folder from ctrulib with the one located at /DevkitPro/DevkitARM/arm-none-eabi/include/ as well.

    EDIT: This is replying to the below post.
     
    Last edited by Voxel, Feb 26, 2017
    Astrr likes this.
  12. Astrr
    OP

    Astrr Newbie

    Newcomer
    8
    2
    Feb 10, 2017
    Serbia, Republic of
    But still,
    Code:
    > "make"
    linking TSOI.elf
    g:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lctru
    collect2.exe: error: ld returned 1 exit status
    make[1]: *** [/g/tsoy/TSOI.elf] Error 1
    "make": *** [build] Error 2
    
    > Process Exit Code: 2
    > Time Taken: 00:01
    
    this appears. I used make through CMD and Prog's Notepad
    P.S. I can't use forums, sorry for re-posting etc

    — Posts automatically merged - Please don't double post! —

    Another error
    Code:
    > "make"
    linking TSOI.elf
    g:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/armv6k/fpu/3dsx_crt0.o: In function `ClrLoop':
    (.crt0+0x8c): undefined reference to `main'
    collect2.exe: error: ld returned 1 exit status
    make[1]: *** [/g/tsoy/TSOI.elf] Error 1
    "make": *** [build] Error 2
    
    Maybe i'll send you makefile/the whole project and you will check it?
     
    Last edited by Astrr, Feb 26, 2017
  13. Voxel

    Voxel Clumsy Coder

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,183
    5,850
    Jun 27, 2015
    United Kingdom
    England, UK
    Sure thing. I'm very curious to see what's wrong here...
     
  14. Astrr
    OP

    Astrr Newbie

    Newcomer
    8
    2
    Feb 10, 2017
    Serbia, Republic of
    Ok, i'll send everything to you by Skype