-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
pcre2.h not found #40
Comments
I found this comment interesting. I tried again clearing all the caches and build folders and trying to build for device, but it still does not work. |
Pastebin deleted the output, here is it again:
|
I tried the workaround suggested in this comment but to no avail. |
what's baffling to me, is that on the first time I installed the package everything was working fine, it's only after I cleared the caches that I got this error... also important to note that on macOS pcre2 will probably already be there due to watchman:
I also added a sym link for cmake to make Xcode happy:
|
When building from the command line I don't "seem" to have the same issue, but compilation still fails:
|
Funny, after running build on the command line and trying again on xcode it seems like the dependency is correctly compiled but libPods still fails... so maybe it is really an issue of the environment on xcode I'm assuming on command line the brew environment with pcre2 is correctly linked and therefore it seems to work. Once compiled (.a is generated) then subsequent Xcode builds just take the generated artifact? Once I clear the build folder and try building from Xcode I get the same |
Hey @ospfranco , I don't have time to look into it carefully right now, though... the CMakeLists block that complains about not finding pcre2.h is this one: https://github.com/birdofpreyru/lighttpd1.4/blob/b50cd3698147d5d1d8a86fd4e5c934355d08d2f5/src/CMakeLists.txt#L534-L582. So, you may just add there some |
Thanks @birdofpreyru, yeah I figured that block some hours ago, but cmake is a bit of chinese to me. From a first look everything looks "correct" it tries to find But no idea why it reaches that point. I will continue to try to debug this. Thanks for the reply! |
Based on #23 (comment) add |
Well @marnowicki , if everybody works around the issue, we'll never figure out the root cause nor fix it :) |
Ok, so after fumbling around with architectures, I got a different set of linker errors with missing x86_64 symbols on PCRE2. I did not manage to solve this issue, but once I tried building for the real device it finally worked. So I guess this library cannot compiled? or at least on my project there is a hard requirement for Rosetta since some of the libraries I'm using are not arm64 compatible with the simulator. |
Hey @ospfranco , thanks for continuing with the troubleshooting, this is very helpful! The architectures issue I'll try to fix in the next release — it sounds like some CMake arguments / configuration should be added to PCRE2 configuration / compilation to force its build for multiple architectures, including x86_64, on macOS. Otherwise the build selects target architectures automatically, based on the other settings, and it sounds it selects it wrong. I actually was fixing something like this before already, but probably missed x86_64 or PCRE2 case. And what you figured out about linking of |
@ospfranco if you get to this faster than I do, can you try modifying this block: https://github.com/birdofpreyru/react-native-static-server/blob/458348a3e3345542a6092b83654dc1f7a9094248/dr-pogodin-react-native-static-server.podspec#L35-L43C9 , adding |
Today is a holiday, I actually took some time to figure this out because I found the problem interesting, but I can try it tomorrow! thanks for replying though! |
Wow! Not in Spain 😅 It is actually surprising to me — I looked in your profile you are based in Germany, and if I got it right the holiday is the Ascension Day? I can't believe there is a Christian feast which is bank holiday in Germany, but not in Spain 🤣 |
yeah :) europe is weird On another note, I find it super confusing why it worked the first time I installed the package but not on subsequent builds... pkg-config was not linked at the time and the app compiled just fine. |
@ospfranco Probably v0.7.11 fixes it, at least for me it now builds PCRE2 for both arm64 and x86_64 archs when building for the iPhone simulator. |
Seems to be working! great! As another point, the outputs should be specified, because right now lighttpd is being compiled every time the app is compiled. Thanks a lot for patching it! |
Cool! Yeah, outputs should be specified, I'll probably do it in the next release. Will track that separately as #41. |
|
@dagouzhi Local installation is never really the best idea :) Having the sources in the repo and compiling them makes sure the correct version and architecture will always work. The latest version is working for me without issues. Though having to link cmake and pkg-config is less than ideal, it's a compromise. |
Hi!
Thanks a lot for the package. When I installed the package a week ago everything worked perfectly the first time. I just tried onboarding a new team member and I got the following error on her machine:
I've fumbled around with env variables, brew env, clearing all possible caches (derived data, ios/build, pods) multiple times and nothing seemed to work.
I finally came back to my machine and did a complete clean (derived data, node_modules, pods) and now I'm facing the same issue. No matter what I try to clear and how I re-install the dependencies I face the same issue. The full log output.
I'm running this on:
macOS Ventura 13.3.1(a)
RN 0.71.8
"@dr.pogodin/react-native-static-server": "^0.7.10"
Any idea how to fix the issue?
The text was updated successfully, but these errors were encountered: