devkitPro issues..

Discussion in 'Wii - Hacking' started by portugeek, Aug 2, 2017.

  1. portugeek
    OP

    portugeek GBAtemp Fan

    Member
    374
    67
    Apr 6, 2013
    United States
    UPDATE!!: So apparently making a copy of the Makefile.wii file, removing the .wii suffix, and running that Makefile instead, started the process of compiling. But now I'm missing a zlib.h file which caused me to suffer a fatal error. I have no idea where to find and place that file.

    I'll start off by saying that I'm not at all experienced using devkitPro. I've been doing a lot of googling and reading in the past couple days, and now that I feel like I'm almost at the finish line, I've hit a wall.


    What I'm trying to do is compile a modified version of genplusGX. When I select the "make" command from Programmer's Notepad I always get the same error...

    > "make"
    "make": *** No targets specified and no makefile found. Stop.

    > Process Exit Code: 2
    > Time Taken: 00:00


    From the Makefile.wii I see what appears to be another error...

    #---------------------------------------------------------------------------------
    # Clear the implicit built in rules
    #---------------------------------------------------------------------------------
    .SUFFIXES:
    #---------------------------------------------------------------------------------
    ifeq ($(strip $(DEVKITPPC)),)
    $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC)
    endif

    include $(DEVKITPPC)/wii_rules

    #---------------------------------------------------------------------------------
    # TARGET is the name of the output
    # BUILD is the directory where object files & intermediate files will be placed
    # SOURCES is a list of directories containing source code
    # INCLUDES is a list of directories containing extra header files

    Anyone know what I'm doing wrong? How do I set DEVKITPPC in my environment? And where it says <path to>, am I supposed to enter a path to where devkitPPC is located? Or, a path to where devkitPPC files are exported to? When I entered a path to the folder location I received the same error.

    Any clarity on what I'm doing wrong would be greatly appreciated.
     
    Last edited by portugeek, Aug 2, 2017
  2. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,047
    8,565
    Oct 27, 2002
    France
    Engine room, learning
    you are on windows ?
    It usually set all the environment variables automatically when using the automatic installer.

    Did yo reboot after install ? if not, that's maybe your issue.
    if you did, and it still doesn't work, either reinstall OR let's do it manually !

    Temporary solution
    it's possible only if you use command line tools. as you said you used programmer's notepad, I don't know how to do it.
    I'll still explain for users using command line window.

    Before typing "make", type this :
    set DEVKITPPC=/c/devkitPro/devkitPPC

    it will register "DEVKITPPC to c:\devkitPro\devkitPPC\ folder until you close your command line tool window.
    To make it even easier, I'm using a batch like this :

    Code:
    set DEVKITPPC=/f/devkitPro/devkitPPC_r27
    set devkitPPC
    make clean
    make -j4
    You can see I specifically set a devkitPro version (in case you keep multiple versions)
    second line is used to "check" that the path is correctly set, it prints it.
    make clean, and make -j4 are used to clean the previously compiled files and compiled it again using 4 CPU cores.


    Permanent solution
    If you have "my computer" icon on your desktop, right click on it and choose properties.
    if not, try Windows+pause key combo on your keyboard

    go to advanced system setting
    at the bottom you have a button "Environment variables"
    In the bottom part (system variables) add these :

    [​IMG]
    replace /F/ with the partition letter you installed devkitpro, usually it's /C/devkitPro/

    create DEVKITARM and set it to /C/devkitPro/devkitARM/
    create DEVKITPPC and set it to /C/devkitPro/devkitPPC/
    create DEVKITPRO and set it to /C/devkitPro/devkitPro/



    You might have to edit your "PATH" variable too, to add new path in it.
    It's all the locations where Windows is looking when you type a command in a command line window.
    it's using this format : path1;path2;path3;path4;etc.
    Do not delete existing path, add a semicolon at the end and add your new path.

    Add this path:
    C:\devkitPro\msys\bin

    Then REBOOT to let windows register these paths for all programs.


    Third solution, using makefile

    Like said in the makefile, or wii rules, you can use "Export" command in a makefile to do the same thing as "SET" in command line window.


    Remember, the easiest is to REINSTALL devkitpro if you are in windows, and reboot your computer.



    For this, you are missing a LOT of libraries.
    a lot of libraries usually made for PC or other plateform already exist, and there's no need to code them again for every new plateform or console, so they are "ported" to the new plateform.
    you need to find a compilation of all these ported libraries used by your homebrew project. It's usually named "portlib".

    you can find a version here :
    Portlib and libogc for DevkitPPC r27 (for USBLoaderGX)
    extract the "portlib" folder to devkitPro folder, and you should get missing libraries.
    I can't guarantee you that you get all the needed libraries nor all the correct version for the project you are trying to compile, you might have to read/learn/find the exact package used by your project's developer.
    you'll also note that it's for devkitPPC r27, while r28 is now available, some libraries might not work with latest devkitPPC version.
     
    Last edited by Cyan, Aug 2, 2017
    portugeek likes this.
  3. portugeek
    OP

    portugeek GBAtemp Fan

    Member
    374
    67
    Apr 6, 2013
    United States
    Thank you very much, Cyan. I did everything you recommended and it worked! I'm not sure exactly what fixed it because I did everything all at the same time. Also, I hadn't rebooted after installing devkitPRO, so maybe that was causing some of the issues too.

    After it compiled, I got super excited, started up the Wii, tried the .dol, and it worked! Although I learned that some of the artwork was incorrectly placed, and a little large, so I fixed it and compiled again. As soon as it finished compiling I got a call from my wife to pick her up from work. I thought to myself, "I'll test it when I get back."

    I get home, and my PC was off. Well apparently my graphics card died while I was gone. So now I have no way of transferring it to the Wii.

    I was excited to post some screenshots, but oh well, maybe later this week.:P

    Thanks again, Cyan. I learn something new from you with every post.
     
    Last edited by portugeek, Aug 4, 2017
    Cyan likes this.
  4. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,047
    8,565
    Oct 27, 2002
    France
    Engine room, learning
    Glad you got it working.
    I'm sure you just need a reboot to let windows register the environment variable (done automatically from installer).

    even if you rebooted, you'd still required the portlib, so now you have everything

    I'm sorry your graphic card died :(
    I know how it feels, I already had this twice. Good luck fixing your compute, and making homebrew


    I'm also glad you learn something new every time you read my post!
    That's my way of doing things, I'd better explain how things work to teach my knowledge to whomever read it, instead of just providing a solution without explanation.
    it makes my posts always very long to read, but it's interesting if you take the time to read them :lol:
     
    Last edited by Cyan, Aug 4, 2017