File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -504,12 +504,19 @@ jobs:
504504 # causing MinGW binutils not to be found (while other binutils
505505 # pre-installed in the GHA images may be found instead), which in turn
506506 # causes the DLL extracting functions to silently fail.
507+ # [2025-10] Setting this PATH here is also required because at some
508+ # point opam started pushing the i686 mingw path unconditionally to the
509+ # beginning of PATH, including for 64-bit only builds (this _may_ be
510+ # due to setup-ocaml setting up 32-bit build environment by default),
511+ # which caused the DLL extracting functions to find 32-bit DLLs (that
512+ # don't work with a 64-bit executable). The functions below must use
513+ # this PATH and not the one provided by `opam env`.
507514 export PATH="/usr/${{ steps.vars.outputs.MinGW_ARCH }}-w64-mingw32/bin":"/usr/${{ steps.vars.outputs.MinGW_ARCH }}-w64-mingw32/sys-root/mingw/bin":${PATH}
508515 ## package artifact(s)
509516 PKG_DIR='${{ steps.vars.outputs.PKG_DIR }}'
510517 # collect any needed dlls/libraries
511518 # dlls
512- dll_refs() { eval "$(opam env)" ; objdump -x "$@" | grep -Po "\S+[.]dll$" | xargs -I{} 2>/dev/null which "{}" | sort -u ; }
519+ dll_refs() { objdump -x "$@" | grep -Po "\S+[.]dll$" | xargs -I{} 2>/dev/null which "{}" | sort -u ; }
513520 filtered_dll_refs() { list="$(dll_refs "$@" | grep -vF "$(cygpath ${WINDIR})" | perl -lape '$_ = qq/@{[sort @F]}/')" ; echo "$list" ; }
514521 recursive_filtered_dll_refs() { list="$(filtered_dll_refs "$@")" ; n=0 ; while [ $n -lt $(echo "$list" | wc -l) ]; do n=$(echo "$list" | wc -l) ; list="$(filtered_dll_refs $list)" ; done ; echo "$list" ; }
515522 IFS=$'\n' DLL_list=( "$(recursive_filtered_dll_refs "${PKG_DIR}"/bin/*)" )
You can’t perform that action at this time.
0 commit comments