D support missing the Phobos library
D requires* a runtime library. In the gcc tree, I believe there's a libphobos directory that can just get the usual ./configure, make treatment, then included the compiled static library in the distribution release, but I honestly don't know for sure how to build it myself.
Once it is set up though a basic D hello world:
import std.stdio;
void main() { writeln("hello"); }
should work with you gdc file.d
It will ultimately look for a libgphobos.
- well you can do a
-nostdlibcompile too, for example:
extern(Windows) int MessageBoxA(void*, const char*, const char*, uint);
extern(Windows) void ExitProcess(uint);
void main() {
MessageBoxA(null, "Hello", "msg", 0);
ExitProcess(0);
}
and compile with x86_64-w64-mingw32-gdc.exe -nostdlib file.d -luser32 -lkernel32. But of course typical users would want that phobos runtime/standard lib to be there.
Anyway thanks for making this website!
When compiling your basic example I get:
d21.exe: error: cannot find source code for runtime library file 'object.d'
d21.exe: note: dmd might not be correctly installed. Run 'dmd -man' for installation instructions.
d21.exe: note: config file: not found
So it seems like GCC's D compiler is looking for dmd, the official reference compiler. I checked and the binary they distribute depends on MSVCR120.dll and uses an older MinGW-w64 library version.
The libphobos library you mentioned also seems to be part of dmd.
My first attempt to build it wasn't a great success: it builds but the dmd.exe still depends on MSVCR120.dll which tells me it's not rebuilding everything against my build of MinGW-w64.
Why did you not get the same error as me. Do you have dmd.exe in your PATH?
Oh I forgot you need an empty object.d in the directory too as a placeholder for the missing runtime library. I made that out of habit and just neglected to mention it. So next to your hello.d, make object.d with no contents.
But it isn't actually looking for dmd, that's just the error messages. gdc and dmd share 98% of their frontend code so the error messages are all the same between them.
The phobos is included in the gcc tree as you can see here:
https://gcc.gnu.org/git/?p=gcc.git;a=tree
look for "libphobos" and it leads to: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libphobos;h=d8a02c406752f1064e6741d2924467320c390fa8;hb=HEAD
Just had a first go at building MinGW-w64 GCC with --enable-libphobos.
It fails with a lot of errors, and it looks like it's going to take a lot of work to get it fixed.
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdlib.d:201:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
201 | int mbtowc(scope wchar_t* pwc, scope const char* s, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdlib.d:203:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
203 | int wctomb(scope char* s, wchar_t wc);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdlib.d:205:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
205 | size_t mbstowcs(scope wchar_t* pwcs, scope const char* s, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdlib.d:207:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
207 | size_t wcstombs(scope char* s, scope const wchar_t* pwcs, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:151:14: error: undefined identifier 'time_t', did you mean function 'time'?
151 | pure double difftime(time_t time1, time_t time0); // MT-Safe
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:151:14: error: undefined identifier 'time_t', did you mean function 'time'?
151 | pure double difftime(time_t time1, time_t time0); // MT-Safe
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:153:17: error: undefined identifier 'time_t', did you mean function 'time'?
153 | @system time_t mktime(scope tm* timeptr); // @system: MT-Safe env locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:153:17: error: undefined identifier 'tm'
153 | @system time_t mktime(scope tm* timeptr); // @system: MT-Safe env locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:155:9: error: undefined identifier 'time_t', did you mean function 'time'?
155 | time_t time(scope time_t* timer);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:155:9: error: undefined identifier 'time_t', did you mean function 'time'?
155 | time_t time(scope time_t* timer);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:158:17: error: undefined identifier 'tm'
158 | @system char* asctime(const scope tm* timeptr); // @system: MT-Unsafe race:asctime locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:160:17: error: undefined identifier 'time_t', did you mean function 'time'?
160 | @system char* ctime(const scope time_t* timer); // @system: MT-Unsafe race:tmbuf race:asctime env locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:162:17: error: undefined identifier 'tm'
162 | @system tm* gmtime(const scope time_t* timer); // @system: MT-Unsafe race:tmbuf env locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:162:17: error: undefined identifier 'time_t', did you mean function 'time'?
162 | @system tm* gmtime(const scope time_t* timer); // @system: MT-Unsafe race:tmbuf env locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:164:17: error: undefined identifier 'tm'
164 | @system tm* localtime(const scope time_t* timer); // @system: MT-Unsafe race:tmbuf env locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:164:17: error: undefined identifier 'time_t', did you mean function 'time'?
164 | @system tm* localtime(const scope time_t* timer); // @system: MT-Unsafe race:tmbuf env locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\time.d:166:17: error: undefined identifier 'tm'
166 | @system size_t strftime(scope char* s, size_t maxsize, const scope char* format, const scope tm* timeptr); // @system: MT-Safe env locale
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:131:14: error: undefined identifier 'wchar_t', did you mean 'dchar'?
131 | enum wchar_t WEOF = 0xFFFF;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:134:5: error: undefined identifier 'FILE'
134 | int fwprintf(FILE* stream, in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:134:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
134 | int fwprintf(FILE* stream, in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:136:5: error: undefined identifier 'FILE'
136 | int fwscanf(FILE* stream, in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:136:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
136 | int fwscanf(FILE* stream, in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:137:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
137 | int swscanf(in wchar_t* s, in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:137:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
137 | int swscanf(in wchar_t* s, in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:139:5: error: undefined identifier 'FILE'
139 | int vfwprintf(FILE* stream, in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:139:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
139 | int vfwprintf(FILE* stream, in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:141:5: error: undefined identifier 'FILE'
141 | int vfwscanf(FILE* stream, in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:141:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
141 | int vfwscanf(FILE* stream, in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:142:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
142 | int vswscanf(in wchar_t* s, in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:142:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
142 | int vswscanf(in wchar_t* s, in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:144:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
144 | int vwprintf(in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:146:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
146 | int vwscanf(in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:148:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
148 | int wprintf(in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:150:5: error: undefined identifier 'wchar_t', did you mean 'dchar'?
150 | int wscanf(in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:168:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
168 | int swprintf(wchar_t* s, size_t n, in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:168:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
168 | int swprintf(wchar_t* s, size_t n, in wchar_t* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:170:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
170 | int vswprintf(wchar_t* s, size_t n, in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:170:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
170 | int vswprintf(wchar_t* s, size_t n, in wchar_t* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:128:7: error: undefined identifier 'wchar_t', did you mean 'dchar'?
128 | alias wchar_t wint_t;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:177:12: error: undefined identifier 'FILE'
177 | wint_t fgetwc(FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:179:12: error: undefined identifier 'wchar_t', did you mean 'dchar'?
179 | wint_t fputwc(wchar_t c, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:179:12: error: undefined identifier 'FILE'
179 | wint_t fputwc(wchar_t c, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:183:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
183 | wchar_t* fgetws(wchar_t* s, int n, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:183:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
183 | wchar_t* fgetws(wchar_t* s, int n, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:183:10: error: undefined identifier 'FILE'
183 | wchar_t* fgetws(wchar_t* s, int n, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:185:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
185 | int fputws(in wchar_t* s, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:185:10: error: undefined identifier 'FILE'
185 | int fputws(in wchar_t* s, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:193:12: error: undefined identifier 'wchar_t', did you mean 'dchar'?
193 | wint_t putwchar(wchar_t c) { return fputwc(c,stdout); }
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:195:12: error: undefined identifier 'FILE'
195 | wint_t getwc(FILE* stream) { return fgetwc(stream); }
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:197:12: error: undefined identifier 'wchar_t', did you mean 'dchar'?
197 | wint_t putwc(wchar_t c, FILE* stream) { return fputwc(c, stream); }
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:197:12: error: undefined identifier 'FILE'
197 | wint_t putwc(wchar_t c, FILE* stream) { return fputwc(c, stream); }
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:204:12: error: undefined identifier 'FILE'
204 | wint_t ungetwc(wint_t c, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:213:16: error: undefined identifier 'FILE'
213 | int fwide(FILE* stream, int mode);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:218:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
218 | double wcstod(in wchar_t* nptr, wchar_t** endptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:218:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
218 | double wcstod(in wchar_t* nptr, wchar_t** endptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:220:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
220 | float wcstof(in wchar_t* nptr, wchar_t** endptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:220:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
220 | float wcstof(in wchar_t* nptr, wchar_t** endptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:222:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
222 | real wcstold(in wchar_t* nptr, wchar_t** endptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:222:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
222 | real wcstold(in wchar_t* nptr, wchar_t** endptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:224:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
224 | c_long wcstol(in wchar_t* nptr, wchar_t** endptr, int base);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:224:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
224 | c_long wcstol(in wchar_t* nptr, wchar_t** endptr, int base);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:226:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
226 | long wcstoll(in wchar_t* nptr, wchar_t** endptr, int base);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:226:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
226 | long wcstoll(in wchar_t* nptr, wchar_t** endptr, int base);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:228:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
228 | c_ulong wcstoul(in wchar_t* nptr, wchar_t** endptr, int base);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:228:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
228 | c_ulong wcstoul(in wchar_t* nptr, wchar_t** endptr, int base);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:230:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
230 | ulong wcstoull(in wchar_t* nptr, wchar_t** endptr, int base);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:230:9: error: undefined identifier 'wchar_t', did you mean 'dchar'?
230 | ulong wcstoull(in wchar_t* nptr, wchar_t** endptr, int base);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:233:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
233 | pure wchar_t* wcscpy(return wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:233:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
233 | pure wchar_t* wcscpy(return wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:233:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
233 | pure wchar_t* wcscpy(return wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:235:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
235 | pure wchar_t* wcsncpy(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:235:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
235 | pure wchar_t* wcsncpy(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:235:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
235 | pure wchar_t* wcsncpy(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:237:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
237 | pure wchar_t* wcscat(return wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:237:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
237 | pure wchar_t* wcscat(return wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:237:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
237 | pure wchar_t* wcscat(return wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:239:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
239 | pure wchar_t* wcsncat(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:239:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
239 | pure wchar_t* wcsncat(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:239:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
239 | pure wchar_t* wcsncat(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:241:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
241 | pure int wcscmp(scope const wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:241:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
241 | pure int wcscmp(scope const wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:243:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
243 | int wcscoll(scope const wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:243:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
243 | int wcscoll(scope const wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:245:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
245 | pure int wcsncmp(scope const wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:245:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
245 | pure int wcsncmp(scope const wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:247:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
247 | size_t wcsxfrm(scope wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:247:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
247 | size_t wcsxfrm(scope wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:249:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
249 | pure inout(wchar_t)* wcschr(return inout(wchar_t)* s, wchar_t c);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:249:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
249 | pure inout(wchar_t)* wcschr(return inout(wchar_t)* s, wchar_t c);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:249:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
249 | pure inout(wchar_t)* wcschr(return inout(wchar_t)* s, wchar_t c);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:251:13: error: undefined identifier 'wchar_t', did you mean 'dchar'?
251 | pure size_t wcscspn(scope const wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:251:13: error: undefined identifier 'wchar_t', did you mean 'dchar'?
251 | pure size_t wcscspn(scope const wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:253:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
253 | pure inout(wchar_t)* wcspbrk(return inout(wchar_t)* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:253:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
253 | pure inout(wchar_t)* wcspbrk(return inout(wchar_t)* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:253:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
253 | pure inout(wchar_t)* wcspbrk(return inout(wchar_t)* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:255:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
255 | pure inout(wchar_t)* wcsrchr(return inout(wchar_t)* s, wchar_t c);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:255:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
255 | pure inout(wchar_t)* wcsrchr(return inout(wchar_t)* s, wchar_t c);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:255:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
255 | pure inout(wchar_t)* wcsrchr(return inout(wchar_t)* s, wchar_t c);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:257:13: error: undefined identifier 'wchar_t', did you mean 'dchar'?
257 | pure size_t wcsspn(scope const wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:257:13: error: undefined identifier 'wchar_t', did you mean 'dchar'?
257 | pure size_t wcsspn(scope const wchar_t* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:259:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
259 | pure inout(wchar_t)* wcsstr(return inout(wchar_t)* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:259:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
259 | pure inout(wchar_t)* wcsstr(return inout(wchar_t)* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:259:22: error: undefined identifier 'wchar_t', did you mean 'dchar'?
259 | pure inout(wchar_t)* wcsstr(return inout(wchar_t)* s1, scope const wchar_t* s2);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:261:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
261 | wchar_t* wcstok(return wchar_t* s1, scope const wchar_t* s2, wchar_t** ptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:261:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
261 | wchar_t* wcstok(return wchar_t* s1, scope const wchar_t* s2, wchar_t** ptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:261:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
261 | wchar_t* wcstok(return wchar_t* s1, scope const wchar_t* s2, wchar_t** ptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:261:10: error: undefined identifier 'wchar_t', did you mean 'dchar'?
261 | wchar_t* wcstok(return wchar_t* s1, scope const wchar_t* s2, wchar_t** ptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:263:13: error: undefined identifier 'wchar_t', did you mean 'dchar'?
263 | pure size_t wcslen(scope const wchar_t* s);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:266:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
266 | pure wchar_t* wmemchr(return const wchar_t* s, wchar_t c, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:266:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
266 | pure wchar_t* wmemchr(return const wchar_t* s, wchar_t c, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:266:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
266 | pure wchar_t* wmemchr(return const wchar_t* s, wchar_t c, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:268:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
268 | pure int wmemcmp(scope const wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:268:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
268 | pure int wmemcmp(scope const wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:270:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
270 | pure wchar_t* wmemcpy(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:270:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
270 | pure wchar_t* wmemcpy(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:270:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
270 | pure wchar_t* wmemcpy(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:272:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
272 | pure wchar_t* wmemmove(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:272:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
272 | pure wchar_t* wmemmove(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:272:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
272 | pure wchar_t* wmemmove(return wchar_t* s1, scope const wchar_t* s2, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:274:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
274 | pure wchar_t* wmemset(return wchar_t* s, wchar_t c, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:274:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
274 | pure wchar_t* wmemset(return wchar_t* s, wchar_t c, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:274:15: error: undefined identifier 'wchar_t', did you mean 'dchar'?
274 | pure wchar_t* wmemset(return wchar_t* s, wchar_t c, size_t n);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:277:8: error: undefined identifier 'wchar_t', did you mean 'dchar'?
277 | size_t wcsftime(wchar_t* s, size_t maxsize, in wchar_t* format, in tm* timeptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:277:8: error: undefined identifier 'wchar_t', did you mean 'dchar'?
277 | size_t wcsftime(wchar_t* s, size_t maxsize, in wchar_t* format, in tm* timeptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:277:8: error: undefined identifier 'tm'
277 | size_t wcsftime(wchar_t* s, size_t maxsize, in wchar_t* format, in tm* timeptr);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:305:8: error: undefined identifier 'wchar_t', did you mean 'dchar'?
305 | size_t mbrtowc(wchar_t* pwc, in char* s, size_t n, mbstate_t* ps);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:307:8: error: undefined identifier 'wchar_t', did you mean 'dchar'?
307 | size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:309:8: error: undefined identifier 'wchar_t', did you mean 'dchar'?
309 | size_t mbsrtowcs(wchar_t* dst, in char** src, size_t len, mbstate_t* ps);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\wchar_.d:311:8: error: undefined identifier 'wchar_t', did you mean 'dchar'?
311 | size_t wcsrtombs(char* dst, in wchar_t** src, size_t len, mbstate_t* ps);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:185:15: error: undefined identifier 'int8_t'
185 | enum int8_t INT8_MIN = int8_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:185:27: error: undefined identifier 'int8_t'
185 | enum int8_t INT8_MIN = int8_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:187:15: error: undefined identifier 'int8_t'
187 | enum int8_t INT8_MAX = int8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:187:27: error: undefined identifier 'int8_t'
187 | enum int8_t INT8_MAX = int8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:189:15: error: undefined identifier 'int16_t'
189 | enum int16_t INT16_MIN = int16_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:189:27: error: undefined identifier 'int16_t'
189 | enum int16_t INT16_MIN = int16_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:191:15: error: undefined identifier 'int16_t'
191 | enum int16_t INT16_MAX = int16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:191:27: error: undefined identifier 'int16_t'
191 | enum int16_t INT16_MAX = int16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:193:15: error: undefined identifier 'int32_t'
193 | enum int32_t INT32_MIN = int32_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:193:27: error: undefined identifier 'int32_t'
193 | enum int32_t INT32_MIN = int32_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:195:15: error: undefined identifier 'int32_t'
195 | enum int32_t INT32_MAX = int32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:195:27: error: undefined identifier 'int32_t'
195 | enum int32_t INT32_MAX = int32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:197:15: error: undefined identifier 'int64_t'
197 | enum int64_t INT64_MIN = int64_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:197:27: error: undefined identifier 'int64_t'
197 | enum int64_t INT64_MIN = int64_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:199:15: error: undefined identifier 'int64_t'
199 | enum int64_t INT64_MAX = int64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:199:27: error: undefined identifier 'int64_t'
199 | enum int64_t INT64_MAX = int64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:202:15: error: undefined identifier 'uint8_t'
202 | enum uint8_t UINT8_MAX = uint8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:202:28: error: undefined identifier 'uint8_t'
202 | enum uint8_t UINT8_MAX = uint8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:204:15: error: undefined identifier 'uint16_t'
204 | enum uint16_t UINT16_MAX = uint16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:204:28: error: undefined identifier 'uint16_t'
204 | enum uint16_t UINT16_MAX = uint16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:206:15: error: undefined identifier 'uint32_t'
206 | enum uint32_t UINT32_MAX = uint32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:206:28: error: undefined identifier 'uint32_t'
206 | enum uint32_t UINT32_MAX = uint32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:208:15: error: undefined identifier 'uint64_t'
208 | enum uint64_t UINT64_MAX = uint64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:208:28: error: undefined identifier 'uint64_t'
208 | enum uint64_t UINT64_MAX = uint64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:211:22: error: undefined identifier 'int_least8_t'
211 | enum int_least8_t INT_LEAST8_MIN = int_least8_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:211:41: error: undefined identifier 'int_least8_t'
211 | enum int_least8_t INT_LEAST8_MIN = int_least8_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:213:22: error: undefined identifier 'int_least8_t'
213 | enum int_least8_t INT_LEAST8_MAX = int_least8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:213:41: error: undefined identifier 'int_least8_t'
213 | enum int_least8_t INT_LEAST8_MAX = int_least8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:215:22: error: undefined identifier 'int_least16_t'
215 | enum int_least16_t INT_LEAST16_MIN = int_least16_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:215:41: error: undefined identifier 'int_least16_t'
215 | enum int_least16_t INT_LEAST16_MIN = int_least16_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:217:22: error: undefined identifier 'int_least16_t'
217 | enum int_least16_t INT_LEAST16_MAX = int_least16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:217:41: error: undefined identifier 'int_least16_t'
217 | enum int_least16_t INT_LEAST16_MAX = int_least16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:219:22: error: undefined identifier 'int_least32_t'
219 | enum int_least32_t INT_LEAST32_MIN = int_least32_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:219:41: error: undefined identifier 'int_least32_t'
219 | enum int_least32_t INT_LEAST32_MIN = int_least32_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:221:22: error: undefined identifier 'int_least32_t'
221 | enum int_least32_t INT_LEAST32_MAX = int_least32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:221:41: error: undefined identifier 'int_least32_t'
221 | enum int_least32_t INT_LEAST32_MAX = int_least32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:223:22: error: undefined identifier 'int_least64_t'
223 | enum int_least64_t INT_LEAST64_MIN = int_least64_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:223:41: error: undefined identifier 'int_least64_t'
223 | enum int_least64_t INT_LEAST64_MIN = int_least64_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:225:22: error: undefined identifier 'int_least64_t'
225 | enum int_least64_t INT_LEAST64_MAX = int_least64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:225:41: error: undefined identifier 'int_least64_t'
225 | enum int_least64_t INT_LEAST64_MAX = int_least64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:228:22: error: undefined identifier 'uint_least8_t'
228 | enum uint_least8_t UINT_LEAST8_MAX = uint_least8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:228:41: error: undefined identifier 'uint_least8_t'
228 | enum uint_least8_t UINT_LEAST8_MAX = uint_least8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:230:22: error: undefined identifier 'uint_least16_t'
230 | enum uint_least16_t UINT_LEAST16_MAX = uint_least16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:230:41: error: undefined identifier 'uint_least16_t'
230 | enum uint_least16_t UINT_LEAST16_MAX = uint_least16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:232:22: error: undefined identifier 'uint_least32_t'
232 | enum uint_least32_t UINT_LEAST32_MAX = uint_least32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:232:41: error: undefined identifier 'uint_least32_t'
232 | enum uint_least32_t UINT_LEAST32_MAX = uint_least32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:234:22: error: undefined identifier 'uint_least64_t'
234 | enum uint_least64_t UINT_LEAST64_MAX = uint_least64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:234:41: error: undefined identifier 'uint_least64_t'
234 | enum uint_least64_t UINT_LEAST64_MAX = uint_least64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:237:20: error: undefined identifier 'int_fast8_t'
237 | enum int_fast8_t INT_FAST8_MIN = int_fast8_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:237:38: error: undefined identifier 'int_fast8_t'
237 | enum int_fast8_t INT_FAST8_MIN = int_fast8_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:239:20: error: undefined identifier 'int_fast8_t'
239 | enum int_fast8_t INT_FAST8_MAX = int_fast8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:239:38: error: undefined identifier 'int_fast8_t'
239 | enum int_fast8_t INT_FAST8_MAX = int_fast8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:241:20: error: undefined identifier 'int_fast16_t'
241 | enum int_fast16_t INT_FAST16_MIN = int_fast16_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:241:38: error: undefined identifier 'int_fast16_t'
241 | enum int_fast16_t INT_FAST16_MIN = int_fast16_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:243:20: error: undefined identifier 'int_fast16_t'
243 | enum int_fast16_t INT_FAST16_MAX = int_fast16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:243:38: error: undefined identifier 'int_fast16_t'
243 | enum int_fast16_t INT_FAST16_MAX = int_fast16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:245:20: error: undefined identifier 'int_fast32_t'
245 | enum int_fast32_t INT_FAST32_MIN = int_fast32_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:245:38: error: undefined identifier 'int_fast32_t'
245 | enum int_fast32_t INT_FAST32_MIN = int_fast32_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:247:20: error: undefined identifier 'int_fast32_t'
247 | enum int_fast32_t INT_FAST32_MAX = int_fast32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:247:38: error: undefined identifier 'int_fast32_t'
247 | enum int_fast32_t INT_FAST32_MAX = int_fast32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:249:20: error: undefined identifier 'int_fast64_t'
249 | enum int_fast64_t INT_FAST64_MIN = int_fast64_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:249:38: error: undefined identifier 'int_fast64_t'
249 | enum int_fast64_t INT_FAST64_MIN = int_fast64_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:251:20: error: undefined identifier 'int_fast64_t'
251 | enum int_fast64_t INT_FAST64_MAX = int_fast64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:251:38: error: undefined identifier 'int_fast64_t'
251 | enum int_fast64_t INT_FAST64_MAX = int_fast64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:254:20: error: undefined identifier 'uint_fast8_t'
254 | enum uint_fast8_t UINT_FAST8_MAX = uint_fast8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:254:38: error: undefined identifier 'uint_fast8_t'
254 | enum uint_fast8_t UINT_FAST8_MAX = uint_fast8_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:256:20: error: undefined identifier 'uint_fast16_t'
256 | enum uint_fast16_t UINT_FAST16_MAX = uint_fast16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:256:38: error: undefined identifier 'uint_fast16_t'
256 | enum uint_fast16_t UINT_FAST16_MAX = uint_fast16_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:258:20: error: undefined identifier 'uint_fast32_t'
258 | enum uint_fast32_t UINT_FAST32_MAX = uint_fast32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:258:38: error: undefined identifier 'uint_fast32_t'
258 | enum uint_fast32_t UINT_FAST32_MAX = uint_fast32_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:260:20: error: undefined identifier 'uint_fast64_t'
260 | enum uint_fast64_t UINT_FAST64_MAX = uint_fast64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:260:38: error: undefined identifier 'uint_fast64_t'
260 | enum uint_fast64_t UINT_FAST64_MAX = uint_fast64_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:263:16: error: undefined identifier 'intptr_t'
263 | enum intptr_t INTPTR_MIN = intptr_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:263:30: error: undefined identifier 'intptr_t'
263 | enum intptr_t INTPTR_MIN = intptr_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:265:16: error: undefined identifier 'intptr_t'
265 | enum intptr_t INTPTR_MAX = intptr_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:265:30: error: undefined identifier 'intptr_t'
265 | enum intptr_t INTPTR_MAX = intptr_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:268:16: error: undefined identifier 'uintptr_t'
268 | enum uintptr_t UINTPTR_MIN = uintptr_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:268:30: error: undefined identifier 'uintptr_t'
268 | enum uintptr_t UINTPTR_MIN = uintptr_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:270:16: error: undefined identifier 'uintptr_t'
270 | enum uintptr_t UINTPTR_MAX = uintptr_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:270:30: error: undefined identifier 'uintptr_t'
270 | enum uintptr_t UINTPTR_MAX = uintptr_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:273:16: error: undefined identifier 'intmax_t'
273 | enum intmax_t INTMAX_MIN = intmax_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:273:30: error: undefined identifier 'intmax_t'
273 | enum intmax_t INTMAX_MIN = intmax_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:275:16: error: undefined identifier 'intmax_t'
275 | enum intmax_t INTMAX_MAX = intmax_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:275:30: error: undefined identifier 'intmax_t'
275 | enum intmax_t INTMAX_MAX = intmax_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:278:16: error: undefined identifier 'uintmax_t'
278 | enum uintmax_t UINTMAX_MAX = uintmax_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:278:30: error: undefined identifier 'uintmax_t'
278 | enum uintmax_t UINTMAX_MAX = uintmax_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:294:14: error: undefined identifier 'wchar_t', did you mean 'dchar'?
294 | enum wchar_t WCHAR_MIN = wchar_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:294:26: error: undefined identifier 'wchar_t', did you mean 'dchar'?
294 | enum wchar_t WCHAR_MIN = wchar_t.min;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:296:14: error: undefined identifier 'wchar_t', did you mean 'dchar'?
296 | enum wchar_t WCHAR_MAX = wchar_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdint.d:296:26: error: undefined identifier 'wchar_t', did you mean 'dchar'?
296 | enum wchar_t WCHAR_MAX = wchar_t.max;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:31:12: error: module core.stdc.stdint import 'intptr_t' not found
31 | import core.stdc.stdint : intptr_t;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1140:16: error: undefined identifier 'FILE'
1140 | @trusted FILE* tmpfile(); // No unsafe pointer manipulation.
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1145:7: error: undefined identifier 'FILE'
1145 | int fclose(FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1151:11: error: undefined identifier 'FILE'
1151 | int fflush(FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1155:7: error: undefined identifier 'FILE'
1155 | FILE* fopen(scope const char* filename, scope const char* mode);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1157:7: error: undefined identifier 'FILE'
1157 | FILE* freopen(scope const char* filename, scope const char* mode, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1157:7: error: undefined identifier 'FILE'
1157 | FILE* freopen(scope const char* filename, scope const char* mode, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1160:6: error: undefined identifier 'FILE'
1160 | void setbuf(FILE* stream, char* buf);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1162:6: error: undefined identifier 'FILE'
1162 | int setvbuf(FILE* stream, char* buf, int mode, size_t size);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1231:9: error: undefined identifier 'FILE'
1231 | int fprintf(FILE* stream, scope const char* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1233:9: error: undefined identifier 'FILE'
1233 | int fscanf(FILE* stream, scope const char* format, ...);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1239:9: error: undefined identifier 'FILE'
1239 | int vfprintf(FILE* stream, scope const char* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1241:9: error: undefined identifier 'FILE'
1241 | int vfscanf(FILE* stream, scope const char* format, va_list arg);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1260:9: error: undefined identifier 'FILE'
1260 | int fgetc(FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1262:9: error: undefined identifier 'FILE'
1262 | int fputc(int c, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1266:7: error: undefined identifier 'FILE'
1266 | char* fgets(char* s, int n, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1268:7: error: undefined identifier 'FILE'
1268 | int fputs(scope const char* s, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1288:14: error: undefined identifier 'FILE'
1288 | @trusted int ungetc(int c, FILE* stream); // No unsafe pointer manipulation.
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1291:8: error: undefined identifier 'FILE'
1291 | size_t fread(scope void* ptr, size_t size, size_t nmemb, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1293:8: error: undefined identifier 'FILE'
1293 | size_t fwrite(scope const void* ptr, size_t size, size_t nmemb, FILE* stream);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1299:9: error: undefined identifier 'FILE'
1299 | int fgetpos(FILE* stream, scope fpos_t * pos);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1299:9: error: undefined identifier 'fpos_t'
1299 | int fgetpos(FILE* stream, scope fpos_t * pos);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1301:9: error: undefined identifier 'FILE'
1301 | int fsetpos(FILE* stream, scope const fpos_t* pos);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1301:9: error: undefined identifier 'fpos_t'
1301 | int fsetpos(FILE* stream, scope const fpos_t* pos);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1304:12: error: undefined identifier 'FILE'
1304 | int fseek(FILE* stream, c_long offset, int whence);
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdio.d:1306:12: error: undefined identifier 'FILE'
1306 | c_long ftell(FILE* stream);
| ^
../../../../libphobos/libdruntime/core/demangle.d:2622:16: error: module core.stdc.stdio import 'snprintf' not found, did you mean function 'sprintf'?
2622 | import core.stdc.stdio : snprintf;
| ^
r:\winlibs64-10.2.0\gcc-10.2.0\libphobos\libdruntime\core\stdc\stdlib.d:98:6: error: static assert "Unsupported platform"
98 | else static assert( false, "Unsupported platform" );
| ^
Hmm, looks like the C stdlib bindings on the D side aren't implemented for the platform. Probably the libc version just not present in there (it has a habit on Windows of assuming it is the msvcrt) but I know the gdc maintainer had a plan to auto-generate those when missing... just not sure he finished it.
Let me talk to him and see if we can look into it then I'll get back to you.
Again I appreciate your effort in making this distribution and your willingness to include D support!
There is no D language support in the Windows backend for gcc.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91595#c3
The patch in the issue should get you 99% of the way there, but run-time hasn't be tested in many many years - hence it was not included when D was initially pulled into gcc mainline.
The msys2 branch has the patches and is currently working: https://github.com/Imperatorn/gcc.git
Build script: wget https://gist.githubusercontent.com/Imperatorn/7d37f22140ea5b2c80dee5a86ffff2a3/raw/761ea945c28586f5c6bbc2e09d93a27383701da8/build.sh && ./build.sh
What patches are they using exactly?
I have been trying the patches that came out of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91595 but still am unable to build libphobos :-(
@ibuclaw's branch on gcc's git represents the best source right now: https://gcc.gnu.org/git/?p=gcc.git;a=log;h=refs/users/ibuclaw/heads/mingw there's a few changes coming together there, had to add a new file, fix some build scripts, patch some missing functions. He, I, and Imperatorn have been patching and testing over the last few weeks when we find the time.
It works on our computers now but I don't think it is quite ready to go public yet. Iain will probably get all this upstreamed fairly soon (as in probably another month or so) though once it goes through the comprehensive test suite.
tbh when I opened this issue I thought your build just had to enable it, but after digging deeper turns out it is our bugs in the D community, so I wanna get our side fixed, then your side should be as simple as pulling the final patch - possibly as simple as grabbing a new gcc release - and building it then.
What patches are they using exactly?
I have been trying the patches that came out of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91595 but still am unable to build libphobos :-(
Atm you have to use the repo and build script above (Imperatorn/gcc), that works. We're working on some weakref-problems on the other branch though so everything is not working yet. Hopefully in some weeks
@ibuclaw's branch on gcc's git represents the best source right now: https://gcc.gnu.org/git/?p=gcc.git;a=log;h=refs/users/ibuclaw/heads/mingw there's a few changes coming together there, had to add a new file, fix some build scripts, patch some missing functions. He, I, and Imperatorn have been patching and testing over the last few weeks when we find the time.
It works on our computers now but I don't think it is quite ready to go public yet. Iain will probably get all this upstreamed fairly soon (as in probably another month or so) though once it goes through the comprehensive test suite.
tbh when I opened this issue I thought your build just had to enable it, but after digging deeper turns out it is our bugs in the D community, so I wanna get our side fixed, then your side should be as simple as pulling the final patch - possibly as simple as grabbing a new gcc release - and building it then.
That source won't work right now, there are some weakref / selectany problems to be solved
Long story short, it's us, not you :)
Thanks. I will be waiting for the release that works, or any changes you want me to test.
@Imperatorn @ibuclaw Is there any update yet in D support in GCC + MinGW-w64 ?
I'm pretty sure it works now upstream but I haven't actually had time to retest it myself since last spring (when i did have it working on master, then the diff was merged in, so it should work). I did just try grabbing your build but i guess d disabled for now. I'm pretty sure it is just --enable-languages=d --enable-libphobos to configure now since the patches are up. Might not even need the separate --enable-libphobos anymore but it wouldn't hurt to specify anyway.
If I can find some time later I'll retest it. My computer is a bit slow and takes over an hour to build gcc and then it slows down on my other work while it is doing it but still might be able to try it out.
@adamdruppe Are you referring to gcc 11.2.0, or should I try with a more recent snapshot version?
./configure for gcc-12-20220213 returns: configure: error: GDC is required to build d
Yeah, I know 12 needs to bootstrap since it switched over to half of gdc's code being written in D. I think the patch is in 11.2 but not entirely sure. I'm trying to check now.
gcc-11.2.0 fails with: libphobos\libdruntime\gcc\gthread.d:42:30: error: undefined identifier 'PTHREAD_ONCE_INIT'
gcc-11-20220212 also fails with: libphobos\libdruntime\gcc\gthread.d:42:30: error: undefined identifier 'PTHREAD_ONCE_INIT'
Any chance bootstrapping with dmd instead of gdc will work?
I don't actually know. I did hit make on my computer on the 11.2 tag, it'll be a while. Also reached out to Iain who knows a lot better than me. He said he hasn't tested recently either but will take a look when he has some time.
My computer finally finished building gcc 11.2 and it seems to work correctly. Here's what i did in my mingw:
git clone git://gcc.gnu.org/git/gcc.git
git checkout releases/gcc-11.2
mkdir gcc-build
cd gcc-build
Then the configure command:
../gcc/configure --prefix=/mingw64 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-bootstrap --disable-werror --disable-libssp --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libitm --disable-libsanitizer --disable-libstdcxx-pch --with-arch=x86-64 --with-gnu-as --with-gnu-ld --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-languages=d --enable-libphobos --enable-shared --enable-static --disable-multilib
This is mostly what I was using last year when fixing the bugs originally and my memory fails on what each specific thing is for, some of them are just to make it compile faster (like I said, my computer isn't exactly fast at big builds like this) and some were actually required to make it build.
Then just make -j4 and wait. After i did make install and then:
adamd@LAPTOP-FL6FV749 MINGW64 ~
$ cat hello.d
import std.stdio;
void main() {
writeln("Hello!");
}
adamd@LAPTOP-FL6FV749 MINGW64 ~
$ gdc --version
gdc.exe (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
adamd@LAPTOP-FL6FV749 MINGW64 ~
$ gdc hello.d
adamd@LAPTOP-FL6FV749 MINGW64 ~
$ ./a.exe
Hello!
adamd@LAPTOP-FL6FV749 MINGW64 ~
That looks like a success.
The pthread thing must be avoided because of one of those --disable configure things in my build, I just don't know which one.
It's probably related to my use of --enable-threads=posix which triggers issues in libphobos/libdruntime/gcc/gthread.d for this threading model on Windows. PTHREAD_ONCE_INIT and pthread_key_t do exist in MinGW-w64's pthread.h. How can you tell libphobos/libdruntime/gcc/gthread.d to look at that header file? Sorry, I'm not experienced in D (yet).
I filed a bug report with GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104654
Using Win32 instead of Posix threads for D in x86_64-w64-mingw32/libphobos/libdruntime/gcc/config.d allowed the build to continue.
I had one more issue (which I reported here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104659) and then compilation with D language succeeded (snapshot 11-20220219).
So once those bugs are ironed out it's looking good for gdc
OK, thanks! Sorry for being slow my kid got sick so she's needed all my spare time. But those bugs both look easy to fix, the D compiler is slowly learning how to import C system headers, but what we've traditionally done is just translate the constants and such over by hand. So sometimes something gets forgotten or mistaken but it is usually a small patch to bring it up.
I also tried forcing enum ThreadModel GNU_Thread_Model = ThreadModel.Win32; in libphobos/libdruntime/gcc/config.d.in but the result can't build a simple "hello world" because of errors like undefined reference to '__gthr_win32_key_create'.
But I guess it's simple enough to fix buy the GCC developers, so let's wait and see...