ReactNative-application.cmake links autolinked libraries to common_flags with the plain target_link_libraries signature, so a library that uses PRIVATE fails the app's CMake configure
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cmake, react-native
- 領域
- build-system
調査の方向性
ReactAndroid/cmake-utils/ReactNative-application.cmakeを開き、97行目(0.88.1)/ 108行目(nightly)付近のforeach(autolinked_library ...)ブロックと、その直下にある${APP_CODEGEN_TARGET}のリンクを見つけてください。どちらも、PRIVATE/PUBLICを使って自らをリンクするライブラリと競合する、単純な形式のtarget_link_librariesを使用しています。再現用リポジトリのmodules/keyword-linking/android/CMakeLists.txtを読んで失敗する組み合わせを確認し、編集前に構成エラーを確認するため、再現用リポジトリで./reproduce.shを実行してください。完了条件は、ループが一貫してキーワード形式のシグネチャを使用し、./gradlew :app:configureCMakeDebug[arm64-v8a]が終了コード0で終了することです。また、何もリンクしないライブラリ、または単純な形式でリンクするライブラリも引き続き構成できる必要があります。
索引モデルが issue の本文から書いたものです。
説明
Description
ReactNative-application.cmake links every autolinked library to common_flags with the plain signature:
foreach(autolinked_library ${AUTOLINKED_LIBRARIES})
target_link_libraries(${autolinked_library} common_flags)
endforeach()
CMake refuses to mix the plain and the keyword signatures on one target, so an autolinked library whose own CMakeLists.txt links its target with PRIVATE, PUBLIC or INTERFACE fails the configure of every app that installs it. The app-level codegen target is linked the same way (target_link_libraries(${APP_CODEGEN_TARGET} common_flags)).
Steps to reproduce
-
Clone the reproducer and run
./reproduce.sh(react-native 0.88.1) or./reproduce.sh nightly.ReproducerAppdepends on a local library,modules/keyword-linking, whosereact-native.config.jsgives AndroidlibraryName: 'keywordlinking'andcmakeListsPath: 'CMakeLists.txt', and whoseandroid/CMakeLists.txtis:add_library(react_codegen_keywordlinking SHARED keyword-linking.cpp) target_link_libraries(react_codegen_keywordlinking PRIVATE fbjni jsi reactnative) -
The script runs
npm install, then./gradlew :app:configureCMakeDebug[arm64-v8a] -PreactNativeArchitectures=arm64-v8ainReproducerApp/android.
Expected: the app's CMake build configures, as it does when the library drops PRIVATE.
Seen: the configure fails at ReactNative-application.cmake:97 on 0.88.1 and at :108 on 0.90.0-nightly-20261113-6d587e873. The script exits 1 while this shows and 0 once the configure passes.
React Native Version
0.88.1
Affected Platforms
Runtime - Android, Build - Windows
Output of npx @react-native-community/cli info
System:
OS: Windows 11 10.0.26300
CPU: "(32) x64 AMD Ryzen 9 9950X3D 16-Core Processor "
Binaries:
Node:
version: 26.12.1
npm:
version: 12.2.1
Languages:
Java:
version: 17.0.20.1
npmPackages:
"@react-native-community/cli":
installed: 20.2.0
wanted: 20.2.0
react:
installed: 19.3.0
wanted: 19.3.0
react-native:
installed: 0.88.1
wanted: 0.88.1
Android:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
react-native 0.90.0-nightly-20261113-6d587e873
$ ./gradlew :app:configureCMakeDebug[arm64-v8a] -PreactNativeArchitectures=arm64-v8a
gradle exit 1
C/C++: CMake Error at ReproducerApp/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:108 (target_link_libraries):
C/C++: The keyword signature for target_link_libraries has already been used with
C/C++: the target "react_codegen_keywordlinking". All uses of
C/C++: target_link_libraries with a target must be either all-keyword or
C/C++: all-plain.
C/C++: The uses of the keyword signature are here:
C/C++: * ReproducerApp/node_modules/keyword-linking/android/CMakeLists.txt:7 (target_link_libraries)
C/C++: Call Stack (most recent call first):
C/C++: CMakeLists.txt:31 (include)
SUMMARY: defect: the app's CMake configure fails, as ReactNative-application.cmake links react_codegen_keywordlinking with the plain signature and its own CMakeLists uses PRIVATE (react-native 0.90.0-nightly-20261113-6d587e873)
MANDATORY Reproducer
https://github.com/YevheniiKotyrlo/react-native-autolinked-keyword-link-signature
Screenshots and Videos
No response
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.5k
- 平均マージ
- 4日 47分
- マージ済み PR(30日)
- 217
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react/react-native のほかの issue
-
ConcreteShadowNode::getConcreteSharedProps() returns a reference to a temporary対応中かも @lazerg が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
react/react-native#59944 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
`yarn test-ios` exits before building RNTester: `objc-test.sh` launches the WebSocket server script #59433 deleted対応中かも @lazerg が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
react/react-native#59939 ·
メンテナーはふだん 2 日以内に返信
-
iOS Fabric pointer-handler reset leaves the next lone touch non-primary対応中かも @alleneubank が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
react/react-native#59919 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
react/react-native#59722 ·
メンテナーはふだん 2 日以内に返信
-
Android: new WebSocket() crashes the app for a URL that OkHttp or java.net.URI rejects対応中かも @sorinc03 が 11 日前に担当しました。 オープン🌐Networking Needs: Author Feedback Needs: Repro Platform: Android
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
react/react-native#59704 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
react/react-native の issue をすべて見る
似ている issue
-
Favicons are coolオープンenhancement frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
Spot Capacity Round Trips tests accept the two largest rising runs対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
intel/torch-xpu-ops#6197 ·
メンテナーはふだん 1 日以内に返信
-
project: hipblaslt
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ROCm/rocm-libraries#15746 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信