[jemalloc|vcpkg_configure_make] update and some script fixes#25009
[jemalloc|vcpkg_configure_make] update and some script fixes#25009JavierMatosD merged 20 commits intomicrosoft:masterfrom
Conversation
There was a problem hiding this comment.
You have modified or added at least one vcpkg.json where you should check the license field.
Details
If you feel able to do so, please consider adding a "license" field to the following files:
ports/jemalloc/vcpkg.json
Valid values for the license field can be found in the documentation
|
Current CI baseline: |
|
@BillyONeal: rsocket ICEd here. Please check the baseline. |
|
5e2d82e
| z_vcpkg_append_to_configure_environment(configure_env CPP_FOR_BUILD "compile ${VCPKG_DETECTED_CMAKE_C_COMPILER} -E") | ||
| z_vcpkg_append_to_configure_environment(configure_env CXX_FOR_BUILD "compile ${VCPKG_DETECTED_CMAKE_CXX_COMPILER}") | ||
| else() | ||
| # Silly trick to make configure accept CC_FOR_BUILD but in reallity CC_FOR_BUILD is deactivated. |
There was a problem hiding this comment.
I'm going to need more explanation on these lines. How does this trick work?
There was a problem hiding this comment.
configure wants the following:
a) a successful return code for the compile | true (true is a binary, same as false; available via msys on windows)
b) an output file. Depending on the test it either wants just an object file or an executable. (which is why there are two touch commands)
Be aware that the trick is already used in:
vcpkg/ports/gmp/portfile.cmake
Lines 40 to 44 in 6118049
I am just generalizing it here for all ports.
There was a problem hiding this comment.
the trick made gmp fail for me, but @Neumann-A was not able to replicate the issue.
For me the issue was that the executable was not a real working one (while CC_FOR_BUILD should create an executable that the host IS able to run)
There was a problem hiding this comment.
For me the issue was that the executable was not a real working one (while CC_FOR_BUILD should create an executable that the host IS able to run)
The question is did it pass configure but failed the build or did it fail configure? I had the issue that the build was failing in libx11 due to that but the real reason was that this PR deactivates implicit cross builds in vcpkg by design. So extra steps have to be taken to re-enable those explicitly. (e.g. by copying the required host artifacts in the buildtree for the target so that make thinks it already build those and doesn't even try to build them. )
There was a problem hiding this comment.
the script was not just checking the CC_FOR_BUILD returning true after trying to compile, but it even went on trying to run the simple executable produced, which failed with your trick
There was a problem hiding this comment.
Could be this one:
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
printf %s "checking for build system executable suffix... " >&6; }
if test ${gmp_cv_prog_exeext_for_build+y}
then :
printf %s "(cached) " >&6
else $as_nop
cat >conftest.c <<EOF
int
main ()
{
return 0;
}
EOF
for i in .exe ,ff8 ""; do
gmp_compile="$CC_FOR_BUILD conftest.c -o conftest$i"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
(eval $gmp_compile) 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if (./conftest) 2>&5; then
gmp_cv_prog_exeext_for_build=$i
break
fi
fi
done
rm -f conftest*
if test "${gmp_cv_prog_exeext_for_build+set}" != set; then
as_fn_error $? "Cannot determine executable suffix" "$LINENO" 5
fi
was the only check i found trying to run the output. since the name of the variable is gmp_cv_prog_exeext_for_build it seems to be specific to gmp. So setting gmp_cv_prog_exeext_for_build by hand should fix that.
There was a problem hiding this comment.
yes exactly. I was running on memory and didn't expect you to do the search work for me. Thanks for already finding it out
|
Ping @vicroms for review again. |
vicroms
left a comment
There was a problem hiding this comment.
LGTM but I'd like additional review @BillyONeal @ras0219-msft @dan-shaw @JavierMatosD
|
Are there any questions open regarding the |
BillyONeal
left a comment
There was a problem hiding this comment.
Thanks for explaining @Neumann-A
|
Thanks! |
lets rebuild the world ;)