Closed Semphriss closed 1 day ago
This is an old curl bug that makes it incompatible with GCC 14 and later. It's already been fixed in curl 8.8.0 (see curl commit b65f0e04). You can work around it in older releases by adding -fpermissive to CFLAGS. This is like the -fcommon thing a few years back. Your system cross compiler is an older GCC, so there was no problem.
The Autoconf feature test is, as is often the case, silently broken and so it drew the wrong conclusions, assuming the test failed due to a missing feature rather than that the test had undefined behavior.
Edit: https://github.com/curl/curl/commit/b65f0e04b90b37882c731f448a36812ac84e6472
While the details are still loaded in my mind, I'm unsure of your goal because you're just copying the libcurl-4.dll
and nothing else — headers, pkg-config .pc
, curl-config
, import library, nor even curl.exe
— which by itself doesn't seem terribly useful. Currently I think busybox-w32 wget
does a fine enough job, but if I were adding a curl
command to w64dk I'd skip the install target, and therefore --prefix
, and do this:
WORKDIR /curl-$CURL_VERSION
RUN ./configure \
--host=$ARCH \
--disable-shared \
--with-schannel \
CFLAGS="-Os" \
LDFLAGS="-s" \
&& make -j$(nproc) \
&& cp src/curl.exe $PREFIX/bin/
Builds in place and then manually copies the distributed artifact into place (much like GDB and others). The --disable-shared
produces a standalone curl
program, no libcurl-4.dll
needed.
Thanks for the extra info! I'll give it a try whenever I can.
As for why I do this, I'm only including it because it's one of Git's few mandatory dependencies. I'm keeping it as a shared library because Git creates a bunch of executables, and copying libcurl entirely in each of those executables would be space-hungry. I'm not using the command or developing against libcurl with w64devkit, so I'm not keeping the extras. I've omitted all that in this issue to keep the reproduction steps as minimal as possible, but indeed, without those details, my intentions may look strange :)
I've tested it and it works, thanks! I'll close this as a non-bug, since the issue was with curl.
I'm trying to add cURL in the Dockerfile, but compiling results in the compilation complaining that it can't find any non-blocking method.
Using the same command on my host OS (Ubuntu 22.04), cURL compiles properly, which leads me to believe the issue is specific to w64devkit.
I'm not familiar with the fine details of what w64devkit supports or not, but does this ring any bell about a particular setting, issue or missing tool? I realize fixing the whole thing might be more complicated than what's generally acceptable in a GitHub issue, but I thought I'd ask in case it turns out to be something simple.
Edit: I've tested the same thing based on w64devkit 1.22.0 and it works, so it appears to be a regression.
My changes and the logs:
Addition to the Dockerfile
Right above "Packing up a release":
Uses version 8.7.1, downloaded from
https://curl.se/download/curl-$CURL_VERSION.tar.bz2
, sha25605bbd2b698e9cfbab477c33aa5e99b4975501835a41b7ca6ca71de03d8849e76
.Result in Docker
The
configure
will run fine, but themake
will error with:Output of
configure
:Result on host
Output of
configure
:Difference between the outputs of configure