Looking to make a GDC-12 mingw64 package

Preetpal preetpal.sohal at gmail.com
Fri Sep 2 04:34:20 UTC 2022


On Saturday, 21 May 2022 at 21:23:52 UTC, Adam D Ruppe wrote:
> On Saturday, 21 May 2022 at 21:18:15 UTC, Chris Piker wrote:
>>   1. Anyone has built gdc-11 in the mingw64 environment since 
>> it seems a few patches are required?
>
> No patches are required, it is all upstreamed if you use the 
> right settings.
>
> See my comment here:
>
> https://github.com/brechtsanders/winlibs_mingw/issues/48#issuecomment-1044782237
>
>
> (the maintainer of that repo wants to do binary packages but 
> with pthreads, which has some missing headers. should be an 
> easy patch but i haven't gotten around to it and i guess iain 
> hasn't yet either. but with the configure command i pasted 
> there you can do it)
>
>>   2. How we might go about creating a pacman package for 
>> gdc-12 since it requires an existing D compiler?
>
> i don't know anything about this.

I had issues trying to replicate the build process as per your 
[comment](https://github.com/brechtsanders/winlibs_mingw/issues/48#issuecomment-1044782237).

The first issue was that the git tag you said you checked out 
(*releases/gcc-11.2*) did not exist. That was easily solved with 
the following command: `git checkout releases/gcc-11.2.0` (did 
they change their release tags?)

The second issue was that the compilation of GCC did not work for 
version gcc-11.2.0 on my version of MinGW. Many of the configure 
flags resulted in warnings in the configure process since they 
were not recognized (should these flags be in the configure 
command?):

```
configure: WARNING: unrecognized options: --disable-bootstrap, 
--disable-werror, --disable-libgomp, --disable-libmudflap, 
--disable-libquadmath, --disable-libitm, --disable-libsanitizer, 
--disable-libstdcxx-pch, --with-arch, --with-gmp, --with-mpfr, 
--with-mpc, --with-isl, --enable-libphobos
```

Then I ran into an issue running the make command:

```
$ make -j12
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h config/i386/xm-mingw32.h" 
DEFINES="" \
/bin/sh ../gcc/mkconfig.sh config.h
TARGET_CPU_DEFAULT="" \
HEADERS="options.h insn-constants.h config/vxworks-dummy.h 
config/i386/biarch64.h config/i386/i386.h config/i386/unix.h 
config/i386/bsd.h config/i386/gas.h config/dbxcoff.h 
config/i386/cygming.h config/i386/mingw32.h 
config/i386/mingw-w64.h config/i386/mingw-stdint.h 
config/initfini-array.h defaults.h" DEFINES="LIBC_GLIBC=1 
LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" \
/bin/sh ../gcc/mkconfig.sh tm.h
TARGET_CPU_DEFAULT="" \
HEADERS="config/i386/i386-protos.h tm-preds.h" DEFINES="" \
/bin/sh ../gcc/mkconfig.sh tm_p.h
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h config/i386/xm-mingw32.h" 
DEFINES="" \
/bin/sh ../gcc/mkconfig.sh bconfig.h
make: *** No rule to make target 
'../build-x86_64-w64-mingw32/libiberty/libiberty.a', needed by 
'build/genmodes.exe'.  Stop.
make: *** Waiting for unfinished jobs....
```

If we are going to try to get the package for GDC into mingw, we 
need to be able to reproduce the compilation process. Are the 
commands you gave in your comment not the actual commands you 
actually ran in your mingw installation? Are you using 
[MSYS2](https://www.msys2.org/)? If you are using MSYS2, which of 
the three x86_64 compiler toolchains are you using (clang64, 
mingw64, or ucrt64)?


More information about the D.gnu mailing list