birdofpreyru / react-native-static-server

Embedded HTTP server for React Native
https://dr.pogodin.studio/docs/react-native-static-server
Other
142 stars 22 forks source link

cmake compile err when run on Windows develop Android app #39

Closed zhaoxuyll closed 1 year ago

zhaoxuyll commented 1 year ago

I development is Windows and run Android. when i exec npm run android command, compile error with not found .so file.

Error message:

C/C++: debug|arm64-v8a :CMake Error at .cxx/Debug/3f6r5l63/arm64-v8a/pcre2/cmake_install.cmake:54 (file):
C/C++: debug|arm64-v8a :  file INSTALL cannot find
C/C++: debug|arm64-v8a :  "C:/Users/zhaox/Workspace/Ebook-Render/ebook-reader/node_modules/@dr.pogodin/react-native-static-server/android/.cxx/Debug/3f6r5l63/arm64-v8a/pcre2/libpcre2-8.so":
C/C++: debug|arm64-v8a :  File exists.
C/C++: debug|arm64-v8a :CMake Error at CMakeLists.txt:102 (file):
C/C++: debug|arm64-v8a :  file COPY cannot find
C/C++: debug|arm64-v8a :  "C:/Users/zhaox/Workspace/Ebook-Render/ebook-reader/node_modules/@dr.pogodin/react-native-static-server/android/.cxx/Debug/3f6r5l63/arm64-v8a/sysroot/lib/libpcre2-8.so":
C/C++: debug|arm64-v8a :  File exists.
C/C++: debug|arm64-v8a :CMake Error at lighttpd1.4/src/CMakeLists.txt:578 (message):
C/C++: debug|arm64-v8a :  pcre2.h couldn't be found

Environment:

buildToolsVersion '28.0.3'
Windows 11
"@dr.pogodin/react-native-static-server": "^0.7.10"
birdofpreyru commented 1 year ago

It reads like PCRE2 build failed before that, thus it fails to find its artifacts on the next step. I just checked, it does not happen to me when I do Android build on Windows 10 host, aiming for the old React Native architecture. Please, look for earlier error in logs related to the PCRE2 build; also check if you can find any libpcre2-8.so file inside C:/Users/zhaox/Workspace/Ebook-Render/ebook-reader/node_modules/@dr.pogodin/react-native-static-server/android/.cxx/Debug/3f6r5l63 — it can be that the problem is it just misses to build PCRE2 for the needed architecture.

zhaoxuyll commented 1 year ago

thanks you, probably my environmental problem.