-
Notifications
You must be signed in to change notification settings - Fork 162
Open
Description
When compiling any PRX project using psp-cmake, the build fails with a missing _exit symbol during linking. In addition, if the .exp file is not manually copied to the build directory, the generation of exports.c fails due to Could not open file exports.exp.
Steps to Reproduce
- Clone pspsdk
git clone https://github.com/pspdev/pspsdk/
- Create any minimal PRX project (e.g., in pspsdk/src/samples/prx/testprx) with the following CMakeLists.txt:
cmake_minimum_required(VERSION 3.11)
project(testprx C)
add_prx_module(${PROJECT_NAME}
main.c
exports.exp
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.prx DESTINATION .)
- Run:
cd pspsdk/src/samples/prx/testprx
psp-cmake -Bbuild
cmake --build build
Output
[ 25%] Generating exports.c from exports.exp for target testprx
Could not open file exports.exp
[ 50%] Building C object CMakeFiles/testprx.dir/main.c.obj
[ 75%] Building C object CMakeFiles/testprx.dir/exports.c.obj
[100%] Linking C executable testprx
/root/pspdev/bin/../lib/gcc/psp/.../ld: warning: cannot find entry symbol module_start; defaulting to 00000000
/root/pspdev/bin/../lib/gcc/psp/15.1.1/../../../../psp/bin/ld: /root/pspdev/psp/lib/libc.a(libc_a-abort.o): in function `abort':
/home/runner/work/pspdev/pspdev/build/psptoolchain/build/psptoolchain-allegrex/build/newlib/build-psp/psp/newlib/../../../newlib/libc/stdlib/abort.c:59:(.text+0x10): undefined reference to `_exit'
collect2: error: ld returned 1 exit status
Note: copying exports.exp
to the build directory, or specifing the absolute path to it, fixes Could not open file exports.exp
.
Metadata
Metadata
Assignees
Labels
No labels