-
-
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
Error when building: pcre2.h couldn't be found #18
Comments
It works fine with v0.6.0-alpha.8, but of course that doesn't use lighttpd1.4, which is the culprit. |
Hi @jacobmolby . The idea with pcre2 is that its source is included into the library package (you'll find it under A quick workaround is to build Lighttpd without pcre2, for that you can edit The root cause solution will be to dig into the library and lighttpd CMakeLists files (1, 2), and correct them. I myself probably only arrive to do it some week(s) later, as now all my time available for this project I spend on trying to make it work for Windows 😭 |
Thanks for the quick response! It seemed to work :D I also had to add homebrew to path, otherwise My full patch looks like this:
|
Edit: I found that I haven't increased the However I cannot seem to build with Android. I get this error:
I tried to add
But it doesn't seem to work. I get the same error regardless, I don't know if it is related to the issue on iOS |
@jacobmolby on Android it is a different issue. Set |
Yeah, I figured from Googling and remembering reading about in the docs :) Thanks. |
Haha. I feel your pain. Really I do. If you want to try running lighttpd native for _WIN32, see my win32-exp branch https://github.com/gstrauss/lighttpd1.4/tree/win32-exp |
Hi @gstrauss , glad to see you here :) I'll give it a try. Can you brief me, what is its state, are you aiming MinGW build with it, to what degree does it work already? So far, I've spend a bunch of time experimenting with my fork of the main branch, learning peculiarities of Universal Windows Platform on the way. Got an impression that building it with Cygwin and launching that in a dedicated process was the only way to go. It brings in some problems and limitations, but when I tried to edit the codebase to build it with MinGW the amount of changes I had to do was scary, and I surrendered when arrived to a need of changes related to file descriptors and pipes - due to lack of deep knowledge in how they work in Linux and on Windows, I realistically thought I won't be able to make it successfully (and also thought you are probably not interested to invest your time into it). |
lighttpd builds under cygwin and is available as an installable package from cygwin repositories. Most modules work. My experimental branch is a native _WIN32 port and can be built with autotools or CMake, using MINGW or Visual Studio. It passes the lighttpd test suite, so basic functionality is known to work. There is some support for translating UTF-8 to wide char for Windows filesystems, but more is probably needed. There may be other issues and limitations, as Windows is a very limiting platform and the experimental lighttpd _WIN32 native port has not been extensively tested. My experimental branch includes the ability to install lighttpd as a Windows service. There is not much documentation, but there are comments in the code. Feedback is appreciated, though keep in mind that the lighttpd _WIN32 port should not be considered a production platform. |
I posted some notes on https://wiki.lighttpd.net/DevelWin32
Yes, Windows is very different. Not better; different. And very often not better, IMNSHO. My lighttpd native _WIN32 port is "only" 2.5x (250%) slower serving static files than running on the same hardware on Linux, and upwards of 20x slower (2000%) running CGI, as Windows is so slow at process creation and process management.
I do not consider Windows a production platform on which I would personally run anything exposed to the internet, and so there is a limit to additional development time I might spend on _WIN32. Non-zero, but very low priority. As luck would have it, I was recently checkpointing my _WIN32 experiment and I also happened across this page in github search, so that's why I posted here. |
Hey @gstrauss , I gave it a try, and it works quite good for me :) I see your concerns, but for us, within this library, the use case and priorities are very different. At least how I see it, the main scenario is to run embed http server inside a mobile app, to serve static assets to the web browser embed into the same app. It helps using web app techs inside a mobile app, reusing codebases and libraries between websites and mobile apps, etc. Thus, the performance is not that important (essentially, the load on the server is 1 client - not hundreds / thousands / ...), advanced server capabilities are not that important for now, and probably it is not really exposed to network in most cases. The uniform behavior of basic server functionality across platforms is our main priority. So... on Windows we have to run it as a part of an Universal Windows Platform app, and because of artificial limitations imposed by UWP apps, we have to build it into a shared DLL library. Kind of similar to what I did before for Android and iOS, but with its own peculiarities. Although I should do more testing and stuff, it already seems I pulled it through, and already have a functional version of this library for Windows. The feedback I got so far for you:
|
There are additional limitations in UWP apps that I have not researched and have no plans to research. You may enlighten me if you would like to propose patches. I'll review submitted patches. I suspect lighttpd's expectation of std handles in a dll in a UWP app is resulting in the crash you see. In case my above statement was not sufficiently clear: this will not be fixed in my win32-exp branch unless someone else explains to me why this crashes and proposes an alternative. I have not set up an environment to test UWP apps and have no plans to do so. Regarding merging the code into lighttpd master branch, the limitation there is dependent on testing. Your independent testing helps, so thank you. Between now and the end of Q2, I may do a little bit more diddling with the windows service setup code, but nothing major is planned. If you have some more detailed concrete suggestions or prototypes for handling Can you help me to understand how this construct is not extendible for you with a
You might have to independently patch a few lines in |
P.S. I think _WIN32 is off-topic for the original post in this issue. Feel free to create a separate issue and to tag me. |
I pushed an (untested) change to my win32-exp branch to redefine |
Hey @jacobmolby , I've just released the new library version (v0.7.1). Presumably, it should fix your build problem, this thread was originally about. When you have a moment, can you check it, and confirm whether it works for you? |
Sorry to comment on a closed issue, but in case someone have the same problem as me (Xcode not able to find cmake event though it is installed), I had to manueally export the path, just like suggested here -> #18 (comment) @birdofpreyru If you need me to open a new issue to track this, tell me :) |
Hi @asurare , I'll only agree this is an issue with this library, if you confirm the Xcode itself is able to locate cmake without having its location in PATH (I mean, in some other build / build step, probably it looks up its path from some other environment variable, set by SDK, or whatever? — in such case I can update the library's build process to check that variable for possible cmake location). Otherwise, I'd say the problem is that you don't have cmake or homebrew installed correctly, to automatically have it added to PATH, and you should fix it not in the library, but appending its location to PATH in the start-up |
|
When building in Xcode I get the following error:
I'm running on a Mac with M2 chip.
CMake (and pcre2) is installed with Homebrew.
I would think it is an issue with Apple Sillicon, but I don't know.... I hope you can help :)
The text was updated successfully, but these errors were encountered: