Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

Not a valid application error on windows

Open barche opened this issue 1 year ago • 5 comments

On PR's #2339 and #7899 the executables or DLL for Windows result in "not a valid Win32 application" errors. The problem comes from the libgcc.a, libgcc_s.a and libmsvcrt.a that is placed in /workspace/destdir/lib by CompilerSupportLibraries_jll. I'm not sure under which circumstances it is triggered (it seems quite rare), but when this occurs removing these files solves the problem.

barche avatar Jan 04 '24 09:01 barche

AFAICT, the location of the offending libraries depends on the Julia version. For the moment, it is

  • no libraries for Julia <= 1.8
  • $prefix/lib/ for Julia 1.9 and 1.10
  • $prefix/lib/gcc/<triple>/<major>/ for Julia >= 1.11 where <triple> is the usual BB triplet (e.g., x86_64-w64-mingw32) and <major> is the GCC compiler major version (e.g., 13) (see also #7535).

sloede avatar Jan 04 '24 18:01 sloede

So this should be fixed for Julia >= 1.11 I think, since we now hide those .a files in subfolders

vtjnash avatar Feb 09 '24 01:02 vtjnash

I'm not entirely sure, but I believe https://github.com/JuliaPackaging/Yggdrasil/blob/d4808d4916dab74e6ec758d54e3bef9bbf699de7/S/SDPA/build_tarballs.jl#L67-L69 was used to work around this problem. Maybe @blegat can confirm.

giordano avatar Feb 25 '24 19:02 giordano

That doesn't appear to have worked around the issue because we're now hitting this: https://github.com/jump-dev/SDPA.jl/pull/57

odow avatar Mar 07 '24 07:03 odow

Just confirming that https://github.com/JuliaPackaging/Yggdrasil/pull/8249 fixed this for SDPA.

https://github.com/jump-dev/SDPA.jl/actions/runs/8197171105/job/22418710526?pr=61

odow avatar Mar 08 '24 01:03 odow