Closed ZoeLeee closed 1 year ago
Hey @ZoeLeee , can you get detailed logs from the failed build step (like that)? From what you posted so far, it is non-obvious, why exactly it failed for you.
i have the same problem, but cant click on the error message. if i click on the "Command PhaseScriptExecution failed with a nonzero exit code" i get nothing. event clicking on "open build log" does nothing
Hey guys, can you try again with v0.7.4, which I just released? For me iOS builds were also working in previous versions, but while working on v0.7.4 I found and fixed a subtle bug in CMake config, which caused PCRE2 and Lighttpd libraries being built only for a single architecture (effectively, for the first one in the list of target archs specified by Xcode). I wonder that was causing problems for you.
yes, it works for me. thanks :)
Awesome! :partying_face: Thanks for confirming, I'll close the issue then.
@birdofpreyru I found this issue happened again after upgraded to v0.7.5, you can reproduce it with example project.
And I just downgraded to 0.7.4, then can build the project without any issue
System:
OS: macOS 12.3.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 802.61 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.11.1 - ~/Programming/Javascript/node-16.11.1/bin/node
Yarn: 1.22.17 - ~/Programming/Javascript/node-16.11.1/bin/yarn
npm: 8.0.0 - ~/Programming/Javascript/node-16.11.1/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/kwan/.rvm/gems/ruby-3.0.0/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 31, 33, 33
Build Tools: 30.0.2, 33.0.2, 34.0.0
System Images: android-28 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-33 | Google APIs Intel x86_64 Atom
Android NDK: Not Found
IDEs:
Android Studio: Electric Eel 2022.1.1 Patch 2 Electric Eel 2022.1.1 Patch 2
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.7 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at CMakeLists.txt:1 (project):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning:
Ignoring extra path from command line:
"/Users/kwan/Programming/Javascript/react/react-native/react-native-static-server/pcre2"
CMake Error: The source directory "/Users/kwan/Programming/Javascript/react/react-native/react-native-static-server/pcre2" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Error: /Users/kwan/Library/Developer/Xcode/DerivedData/ReactNativeStaticServerExample-bdtrahgwvhpetqahjbuzcopsvdjn/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/dr-pogodin-react-native-static-server.build/pcre2 is not a directory
CMake Error at CMakeLists.txt:114 (add_subdirectory):
The source directory
/Users/kwan/Programming/Javascript/react/react-native/react-native-static-server/lighttpd1.4
does not contain a CMakeLists.txt file.
-- Configuring incomplete, errors occurred!
Command PhaseScriptExecution failed with a nonzero exit code
@owen800q I don't think I changed anything between v0.7.4 and v0.7.5 that could impact that part of the build; and also your logs read like PCRE2 and Lighttpd sources are just missing in the package. Can it be that v0.7.5 you tried to install directly from the Git repo, and you did not do git submodule update --init --recursive
, which is necessary in such scenario to get those sources?
@birdofpreyru yes, you are right, just because when I build the example project, missing running
git submodule update --init --recursive
ok now, thanks for your responsive feedback
Yeah... I should update the example's README to mention this step is needed, as the example is setup differently from a real-world project, to use the library code from the parent folder, rather than from node modules installed from NPM.
i have same issue when i have tried with example codes in this repo or useing v 0.15.1 in my project.
device: Apple M1 Pro os: macOS Sonoma 14.5 node: v20.13.1
The following build commands failed:
PhaseScriptExecution [CP-User]\ Build\ native\ dependencies /Users/samuel/Library/Developer/Xcode/DerivedData/ReactNativeStaticServerExample-ailikpjkujixsjbynkqoltdnpnvl/Build/Intermediates.noindex/Pods.build/Custom-iphoneos/dr-pogodin-react-native-static-server.build/Script-46EB2E00013A70.sh (in target 'dr-pogodin-react-native-static-server' from project 'Pods')
(1 failure)
There should be more specific error details somewhere in the log. Are you sure, it is not https://github.com/birdofpreyru/react-native-static-server/issues/111 you experience (the latest CMake v3.30.0 breaks library builds, because of a presumed regression on CMake side)?
There should be more specific error details somewhere in the log. Are you sure, it is not #111 you experience (the latest CMake v3.30.0 breaks library builds, because of a presumed regression on CMake side)?
Thanks yes it was cmake issue.