dimok789 / loadiine

loadiine
GNU General Public License v2.0
93 stars 26 forks source link

Main makefile fails #13

Open ghost opened 8 years ago

ghost commented 8 years ago

As I try to run 'make' on the project, I get something rather obscure.

Joshua@DESKTOP-SC7JE0M ~/newer/examples/loadiine $ make fs.c powerpc-eabi-gcc.exe: error: /home/Joshua/newer/examples/loadiine/src/fs/fs.c: No such file or directory powerpc-eabi-gcc.exe: warning: '-x c' after last input file has no effect powerpc-eabi-gcc.exe: fatal error: no input files compilation terminated. /home/Joshua/newer/examples/loadiine/Makefile:165: recipe for target 'fs.o' failed make[1]: * [fs.o] Error 1 Makefile:125: recipe for target 'build' failed make: * [build] Error 2

yet when I run $ cat /home/Joshua/newer/examples/loadiine/src/fs/fs.c I get output, just fine.

dimok789 commented 8 years ago

Did you checkout correctly? The "-x c" flag was removed in the new makefile. Try to checkout a fresh copy. Also you will need to compile the "installer" folder to get the payload as well. If you compile only the main makefile then you only get the ELF file.

ghost commented 8 years ago

Yes, I know that bit. I've already ported the installer to 5.5.0, but I have to port the FS functions and all to 5.5.0, which is a bit time consuming.

Also, what commit removed that in the makefile?

I just downloaded the current repo Joshua@DESKTOP-SC7JE0M ~/newer/examples/loadiineelf $ make fs.c powerpc-eabi-gcc.exe: error: /home/Joshua/newer/examples/loadiineelf/src/fs/fs.c: No such file or directory powerpc-eabi-gcc.exe: warning: '-x c' after last input file has no effect powerpc-eabi-gcc.exe: fatal error: no input files compilation terminated. /home/Joshua/newer/examples/loadiineelf/Makefile:165: recipe for target 'fs.o' failed make[1]: * [fs.o] Error 1 Makefile:125: recipe for target 'build' failed make: * [build] Error 2

I get the same thing. Am I not supposed to just run "make" ?

dimok789 commented 8 years ago

No it is correct to just use "make". I can't really tell what is wrong in your setup but i can definately tell it is your setup. I compile under linux and it works just fine after setting the DEVKITPPC environment variable. Also other developers can build this setup, so it is something with your environment.

What I dont understand is why it uses some kind of powerpc-eabi-gcc.exe. Is this a cygwin setup? Give me the output of your "ls -al .", "ls -al src" and "ls -al src/fs" in your loadiine sources folder. It seems to not find the C files which is weird. Maybe your cygwin is missing some binutil.

Just fyi: If you compile on Winblows than you should consider installing devkitPro with the install tool of it. It setups mingw and environment variables as needed as well as the correct compiler. It would make it easier to help you if you used tools that are not somehow self configured.

ghost commented 8 years ago

cygwin is being used, sadly. There's really no other way for me to easily do this.

I already have devkit

all ls commands returned what they should. Joshua@DESKTOP-SC7JE0M ~/newer/examples/loadiineelf $ ls -al . total 58 drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:10 . drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:08 .. -rwxr-xr-x 1 Joshua None 84 Nov 28 17:10 .gitignore drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:10 build drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 installer -rwxr-xr-x 1 Joshua None 18047 Nov 28 17:10 LICENSE -rwxr-xr-x 1 Joshua None 7700 Nov 28 17:09 Makefile -rwxr-xr-x 1 Joshua None 5975 Nov 28 17:09 README -rwxr-xr-x 1 Joshua None 6422 Nov 28 17:09 README-fr drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 server drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 src -rwxr-xr-x 1 Joshua None 214 Nov 28 17:09 TODO drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:10 www

Joshua@DESKTOP-SC7JE0M ~/newer/examples/loadiineelf $ ls -al src total 16 drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 . drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:10 .. drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 common drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 fs drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 kernel -rwxr-xr-x 1 Joshua None 5287 Nov 28 17:09 link.ld drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 loader drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 menu drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 utils

Joshua@DESKTOP-SC7JE0M ~/newer/examples/loadiineelf $ ls -al src/fs total 53 drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 . drwxr-xr-x+ 1 Joshua None 0 Nov 28 17:09 .. -rwxr-xr-x 1 Joshua None 41219 Nov 28 17:09 fs.c -rwxr-xr-x 1 Joshua None 545 Nov 28 17:09 fs.h -rwxr-xr-x 1 Joshua None 1799 Nov 28 17:09 fs_functions.h

ghost commented 8 years ago

Also, building the regular loadiine in /installer works fine. WHen I load it up, I get the URL to the ELF. Which is probably a bad thing, meaning something is wrong within the ELF.

If worse comes to worse, I'll just ask you to compile the 5.5.0 ELF, but not the actual installer

EclipseSin commented 8 years ago

When launching the installer, are you accessing the html file directly? If not, that seems to happen. It use to display something about wrong URL i believe, or url could not be found.

ghost commented 8 years ago

No. /* Download file */ int ret = private_data->curl_easy_perform(curl); if(ret) OSFatal(url);

/* Do error checks */
if(!file.len) {
    OSFatal(url);
}

int resp = 404;
private_data->curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &resp);
if(resp != 200) {
    OSFatal(url);
}
dimok789 commented 8 years ago

Hmm it is weird. Your compiler is saying it can not find the path "/home/Joshua/newer/examples/loadiineelf/src/fs/fs.c".

As far as I remember cygwin does some crap about the drive leters of windows like /c/ for C: and /d/ for D:. I am not sure it has the /home/ path.

Maybe that is the problem?

Otherwise I would suggest you to just use the devkitPro MinGW (if you really want to use windows instead of a linux in a VM).

Do the following steps and it should be working (I tested it on my Windows machine):

  1. Launch devkitPro/msys/msys.bat
  2. Walk to the path of your sources (e.g. cd /d/loadiine/ -> for D:\loadiine)
  3. Type 'make'

Thats all. It should be working with this method.

Here is my log from MinGW with loadiine123213 being my checkout path (temporary checkout for test): dimok@DIMOK-LAPTOP ~ $ cd /d/loadiine_code/loadiine123213/

dimok@DIMOK-LAPTOP /d/loadiine_code/loadiine123213 $ make fs.c kernel_functions.c loader.c menu.c exception_handler.c logger.c rpx_sections.c socket.c strings.c utils.c xml.c kernel_hooks.S linking ... loadiine.elf

dimok@DIMOK-LAPTOP /d/loadiine_code/loadiine123213

IMPORTANT: No spaces allowed in the path!!!

ghost commented 8 years ago

It finally compiles, but I am still getting the URL printed in an OSFatal() on my screen. :/

ghost commented 8 years ago

Actually, nevermind. It goes to the Loadiine menu. I just commented out those annoying functions However, I try to install it and get "Invalid Elf", probably because linker.ld needs all of the addresses ported, correct?