From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C760C3858D33; Sun, 27 Aug 2023 11:54:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C760C3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693137267; bh=cC0xLgoXKE66p7JCBM7LKPKYlbtq37ChfSZ2cAzgn/s=; h=From:To:Subject:Date:From; b=EFB5SxNv9IVCF2Bhhpfe7pWrUDr2okIYqQlIo/Q1bkE/BdcHOgWl+3i8JnOGOXmQr +ED+2pnxO8fwjko3Fapg7RFPMz7Hp/Fs+oix30oIHt5xtdCzUstLv3K3/MPoGoNte0 d1e9jjKFIhgzlATB9uMisAfYIrGTPEWyvkvZgLlA= From: "jdx at o2 dot pl" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111170] New: Malformed manifest does not allow to run gcc on Windows XP (Accessing a corrupted shared library) Date: Sun, 27 Aug 2023 11:54:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jdx at o2 dot pl X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget cf_gccbuild Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111170 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 mach= ine, I got "bash: ./mingw-gcc/bin/gcc: Accessing a corrupted shared library". Af= ter 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 m= ore forgiving and can tolerate malformed manifests while Windows XP is not; tha= t's why I could run freshly built gcc on my Windows 10 box. Using a resource ed= itor 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=3Dgcc.git;h=3Dd11e088210a551235d3937f8= 67ee1c8b19d02290 related to PR108865. I think the proper solution is to merge default manife= st from MSYS and the one mentioned in the diff above.=