TheOfficialFloW / VitaShell

Multi-functional file manager for PS Vita
GNU General Public License v3.0
1.4k stars 224 forks source link

Building issues #356

Closed cmsj closed 6 years ago

cmsj commented 6 years ago

I think the wiki page with the building instructions is missing at least one step now libarchive is being used, I did:

 * Download/unpack libarchive
 * cd build ; ./autogen.sh ; cd ..
 * ./configure --host=arm-vita-eabi --prefix=$VITASDK/arm-vita-eabi
 * make && make install

although after doing that, trying to make VitaShell I get:

$ make
[  1%] Building C object CMakeFiles/VitaShell.dir/main.c.obj
In file included from /Users/cmsj/hacking/scratch/VitaShell/main.c:19:0:
/Users/cmsj/hacking/scratch/VitaShell/main.h:47:10: fatal error: vitashell_user.h: No such file or directory
 #include <vitashell_user.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/VitaShell.dir/main.c.obj] Error 1
make[1]: *** [CMakeFiles/VitaShell.dir/all] Error 2
make: *** [all] Error 2
cmsj commented 6 years ago

@devnoname120 suggested on IRC that this was because the kernel/user modules aren't built automatically. I can get the kernel one to build as part of the main build process, but I'm not having much luck with the user module yet.

devnoname120 commented 6 years ago

@cmsj I think you only need the user module.

Have you tried add_subdirectory()? You'll also need to add user.suprx to ${res_files}, link the library, and add the user folder to include_directories().

cmsj commented 6 years ago

@devnoname120 I think building the user module depends on the kernel one having been both built and installed (it links with -lVitaShellKernel2_stub), similarly building VitaShell depends on the user module having been both built and installed. I did add_subdirectory(), but that just builds the modules AFAICT, it doesn't install them, so the user module still fails. I can build/install the user/kernel modules by hand I get their include/lib files in $VITASDK and the VitaShell build progresses, so this may just need the wiki to also say "build/install these two things first"

devnoname120 commented 6 years ago

I will do a pull request tomorrow if you're not in a hurry.

cmsj commented 6 years ago

@devnoname120 no hurry, just wanted to do some experiments in VitaShell's code. FWIW one other thing I noticed is warnings about implicit declarations of sceAppMgrGameDataMount and sceSysmoduleUnloadModuleInternalWithArg. At least the former of those was only added to vita-headers a few months ago and isn't present in the sdk I installed today.

cmsj commented 6 years ago

@TheOfficialFloW could you mention how you configured/built libarchive? With manual installs of the user/kernel modules, I can get pretty close to building VitaShell, but something is going wrong with libarchive.

cmsj commented 6 years ago

fwiw for libarchive I used ./configure CC=arm-vita-eabi-gcc --prefix=$VITASDK/arm-vita-eabi --host=arm-vita-eabi --disable-bsdtar --disable-bsdcat --disable-bsdcpio --without-xml2 but I hit a few POSIX related issues (no memory.h, and archive_write_disk_posix.c was a disaster of missing functions :)

TheOfficialFloW commented 6 years ago

I'll share my patch to libarchive after my finals.

devnoname120 commented 6 years ago

@cmsj The dependency issues should be fixed by https://github.com/TheOfficialFloW/VitaShell/pull/357/ I haven't been able to try though since libarchive is missing.

TheOfficialFloW commented 6 years ago

@cmsj voila: https://gist.github.com/TheOfficialFloW/cc46e7411739ef03d065ac025cd7e98c ./configure --prefix=/usr/local/vitasdk/arm-vita-eabi --host=arm-vita-eabi --disable-shared --enable-static --disable-bsdtar --disable-bsdcat --disable-bsdcpio --disable-acl

cmsj commented 6 years ago

@TheOfficialFloW thanks very much for that. Out of interest, did you have to do anything with libxml2? I can get libarchive and VitaShell to build only if I configure libarchive also with --without-xml2.

devnoname120 commented 6 years ago

@TheOfficialFloW It seems that Vitashell requires liblzma as well. Could you add it to vitasdk/packages? I've already added libarchive.

cmsj commented 6 years ago

(note that liblzma is covered by https://github.com/vitasdk/packages/pull/45 )

devnoname120 commented 6 years ago

Fixed by https://github.com/TheOfficialFloW/VitaShell/pull/359.

devnoname120 commented 6 years ago

@TheOfficialFloW Why did you close this issue? It's not fixed as you reverted my changes (without letting me know), and once by luck I stumbled on your revert commit and asked you what the issue is, you didn't even answer.

I would appreciate if you treated your contributors better, otherwise don't be surprised you don't receive as many contributions as you would like to.

TheOfficialFloW commented 6 years ago

@devnoname120 Because as I said it' too slow and it takes around 5 seconds for me and was annoying when doing alot of compilations. I've written it as a comment to your PR that's why I didn't answer your question. Sorry about not letting you know. And I closed this issue, because I've now written some instructions instead: https://github.com/TheOfficialFloW/VitaShell#for-developers If you could fix the long building process, I'd be very happy to merge it again.

quyen194 commented 6 years ago

https://github.com/TheOfficialFloW/VitaShell#for-developers @TheOfficialFloW What did you change in the instruction? I follow that and get compiling error. I have to apply patch of @devnoname120 to fix that

TheOfficialFloW commented 6 years ago

@quyen194 What error do you get?

quyen194 commented 6 years ago

@TheOfficialFloW I describe here: https://github.com/TheOfficialFloW/VitaShell/issues/365

TheOfficialFloW commented 6 years ago

Finally fixed in https://github.com/TheOfficialFloW/VitaShell/commit/b98ce6b46c821e78d3adb296ad2348d0b416a2b8