vitasdk / vdpm

SDK installer and package "manager" for $VITASDK
GNU Lesser General Public License v2.1
222 stars 62 forks source link

Building enso from source fails at kernal.c #66

Open veerpandya opened 3 years ago

veerpandya commented 3 years ago

I'm trying to build henkaku enso from source and running make keeps giving me this error:

[  4%] Building C object CMakeFiles/emmc_helper.dir/src/kernel.c.obj
In file included from /Users/kou/Downloads/enso-1.1/installer/src/kernel.c:10:
/usr/local/vitasdk/arm-vita-eabi/include/libk/stdarg.h:17:25: error: conflicting types for 'va_list'
   17 | typedef _PDCLIB_va_list va_list;
      |                         ^~~~~~~
In file included from /usr/local/vitasdk/arm-vita-eabi/include/psp2kern/kernel/debug.h:12,
                 from /usr/local/vitasdk/arm-vita-eabi/include/psp2kern/kernel/sysmem.h:10,
                 from /Users/kou/Downloads/enso-1.1/installer/src/kernel.c:5:
/usr/local/vitasdk/lib/gcc/arm-vita-eabi/10.1.0/include/stdarg.h:99:24: note: previous declaration of 'va_list' was here
   99 | typedef __gnuc_va_list va_list;
      |                        ^~~~~~~
make[2]: *** [CMakeFiles/emmc_helper.dir/src/kernel.c.obj] Error 1
make[1]: *** [CMakeFiles/emmc_helper.dir/all] Error 2
make: *** [all] Error 2

I'm not sure if this is the right place to post this issue, but it seems to be some kind of naming issue with the va_list in the different kernal.c files. Any help would be greatly appreciated!

Princess-of-Sleeping commented 3 years ago

Currently confirming this issue.

Princess-of-Sleeping commented 3 years ago

If you want to fix it temporarily, do as follows

first, do vitasdk-update

vvv second, add patch vvv kernel.c line 10

+ #include <psp2kern/kernel/sysclib.h>
+ /*
  #include <libk/stdarg.h>
  #include <libk/string.h>
  #include <libk/stdio.h>
+ */

main.c line 12

  #include <psp2/io/stat.h>
+ #include <psp2/update.h>
  #include <taihen.h>

main.c line 26

  int _vshSblAimgrGetConsoleId(char cid[32]);
- int sceSblSsUpdateMgrSetBootMode(int x);
  int vshPowerRequestColdReset(void);
veerpandya commented 3 years ago

This fixed it, thanks so much!

veerpandya commented 3 years ago

Oh actually, so the build went through fine, but when I tried to install enso from the installer on my vita it gave me this error:

Failed to load kernel workaround:  0x80010002

Also I should add, the logo wasn't showing on the enso app in my Vita, it was just a white bubble. Not sure if this is a related issue.

veerpandya commented 3 years ago

I've unzipped the enso_installer.vpk and it's only showing eboot.bin and the sce_sys folder. The released version of enso has a kernel2.skprx, along with two emmc_helper files and the fat.bin. My installer is also missing the icon.png, bg.png, and template.xml files, which explains why the app didn't show the logo on my vita. I'm guessing this is an issue with my make or cmake command? I didn't get any errors when running them and I'm using cmake v2.8.12.2. I'm fairly new to vita development so it's very possible that I'm overlooking something.

veerpandya commented 3 years ago

Ok I just manually added the missing files from the build folder to the new enso_installer.vpk and it worked perfectly. Not sure why make didn't add it, but the issue I had originally is definitely fixed. Thanks again!