-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Request] cURL compile-time option #16
Comments
As far as I know in order for the code to be statically linked to another dll/executable which uses it, nothing would need to change except the CMakeLists file. love already uses the unmodified code with its own build system to compile it into the rest of love's library (which itself is statically linked to the main executable on some platforms), for example. |
Hm, I see. Although looking again, the init of the cURL struct does try to load the symbols from the DLL or shared library. If it can't load a handle from one of those, it will not load symbols. |
I think she meant this part of the code. lua-https/src/generic/CurlClient.cpp Lines 39 to 82 in 9611092
Currently we're loading cURL dynamically so users doesn't have to install cURL for lua-https to work, in which case it will fall back to OpenSSL on Linux. |
Is (I know there's a |
No, |
So it's much more likely to be supported on limited platforms compared to |
Gotcha, but official comment from the homebrew toolchain maintainers is that |
Whilst working on an OpenSSL3 backend, I once again had to duplicate the code to load symbols, and I thought of a solution that might work for you as well: Instead of having 3 or 4 ad-hoc implementations of library loading ( I've got a some of this work done already, in my local tree. |
That's great idea. What do you think @TurtleP? |
Only question I have is if this requires dlsym, etc to exist. On the platforms I am working on (3DS, Switch, and Wii U) |
The bartbes's idea is basically abstracting away that In your platform, you can implement Note that the name |
Seems reasonable, although I would prefer that upstream (this repo) be able to just set that up for me, rather than me needing to patch lua-https for static linking. This way I can set an option and be done. |
Well, we can't do that because we don't really know how your platform behaves (and we don't have the toolchain and hardware to test it), so it's up to you to implement them. |
Heya,
I spoke with @MikuAuahDark briefly about this on Discord. It would be nice if lua-https could be statically compiled instead of dynamically linked. It makes it a hassle to update my fork for homebrew usage. I'm hoping I can make a pull request at some point, but I'm not great at dealing with fixing something like this, unless I use a ton of
#ifdef
markings which can look ugly.Statically linking would let me at least only need to update the config.h file (and rename main.cpp to https.cpp to not conflict names just as a safety measure).
The text was updated successfully, but these errors were encountered: