Noob-Proof guide to compile RxTools source.

Discussion in '3DS - Flashcards & Custom Firmwares' started by capito27, Jul 5, 2015.

  1. capito27
    OP

    capito27 GBAtemp Advanced Fan

    Member
    873
    1,006
    Jan 19, 2015
    Swaziland
    Hello, everyone, as requested by some of you, here is a noob-proof guide to compiling the source of RxTools, located here.

    For now, this guide is solely directed at Windows Users, i might make another guide for Mac OS and Unix users.

    please note that the sources won't be anywhere as stable as the released version, as such, this thread is more directed at devs that want to edit RxTools source code and test it, it is most likely useless to the end user !

    1. First of all, you'll want to install git and grab a copy of the latest RxTools source code :
    Go here, and click the icon for your OS (we are using Windows in this guide) and install git. Create a folder somewhere where you will store your source code and from a command prompt in that directory, type "git clone --recursive https://github.com/roxas75/rxTools.git"
    2. Then you'll need to install Python 2.7 (SEE EDIT2 AT THE BOTTOM):
    Go here, press "download Python 2.7.10", install the software downloaded​

    3. Then you'll want to install devkitpro :
    Go here, press "Download", wait 5 seconds for the file to start downloading, execute it and follow the steps (without modifing any default settings), once the setup is completed you can come back to this thread.​

    4. Then you'll want to install armips :
    Go here, press "download file now", open the downloaded archive (which contains 3 files), you'll want to copy "armips.exe" from the archive to this directory : "X:\devkitPro\msys\bin" ("X" is your hard drive asigned letter).​


    5. Then you'll need to install MinGW :
    Go here, press "Download", execute the installed file, press "install", "continue", wait for the install to be completed, right click the package "mingw32-base", choose "mark for installation", open the "installation" tab and choose "apply changes", wait for the install to be finished then you can close the window.
    6. Then you'll need to install Image Magick. The current version (6.9.3 as of this writing) hangs on font.bin, so you will need to grab an older version from here:

    https://mega.nz/#F!sZkyQKAC!0cBRXqyQOPnoWyh00DtAcQ

    7. Then you'll need to install the Visual C++ runtime libraries, if you don't have them already :
    Download this (as you can see, this is the offical microsoft link, it is just more convenient to share the file that way) and install it.
    8. Then you'll need to check your "Path" variable :
    start a command prompt (simply type CMD on your start menu and press enter) and then type the command "path", you'll get a response like this
    Warning: Spoilers inside!
    EDIT: devkitPro tools do not like spaces or "(" in the path, so it is important to move all of these items to the beginning of your path. Please adjust to match your installation locations and ensure you don't have duplicate entries, but the beginning of your path should look something like what's in the spoiler above (and in the same order).


    To check/fix your path:
    Warning: Spoilers inside!



    Finally you should be able to compile the RxTools source : open the rxTools folder we cloned at the begining, hold "SHIFT" and right click anywhere in the folder and press "open a comand prompt here" (or something along those lines) and then type "make release", it should compile properly now !

    Tired of deleting and recloning repos every time you want to update? Place this simple .bat file into devkitPro\msys\bin (hopefully, this is among the first directories in your path). Inside of the project's folder (e.g. /rxTools or /FBI) , simply type "update". It's always wise to "make clean" before "make", so you can add those two lines if you wish for a one stop shop at building the latest of anything. Any errors would be because of outdated dependencies, such as ctrulib...
    https://gbatemp.net/attachments/update-zip.47034/


    If you see that I missed anything or am not clear about something, please tell me or urherenow so we can fix it, thanks for the time you took reading this and i hope to have been of help :)

    -Capito27

    -urherenow's note - Please also look at README.md in the source. This may mention requirements that might not have been covered in this guide, especially when building projects other than rxTools.

    -An updated version of Gnu Make is required for the current and future releases of FBI. I suggest you rename your current one (usually in devkitPro/msys/bin) in case you need to revert later, and replace it with one of these: http://www.equation.com/servlet/equation.cmd?fa=make
    Also for the final .zip when building FBI (if the error bugs you) go to ftp://ftp.info-zip.org/pub/infozip/win32/ and grab zip.exe from one of the bottom two packages, and also drop it into devkitPro/msys/bin. Edit: while the newer make.exe (I linked to 4.1) is required for FBI, it looks like other projects still require 3.81. Had to revert to build Godmode9. Tool incompatibilities between projects make me :sad:
    EDIT: Latest FBI now builds clean with gnu32 make v3.81. Just clone and "make install" the latest ctrulib source first. Will leave the above note up for reference in case other path issues arise, as something to try...

    EDIT2: Newer projects like firmtool REQUIRE Python 3.5+. I got it working on windows with 3.6.1 Windows x86-64 executable installer: https://www.python.org/downloads/release/python-361/


     
    Last edited by urherenow, Jun 8, 2017


  2. Spzjulien

    Spzjulien GBAtemp Regular

    Member
    296
    66
    Sep 8, 2012
    France
    good job, just try your tuto just for fun, all run smooth :P
     
  3. Rhymekaze

    Rhymekaze Member

    Newcomer
    44
    7
    Jul 4, 2015
    United States
    I did a clean install of this and got the 'stable' source from the 2.6 release page, but it's throwing me this error:
    [​IMG]
    However I fixed this step by installing GnuWin's make and copying it to c:\rxt as initially advised by the readme.

    The current issue I'm getting is:
    [​IMG]

    Everything is installed to default directories. echo %paths% returns:

    C:\MinGW\bin\;c:\devkitPro\msys\bin;C:\Python27\;C:\Python27\Scripts;C:\devkitPro\devkitARM\bin\;c:\programdata\oracle\java\javapath;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\program files (x86)\skype\phone\;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\MacType;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;
     
  4. Jaitsu

    Jaitsu Yet Another GBATemp Furry

    Member
    152
    51
    Jun 2, 2015
    United States
    Add C:\MinGW\msys\1.0\bin\ at the beginning of your path. You have MinGW's bin and devkit's msys\bin, but non MinGW's msys\1.0\bin; that's where uname.exe is.
     
  5. Rhymekaze

    Rhymekaze Member

    Newcomer
    44
    7
    Jul 4, 2015
    United States
    Er.. that's not even a folder for me:
    [​IMG]
    and searching uname.exe in MinGW doesn't return any results anyway. Do I need to install excess stuff than just the mingw32-base?

    edit: oh! i needed to install msys in MinGW.. should probably add that to the OP, maybe?
     
  6. Jaitsu

    Jaitsu Yet Another GBATemp Furry

    Member
    152
    51
    Jun 2, 2015
    United States
    I think we should be using mingw-get-setup from here: http://sourceforge.net/projects/mingw/files/Installer/ instead of what's linked in the OP. I believe it installs msys as well.

    Edit: ...Okay, that's not what I used, now that I double check, but it works. You need AT LEAST the base and msys, I'm not sure about the others. Check ("Mark for Installation") all the packages you want, then hit Installation -> Apply Updates and it'll download and install everything.
     
    Last edited by Jaitsu, Jul 5, 2015
  7. Rhymekaze

    Rhymekaze Member

    Newcomer
    44
    7
    Jul 4, 2015
    United States
    That and scrolling around to msys and having it install that package works too.

    Now I'm erroring at:

    [​IMG]
    And then after you tell stat.exe to close, it prints one more line:
    [​IMG]
     
  8. Jaitsu

    Jaitsu Yet Another GBATemp Furry

    Member
    152
    51
    Jun 2, 2015
    United States
    Can you post the contents of C:\rxt\rxtools\stat.exe.stackdump? It might be there or just in C:\rxt\, I'm not sure, but it should be there.
     
  9. Rhymekaze

    Rhymekaze Member

    Newcomer
    44
    7
    Jul 4, 2015
    United States
    Sure, here you go:

    MSYS-1.0.17 Build:2011-04-24 23:39
    Exception: STATUS_ACCESS_VIOLATION at eip=00000000
    eax=60EA0124 ebx=60EA022C ecx=608B8888 edx=00000108 esi=00000000 edi=60EA00D4
    ebp=0028FEC0 esp=0028FEA4 program=c:\devkitPro\msys\bin\stat.exe
    cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
    Stack trace:
    Frame Function Args
    End of stack trace
     
  10. Jaitsu

    Jaitsu Yet Another GBATemp Furry

    Member
    152
    51
    Jun 2, 2015
    United States
    Oh, it's still using devkitPro's msys, which has... issues like that. Make sure the MinGW msys is before it in your Path (in fact, you might be able to remove the devkit msys from your Path entirely)
     
  11. Rhymekaze

    Rhymekaze Member

    Newcomer
    44
    7
    Jul 4, 2015
    United States
    I'm assuming it's using devkitPro's because even with mingw32-base and msys-base, I don't have a stat.exe in MinGW. Anywhere. Msys or MinGW32.

    [​IMG]

    I have no idea how I followed the instructions and can't get this to work but other people are doing it fine. I'm assuming (read: hoping) something I have installed and/or 8.1 isn't messing with the process being easy?
     
  12. Jaitsu

    Jaitsu Yet Another GBATemp Furry

    Member
    152
    51
    Jun 2, 2015
    United States
    I'm officially confused, because my msys has a stat.exe in it.

    Edit: Try checking mingw-developer-tools, it mentions being a developer MSYS installation.

    By the way, I apologize - I'm totally not a pro at this, I'm just figuring stuff out myself. I just figured I'd try to help other people going through the same stuff I just did, but I obviously don't have all the answers. :P
     
  13. AquaX101

    AquaX101 GBAtemp Advanced Fan

    Member
    714
    165
    Apr 15, 2014
    United States
    Somewhere
    Was able to compile a build of rxTools yesterday, didn't work with the newest one today. I added ImageMagick to the path and I get this error.

    EDIT: nvm, solved the problem
     
    Last edited by AquaX101, Jul 5, 2015
  14. Rhymekaze

    Rhymekaze Member

    Newcomer
    44
    7
    Jul 4, 2015
    United States
    Yeah, developer-toolkit had it. I'm now here:

    [​IMG]

    I'm pretty much out of ideas as to why it doesn't work. uname is in msys/1.0/bin, which is in my paths, so it SHOULD work? but it errors out anyway.

    Maybe I'll just wait for better documentation on how to build this, since I don't think it's very well documented at all. I have no idea what the issue is, error 2 is vague as hell

    If you still have the install stuff you used to get this to work and wouldn't mind ziping them up, I'd uninstall/reinstall using what you used, but I can't think of anything else
     
  15. Spzjulien

    Spzjulien GBAtemp Regular

    Member
    296
    66
    Sep 8, 2012
    France
    when i compil rxtools-master (last) no problem no error, but the 3ds freeze when i try it on my o3ds xl
    then when i try to compile 2.6 rxtools source i got some error

    i have stack problem too :)
     
    Last edited by Spzjulien, Jul 5, 2015
  16. herocis23

    herocis23 Member

    Newcomer
    29
    3
    Jan 30, 2015
    Netherlands
    Im getting a problem to. Can you tell me how you fixed it?
     
  17. AquaX101

    AquaX101 GBAtemp Advanced Fan

    Member
    714
    165
    Apr 15, 2014
    United States
    Somewhere
    I don't know if you had the same error as mine, show a screenshot of the error so i can help :)
     
  18. herocis23

    herocis23 Member

    Newcomer
    29
    3
    Jan 30, 2015
    Netherlands
    Here it is:
    [​IMG]
    Maybe im using the wrong version. Can you send me the download link to the one you used?
     
  19. DjoeN

    DjoeN Captain Haddock!

    Member
    5,169
    1,486
    Oct 21, 2005
    Belgium
    Somewhere in this potatoland!
    Did everything like in the OP, compiled with only 1 error near the end, but i have a rxTools.dat (not tested yet)

    c:/rxTools/msethax/payload/source/main.c:7:6: warning: return type of 'main' is not 'int' [-Wmain]
    void main()
    ^

    [​IMG]
     
  20. Koryushin

    Koryushin GBAtemp Regular

    Member
    176
    46
    Mar 26, 2015
    France
    I have the same error. don't know what i did wrong.