devnoname120 / vhbb

Browse, download, and launch Vita homebrews!
https://vhbb.download/
Other
415 stars 39 forks source link

Complication error with latest VitaSDK #108

Closed Electric1447 closed 3 years ago

Electric1447 commented 3 years ago

The latest version fails to compile due to changes in sceSysmoduleLoadModuleInternalWithArg. You can see the change here. I have fixed this issue in EasyVPK but applying the same fix for vhbb makes it crash when installing any homebrew.

DvaMishkiLapa commented 3 years ago

Faced the same issue after fixing deprecated use of sceIoSyncByFd and missing strdup:

Scanning dependencies of target VitaHBBrowserUpdater.elf
[  1%] Building CXX object CMakeFiles/VitaHBBrowserUpdater.elf.dir/src_updater/updater.cpp.obj
/mnt/c/GitProjects/vhbb/src_updater/updater.cpp: In function 'char* strdup(const char*)':
/mnt/c/GitProjects/vhbb/src_updater/updater.cpp:44:26: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
   44 |     char* result = malloc(slen + 1);
      |                    ~~~~~~^~~~~~~~~~
      |                          |
      |                          void*
/mnt/c/GitProjects/vhbb/src_updater/updater.cpp: In function 'int loadScePaf()':
/mnt/c/GitProjects/vhbb/src_updater/updater.cpp:77:98: error: cannot convert 'uint32_t*' {aka 'unsigned int*'} to 'const SceSysmoduleOpt*'
   77 |     return sceSysmoduleLoadModuleInternalWithArg(SCE_SYSMODULE_INTERNAL_PAF, sizeof(argp), argp, buf);
      |                                                                                                  ^~~
      |                                                                                                  |
      |                                                                                                  uint32_t* {aka unsigned int*}
In file included from /mnt/c/GitProjects/vhbb/src_updater/updater.cpp:17:
/usr/local/vitasdk/arm-vita-eabi/include/psp2/sysmodule.h:222:125: note:   initializing argument 4 of 'int sceSysmoduleLoadModuleInternalWithArg(SceSysmoduleInternalModuleId, SceSize, void*, const SceSysmoduleOpt*)'
  222 | int sceSysmoduleLoadModuleInternalWithArg(SceSysmoduleInternalModuleId id, SceSize args, void *argp, const SceSysmoduleOpt *option);
      |                                                                                                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/mnt/c/GitProjects/vhbb/src_updater/updater.cpp: In function 'int unloadScePaf()':
/mnt/c/GitProjects/vhbb/src_updater/updater.cpp:83:92: error: cannot convert 'uint32_t*' {aka 'unsigned int*'} to 'const SceSysmoduleOpt*'
   83 |     return sceSysmoduleUnloadModuleInternalWithArg(SCE_SYSMODULE_INTERNAL_PAF, 0, nullptr, &buf);
      |                                                                                            ^~~~
      |                                                                                            |
      |                                                                                            uint32_t* {aka unsigned int*}
In file included from /mnt/c/GitProjects/vhbb/src_updater/updater.cpp:17:
/usr/local/vitasdk/arm-vita-eabi/include/psp2/sysmodule.h:234:127: note:   initializing argument 4 of 'int sceSysmoduleUnloadModuleInternalWithArg(SceSysmoduleInternalModuleId, SceSize, void*, const SceSysmoduleOpt*)'
  234 | int sceSysmoduleUnloadModuleInternalWithArg(SceSysmoduleInternalModuleId id, SceSize args, void *argp, const SceSysmoduleOpt *option);
      |                                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
make[2]: *** [CMakeFiles/VitaHBBrowserUpdater.elf.dir/build.make:76: CMakeFiles/VitaHBBrowserUpdater.elf.dir/src_updater/updater.cpp.obj] Ошибка 1
make[1]: *** [CMakeFiles/Makefile2:353: CMakeFiles/VitaHBBrowserUpdater.elf.dir/all] Ошибка 2
make: *** [Makefile:84: all] Ошибка 2
devnoname120 commented 3 years ago

Fixed on master. Untested though.