Compiling... Configurable USB Loader ( cfg-loader )

Discussion in 'Wii - Backup Loaders' started by Yolanda98, Jun 24, 2011.

  1. Yolanda98
    OP

    Newcomer Yolanda98 Newbie

    Joined:
    Aug 16, 2009
    Messages:
    9
    Country:
    United States
    I downloaded the CFG source code (r304 @ http://code.google.com/p/cfg-loader/ ).
    I changed the CFG main splash screen (as in data\intro4.jpg) and when tried to compile the project using devkitPro I received some errors (see below):

    Code:
    mload.c
    c:/devkitPro/cfg-loader.googlecode.com.r304/source/mload.c: In function 'mload_init':
    c:/devkitPro/cfg-loader.googlecode.com.r304/source/mload.c:67:4: warning: implicit declaration of function 'iosDestroyHeap'
    ...
    ...
    linking ... cfg69d.elf
    mload.o: In function `mload_init':
    mload.c:(.text.mload_init+0xf8): undefined reference to `iosDestroyHeap'
    mload.o: In function `mload_close':
    mload.c:(.text.mload_close+0x28): undefined reference to `iosDestroyHeap'
    collect2: ld returned 1 exit status
    make[1]: *** [/c/devkitPro/cfg-loader.googlecode.com.r304/cfg69d.elf] Error 1
    "make": *** [build] Error 2
    I would like to know if any of the developers can help me on getting the DOL (and ELF) compiled.
    Please find below the complete Programmer's Notepad output.

    Code:
    > "make" 
    
    Building cfg69d -DVERSION=69d -DDEVKITPPCVER=22 -DCCOPT="-Os"
    libOGC Release 1.8.6
    button.png
    intro4.jpg
    window.png
    GRRLIB.c
    apploader.c
    banner.c
    cache.c
    cfg.c
    cfgutil.c
    cheats.c
    confont512.c
    console.c
    coverflow.c
    debug.c
    disc.c
    dns.c
    dol.c
    dolmenu.c
    dvd_broadway.c
    fat.c
    frag.c
    fst.c
    gcmodplay.c
    gettext.c
    grid.c
    gui.c
    guimenu.c
    http.c
    mem.c
    memcheck.c
    menu.c
    mload.c
    c:/devkitPro/cfg-loader.googlecode.com.r304/source/mload.c: In function 'mload_init':
    c:/devkitPro/cfg-loader.googlecode.com.r304/source/mload.c:67:4: warning: implicit declaration of function 'iosDestroyHeap'
    mload_modules.c
    mp3player.c
    multidol.c
    music.c
    net.c
    partition.c
    patchcode.c
    playlog.c
    restart.c
    sdhc.c
    sha1.c
    sort.c
    splits.c
    strutil.c
    subsystem.c
    sys.c
    unicmap.c
    update.c
    usb-loader.c
    usbstorage.c
    util.c
    utils.c
    video.c
    wbfs.c
    wbfs_fat.c
    wdvd.c
    wgui.c
    wiip.c
    wpad.c
    xml.c
    pngu.c
    c:/devkitPro/cfg-loader.googlecode.com.r304/source/pngu/pngu.c: In function 'user_error':
    c:/devkitPro/cfg-loader.googlecode.com.r304/source/pngu/pngu.c:1046:2: warning: 'jmpbuf' is deprecated (declared at c:/devkitPro/cfg-loader.googlecode.com.r304/lib/png/include/png.h:1098)
    pngu_grrlib.c
    libwbfs.c
    rijndael.c
    wiidisc.c
    ioapi.c
    miniunz.c
    mztools.c
    unzip.c
    patchhook.S
    stub.S
    linking ... cfg69d.elf
    mload.o: In function `mload_init':
    mload.c:(.text.mload_init+0xf8): undefined reference to `iosDestroyHeap'
    mload.o: In function `mload_close':
    mload.c:(.text.mload_close+0x28): undefined reference to `iosDestroyHeap'
    collect2: ld returned 1 exit status
    make[1]: *** [/c/devkitPro/cfg-loader.googlecode.com.r304/cfg69d.elf] Error 1
    "make": *** [build] Error 2
    
    > Process Exit Code: 2
    > Time Taken: 01:53
     


  2. rahoul102

    Member rahoul102 GBAtemp Regular

    Joined:
    Mar 18, 2010
    Messages:
    171
    Location:
    Ottawa, Ontario
    Country:
    Canada
    Hi I can't seem to find that source so could you perhaps send it to me by mail?
    You could use this site: https://www.yousendit.com/
    I will try to see if the same thing happens to me.
    My email: rahoul102@live.ca
     
  3. Slimmmmmm

    Member Slimmmmmm GBAtemp MoNkEeE

    Joined:
    Nov 1, 2007
    Messages:
    1,687
    Location:
    the land of lol
    Country:
    United Kingdom
    Source is here : http://cfg-loader.googlecode.com/svn/trunk/

    Dunno why it wont compile for you, soz.

    btw if you're the guy willing to donate $20 to gbatemp for a custom splash screen (from another post)

    I'll do it (and more) if you donate the $20 to a dev instead ?
     
  4. rahoul102

    Member rahoul102 GBAtemp Regular

    Joined:
    Mar 18, 2010
    Messages:
    171
    Location:
    Ottawa, Ontario
    Country:
    Canada
    Hey Yolanda98,
    It would help me a lot if you send the files by email so I can look at them.

    @Slimmmmmm
    I tried the site you sent me but there all read-only, I need to be able to download the sources to try this. And the only way I can download is by one-by-one which is too much time consuming.
     
  5. PsyBlade

    Member PsyBlade Snake Charmer

    Joined:
    Jul 30, 2009
    Messages:
    2,204
    Location:
    Sol III
    Country:
    Germany
  6. Slimmmmmm

    Member Slimmmmmm GBAtemp MoNkEeE

    Joined:
    Nov 1, 2007
    Messages:
    1,687
    Location:
    the land of lol
    Country:
    United Kingdom
  7. Yolanda98
    OP

    Newcomer Yolanda98 Newbie

    Joined:
    Aug 16, 2009
    Messages:
    9
    Country:
    United States
  8. rahoul102

    Member rahoul102 GBAtemp Regular

    Joined:
    Mar 18, 2010
    Messages:
    171
    Location:
    Ottawa, Ontario
    Country:
    Canada
    Hi, thanks for the files, but there seems to be some files missing from this source, ex zlib.h
    That's where my Programmer's Notepad stopped and gave me an error.
    Did you upload the source that you were using? Or is this just downloaded from the website?
     
  9. FIX94

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,554
    Location:
    ???
    Country:
    Germany
    Hello Yolanda98, I don't have a problem in compiling it and I can't understand the error message you get because you have libogc 1.8.6, but the compiled dol just codedump for me. If I'm using the original picture it works fine, but if I use your custom intro it codedump. I'm now trying to find out why it doesn't work and I will upload the dol for you asap.
     
  10. PsyBlade

    Member PsyBlade Snake Charmer

    Joined:
    Jul 30, 2009
    Messages:
    2,204
    Location:
    Sol III
    Country:
    Germany
    just use svn damnit

    besides, including libs in the source is just wrong anyway
    the should be taken from the system instead
    this prevents disasters like the libwbfs delete bug that still lingers
     
    bugzme likes this.
  11. FIX94

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,554
    Location:
    ???
    Country:
    Germany
    Alright, the filesize is somewhere specifed and I don't want to search, so I simply compressed the image to come under the original filesize and filled the compressed image with zero bytes to get the exact filesize of the original image, and now it seems to work fine [​IMG]
    cfg69d.7z
    Remember, use at own risk.
     
  12. Yolanda98
    OP

    Newcomer Yolanda98 Newbie

    Joined:
    Aug 16, 2009
    Messages:
    9
    Country:
    United States
    1- I looked for the file you mentioned and I found it on cfg-loader.googlecode.com.r304\lib\zlib\src\zlib.h ... is this the one you pointed on your example? What other files are missing?
    2- I downloaded the source code and only changed the image intro4.jpg
     
  13. FIX94

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,554
    Location:
    ???
    Country:
    Germany
    Have you tried my version? I compiled the latest svn with your changed intro4.jpg, this is what you wanted right?
     
  14. Yolanda98
    OP

    Newcomer Yolanda98 Newbie

    Joined:
    Aug 16, 2009
    Messages:
    9
    Country:
    United States
    Fix94, thanks for the time you took on reviewing this. I was waiting to do some test before answer to you and here I go with some details.

    YES, I tried your dol and it works (splash screen changed). You ROCKS and It seems you are the only one "lucky" who got a final dol. Nevertheless Fix94, I would like to change some other settings but inside the code and not into the xml or the global config file reads by the boot.dol. That's why I need to successfully compile everything on my end and I am asking for some help on getting this done.
    Definitely the size of the intro4.jpg and some kind of (security or efficiency) checking during the compilation get me into the the final error and the unsuccessful compilation. Following your valuable advice (about the file size) I put back the original intro4.jpg and tried to compile everything and I got the same error once again. That's when I though devkitPro was my real problem because on the past I was reviewing/testing some wads source code and I may have mixed for example the lib folder/files of both projects (the wads and the cfg-loader). So I decided to start from the very beginning and please correct me if I did something wrong.

    I downloaded and re-installed the devkitPro on a fresh path (C:\devkitPro). I also downloaded the source code (cfg-loader) again where I would like to comment that a new version of the cfg-loader just came out. I was using the version r304 when I posted the source code here and now the last revision is r306. I downloaded it the r306 (http://cfg-loader.googlecode.com/svn/trunk/Source/) and this time I didn't touch the intro4.jpg and put the new source code on the following folder structure:
    C:\devkitPro
    C:\devkitPro\cfg-loader.googlecode.com.r306\source\ (inside this folder I put the cfg-loader source code folders/files)
    build
    cios
    data
    Languages
    lib
    source
    tools
    LICENSE.txt
    Makefile
    README-CFG.txt
    USBLoader.pnproj
    usbloader.pnpsI opened the USBLoader.pnproj with the Programmers Notepad and when tried to compile everything I got some warnings and the same error that rahoul102 posted above.
    In file included from c:/devkitPro/cfg-loader.googlecode.com.r306/source/source/gui.c:22:0:
    c:/devkitPro/cfg-loader.googlecode.com.r306/source/lib/png/include/png.h:399:18: fatal error: zlib.h: No such file or directory
    compilation terminated.This error is pretty simple but since I am into Microsoft Visual Studio and I don't know how devkitPro works I don't know how to setup or specify this reference. I would like to ask some questions about how to setup the devkitPro correctly.

    1. Is it ok to put the cfg-loader source code folder inside "C:\devkitPro\" and specifically like I did "C:\devkitPro\cfg-loader.googlecode.com.r306\source\"? In other case what should I do?

    2. Aside from the cfg-loader source code that I placed inside devkitPro, do I need to add something else to the root of the devkitPro?

    3. Do you downloaded and compile the source code from Google or you compile the one I posted?

    4. Can you please send me your folders/files structure list on how you have your devkitPro folder so I can compare with mine and see what is missing on my end?
    Please I will appreciate so much if you can send me a file with that structure on it ( type on the DOS prompt ---> dir /b /s >cfg.txt and send me the cfg.txt )

    Once again, THANKS A LOT for everything.
     
  15. FIX94

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,554
    Location:
    ???
    Country:
    Germany
    Alright, you need:
    Devkitppc r22
    LibOGC 1.8.6
    Clear the c:/devkitPro/libogc folder and extract the contents of the libogc-1.8.6.tar.bz into the empty libogc folder. Install devkitppc r22.

    Create a folder structure:
    c:/devkitPro/portlibs/ppc/include
    c:/devkitPro/portlibs/ppc/lib

    Move the
    cfg-loader.googlecode.com.r306/lib/zlib/lib22/libz.a
    to
    c:/devkitPro/portlibs/ppc/lib
    and the contents of
    cfg-loader.googlecode.com.r306/lib/zlib/include
    into
    c:/devkitPro/portlibs/ppc/include
    Then it should compile fine.
     
  16. Yolanda98
    OP

    Newcomer Yolanda98 Newbie

    Joined:
    Aug 16, 2009
    Messages:
    9
    Country:
    United States
    I understand and agree with you on where the libs folder must resided, however I was trying to compile everything as it is online and that's the main reason I downloaded and follow 100% the project folder structure. Please take a look at the lib folder and how is inside the Source folder @ http://cfg-loader.googlecode.com/svn/trunk/Source/lib/

    What do you recommend?
     
  17. Yolanda98
    OP

    Newcomer Yolanda98 Newbie

    Joined:
    Aug 16, 2009
    Messages:
    9
    Country:
    United States
    OMG! THANKS! You just replied. Ok, now I remembered that I did something like this before compiling the other WAD project. I will try this right now...
     
  18. Slimmmmmm

    Member Slimmmmmm GBAtemp MoNkEeE

    Joined:
    Nov 1, 2007
    Messages:
    1,687
    Location:
    the land of lol
    Country:
    United Kingdom
    Damn FIX I coulda used your help yesterday [​IMG]

    A good tip I recently learned is keep older versions of Devkitpro and libogc when you update them.
    If you had updated devkit recently then cfg, libwiigui, tantrics emus, wiimc etc etc wouldn't compile and you needed to revert to an older rev.

    Now in my C drive I have a few builds put into rars EG
    devkitPro_r23+libogc_1.8.7.rar < newest doesn't work with anything unless you get busy
    devkitPro_r22+libogc_1.8.6.rar < works with most things in development now etc etc
    Remember to keep lib back-ups too (portlibs, grrlib, ntfs, ext2fs, miilib, libwiigui)

    Now if you can compile certain things with a certain group of files you can either have seperate installs and edit the makefiles etc. Or just revert by unraring the builds you need. Not the best solution but very easy.
    If something doesn't compile you can read the errors and sometimes figure them out, or ask for help but to revert to what works is by far quicker.

    *EDIT* Folder structures

    I have this....
    C:\devkitPro\libogc < normal
    C:\devkitPro\portlibs < normal
    Back these up like I said earlier.

    Then I have (you can change, but don't have spaces in the names of folders)
    C:\OUR\CODING\WII\project_name\Source etc
    The folder WII on my PC contains all my coding that runs on the Wii

    In the "WII" folder I have SVNs of libwiigui, libgrr etc. You can go into dos in these folders (I have "send to dos" on right click)
    Warning: Spoilers inside!
    If you type make in dos it makes, clean cleans and install moves the libs etc where they need to go, also run does what it says. So in dos ... make install makes and moves whats needed by libs that don't go in portlibs and go in the libogc or other folders.

    *Correct me if I'm wrong, still a learner*
     
  19. Yolanda98
    OP

    Newcomer Yolanda98 Newbie

    Joined:
    Aug 16, 2009
    Messages:
    9
    Country:
    United States
    GUESS WHAT?
    > "make"
    Building cfg69d -DVERSION=69d -DDEVKITPPCVER=22 -DCCOPT="-Os"
    libOGC Release 1.8.6
    .....
    .....
    ..... /* linking errors fixed by FIX94 !!! [​IMG] */
    .....
    linking ... cfg69d.elf
    output ... cfg69d.dol
    It took me like an hour (lol) to composed my previous reply where at the same time I asked you some questions in order to be sure that the devkitPro was setup ok.
    I must said that you answered with the correct dosage and medication. The DOL was finally born without any other complication. Thanks to you Dr94. lol

    NOW, I have things to do with this little baby (source code). I would like to study/change some stuffs that I can't with the configurator. Will back soon...
     
  20. FIX94

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,554
    Location:
    ???
    Country:
    Germany
    Great that it works now [​IMG]
    @Slimmmmmm:
    Backups are damn important, oh yes [​IMG]
    To the cmd thing:
    I use this to open a cmd in the current directory because the other method is not that what I want to have.
    To wiiload:
    Well wiiload is way too complicated, I prefer transmitmii, it can open dols and elfs automatically and got a nice gui.
     

Share This Page