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

Builds for Android on Windows host, fail when using RN's New Arch; presumably due to bugs in RN itself #20

Open
charlyschulte opened this issue Mar 8, 2023 · 8 comments
Labels
On Hold Cannot be resolved at the moment. P2 Important issue. Windows -> Android Android builds on Windows host

Comments

@charlyschulte
Copy link

Thanks for your work. i tried building the library on windows/ android and first got the error "pcre2.h couldn't be found"
i also tried settings the "-DWITH_PCRE2=OFF" intro the build.gradle, but got the error "the command cc is wrongly typed or not found"

i have also tried running it in wsl, but no luck either.

Can you please help me?
thanks so much in advance

@birdofpreyru birdofpreyru added the P1 High priority issue. label Mar 8, 2023
@birdofpreyru
Copy link
Owner

Ogh... did it work before and broke in the last, v0.7.1 release? It sounds like I messed it up for Android builds on Windows in v0.7.1 when solving #18 for iOS 🤦‍♂️ Or... actually I have not tested Android builds on Windows at all, I do all my Android-target development on Ubuntu, so probably it was not working at all on Windows. I'll look into it eventually, but if you are up to try solving it yourself, I guess there are two problems: one that current CMakeList.txt in the library root, and inside Lighttpd source fail to correctly link Lighttpd against PCRE2 also build from source as a part of Android build — this you have worked around by setting -DWITH_PCRE2=OFF, and then inside Lighttpd CMakeLists.txt there is a block which aims to build "lemon" tool with the build host's compiler, to use it later during the build — sounds like it also does not quite work as intended on Windows.

@charlyschulte
Copy link
Author

First of all thanks for the fast response :)
i will try building the 0.7.0 version for android for now. the problem is i have near to zero knowlege about cmake and building these modules myself :D

But if i can help you in anyway, i can try to do so

@charlyschulte
Copy link
Author

charlyschulte commented Mar 8, 2023

update: i tried building with version 0.7.0 but got the same error but as you sad, it seems to have someting to do with "lemon"

@birdofpreyru birdofpreyru added the In Progress The issue is actively worked upon label Mar 13, 2023
birdofpreyru added a commit that referenced this issue Mar 13, 2023
to be tested / corrected for other build environments / targets
@birdofpreyru
Copy link
Owner

v0.7.2 (just released) solves the problem with PCRE2 linking, and, in general, fixes Android-targeting builds on Windows, when using the old React Native architecture.

The Android-targeting builds on Windows using the new RN architecture still fail, but I believe it is due to bugs in React Native itself. At least, I have found and reported (facebook/react-native#36475) one bug in the RN's codegen, but even if I fix that bug, the builds still fail later, due to some other issues in RN when doing Android builds on Windows host. Thus, I'll mark this issue On Hold for now, untill we can confirm the RN builds for Android with the new architecture work on Windows host in general.

@birdofpreyru birdofpreyru added On Hold Cannot be resolved at the moment. P2 Important issue. and removed In Progress The issue is actively worked upon P1 High priority issue. labels Mar 15, 2023
@birdofpreyru birdofpreyru changed the title Failed building on Windows / Android Builds for Android on Windows host, using RN's New Arch, fail, presumably due to bugs in RN itself Mar 15, 2023
@birdofpreyru birdofpreyru changed the title Builds for Android on Windows host, using RN's New Arch, fail, presumably due to bugs in RN itself Builds for Android on Windows host, fail when using RN's New Arch; presumably due to bugs in RN itself Mar 15, 2023
@andrewmunro
Copy link

This also failed for me on OSX. I fixed it by running brew install pcre2

@birdofpreyru
Copy link
Owner

Hey @andrewmunro , can you help me with log details on how it failed originally? This library includes source code of PCRE2, builds it as a part of the build process, and is supposed to link it into the app, which all works fine on my system. Thus, it should be me still missing something in the build configuration, which make it fail on your system.

@birdofpreyru
Copy link
Owner

It should be re-tested — presumably a few fixes in latest 0.72 RN releases fixed the issue.

@birdofpreyru
Copy link
Owner

It still does not work (see facebook/react-native#36475 (comment)).

@birdofpreyru birdofpreyru added the On Hold Cannot be resolved at the moment. label Nov 29, 2023
@birdofpreyru birdofpreyru added the Windows -> Android Android builds on Windows host label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Hold Cannot be resolved at the moment. P2 Important issue. Windows -> Android Android builds on Windows host
Projects
None yet
Development

No branches or pull requests

3 participants