|
Worth knowing in detail — it took six commits to land properly and is a good example of the PSPSDK-version whack-a-mole this project deals with.
Root cause: pspmodulemgr_kernel.h (pulled in transitively by pspkernel.h, needed by menu.c/screenshot.c/utils.c) references a type SceLoadCoreExecFileInfo that, in newer PSPSDK, is only defined in psploadcore.h — a header not everyone includes first.
Attempts before the fix stuck (cbdb547 → 6a08954 → 6a284d7 → 375dd4b → ee19b37 → fa55883): the first attempts scattered a local stub typedef directly at the top of individual .c files — copy-pasted per file, worded slightly differently each time, sometimes a forward declaration, sometimes a stub struct, at one point flip-flopping on whether to include psploadcore.h directly instead.
Final, correct fix (fa55883): a single shared header, src/include/psp_compat.h:
/*
* Compatibility shim for newer PSPSDK versions.
* pspmodulemgr_kernel.h references SceLoadCoreExecFileInfo on line 51,
* but the Docker image's SDK does not define it in any header that's
* included before use. Include this header BEFORE any PSPSDK kernel headers.
*/
typedef struct { int _dummy; } SceLoadCoreExecFileInfo;
| Lesson |
|
If you hit a "PSPSDK header references an undefined type" error again, don't
re-invent a local stub in the .c file with the error — check psp_compat.h
first, and if the fix belongs there, add it there once rather than scattering copies.
This is exactly the mistake the project made (and fixed) before landing on the
shared-header approach.
|
|