[Bug target/111170] New: Malformed manifest does not allow to run gcc on Windows XP (Accessing a corrupted shared library)
jdx at o2 dot pl
gcc-bugzilla@gcc.gnu.org
Sun Aug 27 11:54:27 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111170
Bug ID: 111170
Summary: Malformed manifest does not allow to run gcc on
Windows XP (Accessing a corrupted shared library)
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: jdx at o2 dot pl
CC: costas.argyris at gmail dot com
Target Milestone: ---
Target: i686-w64-mingw32 @ Windows XP
Build: i686-w64-mingw32 @ Windows 10
I wanted to build gcc 13.2 with intention to run it on an old Windows
XP/Pentium-M machine. My build environment is MSYS2/MinGW32 @ Windows 10.
Everything went fine and I could run resulting binaries on the build machine
under MinGW32 terminal. However when I tried to run them on the target machine,
I got "bash: ./mingw-gcc/bin/gcc: Accessing a corrupted shared library". After
a few days of heavy fight I found out that this is due to malformed manifest
embedded in some (not all!) gcc executables. Newer version of Windows are more
forgiving and can tolerate malformed manifests while Windows XP is not; that's
why I could run freshly built gcc on my Windows 10 box. Using a resource editor
I have replaced malformed manifests with a default one (taken from
https://packages.msys2.org/base/mingw-w64-windows-default-manifest) and now
everything runs fine on XP.
The malformed manifest comes from
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=d11e088210a551235d3937f867ee1c8b19d02290
related to PR108865. I think the proper solution is to merge default manifest
from MSYS and the one mentioned in the diff above.
More information about the Gcc-bugs
mailing list