public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "brechtsanders at users dot sourceforge.net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug pch/105858] MinGW-w64 64-bit build with --libstdcxx-pch: fatal error: cannot write PCH file: required memory segment unavailable Date: Sun, 04 Sep 2022 13:53:26 +0000 [thread overview] Message-ID: <bug-105858-4-1w6U7NYJYT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105858-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105858 --- Comment #5 from Brecht Sanders <brechtsanders at users dot sourceforge.net> --- I believe this is issue is cause by the fact that mmap is missing on Windows. In gcc/ggc-common.cc this causes use of default_gt_pch_get_address() as HOST_HOOKS_GT_PCH_GET_ADDRESS which just returns NULL resulting in "cannot write PCH file: required memory segment unavailable". Though mmap doesn't exist, it isn't that hard to emulate, as can be seen in https://github.com/alitrack/mman-win32 , so maybe some code is needed to use the Windows memory mapping mechanism. I did try to build against https://github.com/alitrack/mman-win32, but I ran into the issue that this requires linking with the library mman-win32, but passing it to LDFLAGS doesn't work as it's not near the end of the linker command and link order is important on Windows/MinGW.
next prev parent reply other threads:[~2022-09-04 13:53 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-05 19:13 [Bug c/105858] New: " brechtsanders at users dot sourceforge.net 2022-07-04 9:18 ` [Bug pch/105858] " brechtsanders at users dot sourceforge.net 2022-07-25 9:32 ` brechtsanders at users dot sourceforge.net 2022-08-06 10:02 ` brechtsanders at users dot sourceforge.net 2022-09-04 7:58 ` brechtsanders at users dot sourceforge.net 2022-09-04 13:53 ` brechtsanders at users dot sourceforge.net [this message] 2022-12-24 1:56 ` egor.pugin at gmail dot com 2022-12-26 15:02 ` brechtsanders at users dot sourceforge.net 2022-12-30 13:26 ` brechtsanders at users dot sourceforge.net
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105858-4-1w6U7NYJYT@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).