You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling an app that uses curl with musl+ldc+alpine results in a single working static (portable!) executable. However, std.net.curl does not work correctly because it attempts to load the dynamic library libcurl.so.
The main reason is that the check at this line fails, likely because dlopen does not work in static binaries, and thus the symbol is incorrectly not detected. I guess it works with static symbols on dynamic executable?
Incidentally, a simple program using etc.c.curl works because the symbols are present, as can be confirmed by analyzing the executable file.
Perhaps a different check should be used (e.g., __traits(compiles)?), but the entire structure would then need to be adjusted accordingly.
Compiling an app that uses curl with musl+ldc+alpine results in a single working static (portable!) executable. However, std.net.curl does not work correctly because it attempts to load the dynamic library libcurl.so.
The main reason is that the check at this line fails, likely because
dlopen
does not work in static binaries, and thus the symbol is incorrectly not detected. I guess it works with static symbols on dynamic executable?Incidentally, a simple program using
etc.c.curl
works because the symbols are present, as can be confirmed by analyzing the executable file.Perhaps a different check should be used (e.g., __traits(compiles)?), but the entire structure would then need to be adjusted accordingly.
Linked libs:
"-lcurl", "-lunistring", "-lbrotlicommon", "-lbrotlienc", "-licuuc", "-licudata", "-lcares_static", "-lnghttp2", "-lidn2", "-lpsl", "-lssl", "-lcrypto", "-lzstd", "-lbrotlidec", "-lz"
The text was updated successfully, but these errors were encountered: