public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Building the latest master GCC using msys2.
@ 2024-03-16 17:53 peter0x44
  2024-03-19  9:24 ` LIU Hao
  0 siblings, 1 reply; 3+ messages in thread
From: peter0x44 @ 2024-03-16 17:53 UTC (permalink / raw)
  To: gcc-help

Hi all,

I was trying to build the latest trunk gcc, using msys2, and I did it 
likeso:
I installed msys2, and then used `pacman -S base-devel` and `pacman -S 
mingw-w64-ucrt-x86_64-gcc`
I downloaded the gcc source and extracted it.

Here's my configure command:


../gcc-master/configure --host=x86_64-w64-mingw32 --enable-languages=c 
--disable-multilib --disable-bootstrap --with-sysroot=/ucrt64 
--enable-lto

the configure goes fine, but when I go to build, I get the following 
error mid-way through:
The directory (BUILD_SYSTEM_HEADER_DIR) that should contain system 
headers does not exist:
   /ucrt64/mingw/include

I tried without passing any sysroot, and with --sysroot=/mingw64.
There appears to be no directory named "mingw" present on the root.
There is only "mingw64", "mingw32", "ucrt64", etc.

Does anyone know what I'm doing wrong? Is there something I don't 
understand about the purpose of --with-sysroot?

Thanks,
Peter D.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building the latest master GCC using msys2.
  2024-03-16 17:53 Building the latest master GCC using msys2 peter0x44
@ 2024-03-19  9:24 ` LIU Hao
  2024-03-19 11:14   ` Peter0x44
  0 siblings, 1 reply; 3+ messages in thread
From: LIU Hao @ 2024-03-19  9:24 UTC (permalink / raw)
  To: peter0x44, gcc-help


[-- Attachment #1.1: Type: text/plain, Size: 1203 bytes --]

在 2024-03-17 01:53, peter0x44 via Gcc-help 写道:
> I tried without passing any sysroot, and with --sysroot=/mingw64.
> There appears to be no directory named "mingw" present on the root.
> There is only "mingw64", "mingw32", "ucrt64", etc.
> 
> Does anyone know what I'm doing wrong? Is there something I don't understand about the purpose of 
> --with-sysroot?

Please clone this repo:

   https://github.com/lhmouse/MINGW-packages/

and use these commands to build GCC:

   cd MINGW-packages/mingw-w64-gcc
   MINGW_ARCH=mingw64 makepkg-mingw


If you omit `MINGW_ARCH` it builds for all architectures. You may specify multiple architectures so 
they are built one by one, like

   MINGW_ARCH='mingw64 ucrt64' makepkg-mingw

---

If you need to build the master branch, change

   _branch=releases/gcc-13

to

   _branch=master


However some patches may no longer apply. You may need to cd into the `src` directory, apply those 
patches with `git am -3`, resolve any conflicts, commit the result with `git am --continue`, 
re-create patches with `git format-patch`, copy them back, then update checksums with `updpkgsums`...


-- 
Best regards,
LIU Hao


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building the latest master GCC using msys2.
  2024-03-19  9:24 ` LIU Hao
@ 2024-03-19 11:14   ` Peter0x44
  0 siblings, 0 replies; 3+ messages in thread
From: Peter0x44 @ 2024-03-19 11:14 UTC (permalink / raw)
  To: LIU Hao; +Cc: gcc-help

19 Mar 2024 9:24:58 am LIU Hao <lh_mouse@126.com>:

> 在 2024-03-17 01:53, peter0x44 via Gcc-help 写道:
>> I tried without passing any sysroot, and with --sysroot=/mingw64.
>> There appears to be no directory named "mingw" present on the root.
>> There is only "mingw64", "mingw32", "ucrt64", etc.
>> Does anyone know what I'm doing wrong? Is there something I don't 
>> understand about the purpose of --with-sysroot?
>
> Please clone this repo:
>
>    https://github.com/lhmouse/MINGW-packages/
>
> and use these commands to build GCC:
>
>    cd MINGW-packages/mingw-w64-gcc
>    MINGW_ARCH=mingw64 makepkg-mingw
>
>
> If you omit `MINGW_ARCH` it builds for all architectures. You may 
> specify multiple architectures so they are built one by one, like
>
>    MINGW_ARCH='mingw64 ucrt64' makepkg-mingw
>
> ---
>
> If you need to build the master branch, change
>
>    _branch=releases/gcc-13
>
> to
>
>    _branch=master
>
>
> However some patches may no longer apply. You may need to cd into the 
> `src` directory, apply those patches with `git am -3`, resolve any 
> conflicts, commit the result with `git am --continue`, re-create 
> patches with `git format-patch`, copy them back, then update checksums 
> with `updpkgsums`...
>
>
> --
> Best regards,
> LIU Hao
Hi,
Thanks for the reply.

I'm not interested in building a package, I just want to test some 
patches and submit them. Apparently, I need to symlink /mingw64 to /mingw 
to get past this error. I'd prefer not to go through makepkg or anything 
else, I need a setup for GCC development.

So, I don't think this solution is suitable for me, I can't be having to 
diff source and then add patches to the package manually.

I'll test with the symlink and report if it gives me any problems.

Best wishes,
Peter D.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-19 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-16 17:53 Building the latest master GCC using msys2 peter0x44
2024-03-19  9:24 ` LIU Hao
2024-03-19 11:14   ` Peter0x44

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).