Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error while running in RN 0.75 (newArchEnabled = true) #661

Closed
2 tasks done
anbumagan opened this issue Oct 24, 2024 · 6 comments · Fixed by #715
Closed
2 tasks done

CMake Error while running in RN 0.75 (newArchEnabled = true) #661

anbumagan opened this issue Oct 24, 2024 · 6 comments · Fixed by #715
Labels
bug Something isn't working

Comments

@anbumagan
Copy link

Description

CMake Error at /Users/kishore/Documents/NEWARCH/MyApp/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:138 (target_link_libraries): Cannot specify link libraries for target "react_codegen_RNTestlibSpec" which is not built by this project. Call Stack (most recent call first): CMakeLists.txt:31 (include) : com.android.ide.common.process.ProcessException: -- The C compiler identification is Clang 17.0.2 -- The CXX compiler identification is Clang 17.0.2 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Users/kishore/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Users/kishore/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring incomplete, errors occurred! See also "/Users/kishore/Documents/NEWARCH/MyApp/android/app/.cxx/Debug/3vw6c6w4/arm64-v8a/CMakeFiles/CMakeOutput.log".

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

Screenshot 2024-10-23 at 6 48 19 PM Screenshot 2024-10-23 at 6 48 26 PM Screenshot 2024-10-23 at 6 48 33 PM

Link to repro

Have created new react native library with above options

Environment

React Native

@anbumagan anbumagan added the bug Something isn't working label Oct 24, 2024
@anbumagan
Copy link
Author

Hi Team, Any updates on this ?

@atlj
Copy link
Collaborator

atlj commented Nov 15, 2024

Hey @anbumagan could you run npx react-native info and provide your environment?

@anbumagan
Copy link
Author

Here it is,

info Fetching system and libraries information...
System:
OS: macOS 15.1
CPU: (10) arm64 Apple M2 Pro
Memory: 130.91 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.12.2
path: /usr/local/bin/node
Yarn:
version: 3.6.4
path: /opt/homebrew/bin/yarn
npm:
version: 10.5.0
path: /usr/local/bin/npm
Watchman:
version: 2024.09.23.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.1
- iOS 18.1
- macOS 15.1
- tvOS 18.1
- visionOS 2.1
- watchOS 11.1
Android SDK:
API Levels:
- "31"
- "33"
- "34"
- "35"
Build Tools:
- 30.0.3
- 33.0.0
- 33.0.1
- 33.0.2
- 34.0.0
- 35.0.0
System Images:
- android-31 | Google TV ARM 64 v8a
- android-34 | Google TV ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-UpsideDownCakePrivacySandbox | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12483815
Xcode:
version: 16.1/16B40
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.12
path: /usr/bin/javac
Ruby:
version: 3.1.2
path: /Users/kishore/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.75.4
wanted: 0.75.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true

info React Native v0.76.2 is now available (your project is running on v0.75.4).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.2
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.75.4&to=0.76.2
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

@anbumagan
Copy link
Author

Hi @atlj Any updates on this?

@anbumagan
Copy link
Author

Hi @atlj Any updates on this issue ?

@satya164
Copy link
Member

satya164 commented Dec 4, 2024

it seems that there maybe an issue in react native's codegen script, or the docs are outdated. i have reached out to meta about this issue

satya164 added a commit that referenced this issue Dec 4, 2024
currently codegen doesn't generate all required files such as `Android.mk`, `CMakeLists.txt` etc. for fabric when type is set to `components`. so we use `all` for now until this bug is fixed.

closes #661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants