Open voltagex opened 1 year ago
Setting curl=2
in the .ini doesn't appear to fix this
It seems that the issue is not related to the curl or mabs project. The config.log file has multiple errors with gcc.exe: fatal error: no input files
message. So, something probably removed the source file, like conftest.c. It is generated temporarily by configure script.
Can anyone check if excludinga the media-autobuild_suite project directory or the local64 directory in Windows Defender (or in any antivirus program) fixes the issue?
@Biswa96 I temporarily turned off real time protection in Defender before trying this build.
I reverted https://github.com/curl/curl/pull/11120 and it allowed curl to build. I haven't looked at what went wrong there yet or the reason for the change, so I don't have any suggestions on what would fix both our issue and the original reason for that PR.
I've compiled curl with the same configure options from OP's log file in msys2/mingw-w64. It worked fine.
Setting
curl=2
in the .ini doesn't appear to fix this
Me too. Perhaps it's as a dependency lib being built.
I've compiled curl with the same configure options from OP's log file in msys2/mingw-w64. It worked fine.
There is also the CPPFLAGS var being passed to configure by media-suite_compile.sh:
CPPFLAGS+=" -DGNUTLS_INTERNAL_BUILD -DNGHTTP2_STATICLIB -DPSL_STATIC"
Without that, the configure script finishes fine for me as well, but died with the same error as above when I prefaced configure with it as is done in media-suite_compile.sh. I may know what's going on, but I'll poke at it tomorrow after some much needed sleep.
** edit: Figured it out. It was broken even without the CPPFLAGS, but in a less obvious way. I'll post a patch after my test build finishes.
Okay, the build seems to have completed fine...
It turned out to be a var quoting issue that didn't really show up unless the value of CC and/or LD_LIBRARY_PATH contained a space. When "CC=ccache gcc", for example, CC just gets set to "ccache", which obviously would break the tests using this wrapper. Quoting those values properly in the run-compiler script (or really in the creation of those lines for the script) allows the vars to be set properly and all works fine.
Note that I also tweaked the LD_LIBRARY_PATH override, since if it had no value prior and CURL_LIBRARY_PATH was also empty, it would assign just ":" which caused a problem while I was testing a different issue unrelated to this. Lastly, I re-exported the restored LD_LIBRARY_PATH after the test run to ensure that it's properly restored globally (this was more of a "just to be safe"; never saw an obvious issue before doing this, but I wasn't looking for one and it seemed prudent to formally undo the previous export).
See if this makes sense and works for you and if so, feel free to submit it to the curl folks if I don't get to it before you do.
diff --git a/configure.ac b/configure.ac
index 75a882b12..9a522e917 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,8 +193,8 @@ dnl something different but only have that affect the execution of the results
dnl of the compile, not change the libraries for the compiler itself.
dnl
compilersh="run-compiler"
-echo "CC=$CC" > $compilersh
-echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $compilersh
+echo "CC='$CC'" > $compilersh
+echo "LD_LIBRARY_PATH='$LD_LIBRARY_PATH'" >> $compilersh
echo 'exec $CC $@' >> $compilersh
dnl **********************************************************************
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index bd2ebbd01..08ac10e10 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -5869,10 +5869,15 @@ AC_DEFUN([CURL_RUN_IFELSE], [
oldcc=$CC
old=$LD_LIBRARY_PATH
CC="sh ./run-compiler"
- LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+ if test -z "$LD_LIBRARY_PATH"; then
+ LD_LIBRARY_PATH=$CURL_LIBRARY_PATH
+ else
+ LD_LIBRARY_PATH="$CURL_LIBRARY_PATH:$old"
+ fi
export LD_LIBRARY_PATH
AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
LD_LIBRARY_PATH=$old # restore
+ export LD_LIBRARY_PATH
CC=$oldcc
;;
esac
a query: how to apply those diffs as a patch in media-suite_compile.sh
?
_edit: ok, I put a temporary copy of the patch at this point in media-suite_compile.sh
and it seemed to build._
case $curl in
libressl|openssl)
extra_opts+=(--with-{nghttp2,openssl} --without-{gnutls,mbedtls})
;;
mbedtls) extra_opts+=(--with-{mbedtls,nghttp2} --without-openssl) ;;
gnutls) extra_opts+=(--with-gnutls --without-{nghttp2,mbedtls,openssl}) ;;
*) extra_opts+=(--with-{schannel,winidn,nghttp2} --without-{gnutls,mbedtls,openssl});;
esac
do_patch "https://raw.githubusercontent.com/hydra3333/h3333_python_cross_compile_script_v100/master/patches/mabs_curl/mabs_curl.patch"
[[ ! -f configure || configure.ac -nt configure ]] &&
do_autoreconf
[[ $curl = openssl ]] && hide_libressl
Do you guys still see this issue even after https://github.com/curl/curl/commit/471dab2da0c6b2b08ca2b96a1da0a4825e2c3c36, https://github.com/curl/curl/commit/c4a019603b82a08c3572591a9393df0818ee02f6, and https://github.com/curl/curl/commit/5a023938fa5ed444074c78dc345c7c987e570a55? I haven't been able to reproduce this anytime recent
logs.zip Building from 663087e596f4fe2ddab9031a7ca602d1f5485f0c