PRX builds using psp-cmake fail with _exit linker error and missing exports.exp

オープン
#309 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
c, cmake
領域
build-system

調査の方向性

示されている CMakeLists.txt と psp-cmake のビルドコマンドを使用して、pspsdk/src/samples/prx/testprx の失敗を再現します。add_prx_module が exports.exp と PRX のリンク設定をどのように処理するかを調査します。exports.exp をコピーせず、未定義の _exit によるリンカーエラーも発生せずにプロジェクトをビルドできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

  1. Clone pspsdk
git clone https://github.com/pspdev/pspsdk/
  1. 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 .)
  1. 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.

主要言語
C
スター
1.2k
フォーク
190
平均マージ
1日 18時間
マージ済み PR(30日)
8

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pspdev/pspsdk のほかの issue

pspdev/pspsdk の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。