April 10, 2021
On Saturday, 10 April 2021 at 13:02:36 UTC, Ferhat Kurtulmuş wrote:
> On Saturday, 10 April 2021 at 12:31:27 UTC, Imperatorn wrote:
>> On Saturday, 10 April 2021 at 10:59:58 UTC, Ferhat Kurtulmuş wrote:
>>> On Friday, 9 April 2021 at 18:42:21 UTC, Imperatorn wrote:
>>>> [...]
>>>
>>> The below is the output of "gdc -print-search-dirs" command. As you can see, there are search paths beginning with "d:/msys64". I think they should be /d/msys64 or just /msys64 in msys2. That is the problem.
>>>
>>> [...]
>>
>> Did you install msys on D:? Does it work if you manually supply -L?
>
> Actually, I did a workaround by supplying the LIBRARY_PATH manually. Now curl is found. But I am having some linker errors related to winsockets (missing symbols). I will share the linker errors when I back home.

Here are the command and the output.

https://controlc.com/a0968e90
April 11, 2021
On Thursday, 8 April 2021 at 19:10:03 UTC, Imperatorn wrote:
> On Thursday, 8 April 2021 at 02:29:41 UTC, Preetpal wrote:
>> On Thursday, 8 April 2021 at 02:22:41 UTC, Preetpal wrote:
>>> On Thursday, 8 April 2021 at 02:18:13 UTC, Adam D. Ruppe wrote:
>>>> On Thursday, 8 April 2021 at 02:05:56 UTC, Preetpal wrote:
>>>>> gdc.exe: fatal error: cannot execute 'd21': CreateProcess: No such file or directory
>>>>> compilation terminated.
>>>>
>>>> The PATH needs to include the normal mingw64 bin path as well as the path for gdc.
>>>
>>> Well I do have mingw64 on my path, but his build does not work. I might try to build GDC from source at a later time to test the release.
>>
>> To be clear, I tried it with mingw64 on my path and with a clean environment (running command prompt without mingw64 on my path).
>
> These are the steps you need to follow:
>
> 1. Download MSYS2 (https://www.msys2.org/) or "choco install msys2" if you have chocolatey
>
> 2. Start msys2 and paste the following:
> wget https://gist.githubusercontent.com/Imperatorn/7d37f22140ea5b2c80dee5a86ffff2a3/raw/761ea945c28586f5c6bbc2e09d93a27383701da8/build.sh && ./build.sh
>
> 3. Wait :)
>
> 4. Pray...
>
> 5. Celebrate!? The build script has hopefully run and will open the bin directory with explorer

The build script ran successfully! :)

I tried it out with a few console programs and a program I made a forum post about earlier (https://gist.github.com/preetpalS/d2482d6ec91eb8147e6cff43ab197ed5) and everything was working when compiling with GDC on Windows.
April 11, 2021
On Sunday, 11 April 2021 at 07:20:35 UTC, Preetpal wrote:
> On Thursday, 8 April 2021 at 19:10:03 UTC, Imperatorn wrote:
>> [...]
>
> The build script ran successfully! :)
>
> I tried it out with a few console programs and a program I made a forum post about earlier (https://gist.github.com/preetpalS/d2482d6ec91eb8147e6cff43ab197ed5) and everything was working when compiling with GDC on Windows.

Cool! We'll try and fix those winsock problems as well.
April 11, 2021
On Saturday, 10 April 2021 at 15:08:56 UTC, Ferhat Kurtulmuş wrote:
> On Saturday, 10 April 2021 at 13:02:36 UTC, Ferhat Kurtulmuş wrote:
>> On Saturday, 10 April 2021 at 12:31:27 UTC, Imperatorn wrote:
>>> On Saturday, 10 April 2021 at 10:59:58 UTC, Ferhat Kurtulmuş wrote:
>>>> [...]
>>>
>>> Did you install msys on D:? Does it work if you manually supply -L?
>>
>> Actually, I did a workaround by supplying the LIBRARY_PATH manually. Now curl is found. But I am having some linker errors related to winsockets (missing symbols). I will share the linker errors when I back home.
>
> Here are the command and the output.
>
> https://controlc.com/a0968e90

Thanks, what can we do to reproduce this? Just try do anything socket-related?
April 11, 2021
On Sunday, 11 April 2021 at 18:32:19 UTC, Imperatorn wrote:
> On Saturday, 10 April 2021 at 15:08:56 UTC, Ferhat Kurtulmuş wrote:
>> On Saturday, 10 April 2021 at 13:02:36 UTC, Ferhat Kurtulmuş wrote:
>>> On Saturday, 10 April 2021 at 12:31:27 UTC, Imperatorn wrote:
>>>> On Saturday, 10 April 2021 at 10:59:58 UTC, Ferhat Kurtulmuş wrote:
>>>>> [...]
>>>>
>>>> Did you install msys on D:? Does it work if you manually supply -L?
>>>
>>> Actually, I did a workaround by supplying the LIBRARY_PATH manually. Now curl is found. But I am having some linker errors related to winsockets (missing symbols). I will share the linker errors when I back home.
>>
>> Here are the command and the output.
>>
>> https://controlc.com/a0968e90
>
> Thanks, what can we do to reproduce this? Just try do anything socket-related?

The server code in Adam's socket tutorial:
http://dpldocs.info/this-week-in-d/Blog.Posted_2019_11_11.html#server

```d
gdc test.d -o test-L/opt/mingw64/x86_64-w64-mingw32/lib -lws2_32 -lwsock32

./test
```

Looks like a name mangling problem. I don't know.

April 20, 2021

On Sunday, 11 April 2021 at 19:15:18 UTC, Ferhat Kurtulmuş wrote:

>

On Sunday, 11 April 2021 at 18:32:19 UTC, Imperatorn wrote:

>

On Saturday, 10 April 2021 at 15:08:56 UTC, Ferhat Kurtulmuş wrote:

>

On Saturday, 10 April 2021 at 13:02:36 UTC, Ferhat Kurtulmuş wrote:

>

[...]

Here are the command and the output.

https://controlc.com/a0968e90

Thanks, what can we do to reproduce this? Just try do anything socket-related?

The server code in Adam's socket tutorial:
http://dpldocs.info/this-week-in-d/Blog.Posted_2019_11_11.html#server

gdc test.d -o test-L/opt/mingw64/x86_64-w64-mingw32/lib -lws2_32 -lwsock32

./test

Looks like a name mangling problem. I don't know.

The only working solution is explicitly providing all library files and the source as inputs.

gdc main.d libgdruntime.a libgphobos.a libwsock32.a libws2_32.a -o main

April 21, 2021

On Tuesday, 20 April 2021 at 09:48:01 UTC, Ferhat Kurtulmuş wrote:

>

On Sunday, 11 April 2021 at 19:15:18 UTC, Ferhat Kurtulmuş wrote:

>

On Sunday, 11 April 2021 at 18:32:19 UTC, Imperatorn wrote:

>

On Saturday, 10 April 2021 at 15:08:56 UTC, Ferhat Kurtulmuş wrote:

>

On Saturday, 10 April 2021 at 13:02:36 UTC, Ferhat Kurtulmuş wrote:

>

[...]

Here are the command and the output.

https://controlc.com/a0968e90

Thanks, what can we do to reproduce this? Just try do anything socket-related?

The server code in Adam's socket tutorial:
http://dpldocs.info/this-week-in-d/Blog.Posted_2019_11_11.html#server

gdc test.d -o test-L/opt/mingw64/x86_64-w64-mingw32/lib -lws2_32 -lwsock32

./test

Looks like a name mangling problem. I don't know.

The only working solution is explicitly providing all library files and the source as inputs.

gdc main.d libgdruntime.a libgphobos.a libwsock32.a libws2_32.a -o main

Good catch, we have some more patches coming. But I've had a NDE aka mancold so not so active. Iain is working hard to get gcc 11 ready. If the gods are with us I might have time to try build the latest tonight or tomorrow.

April 22, 2021

On Wednesday, 21 April 2021 at 18:03:57 UTC, Imperatorn wrote:

>

On Tuesday, 20 April 2021 at 09:48:01 UTC, Ferhat Kurtulmuş wrote:

>

On Sunday, 11 April 2021 at 19:15:18 UTC, Ferhat Kurtulmuş wrote:

>

On Sunday, 11 April 2021 at 18:32:19 UTC, Imperatorn wrote:

>

On Saturday, 10 April 2021 at 15:08:56 UTC, Ferhat Kurtulmuş wrote:

>

On Saturday, 10 April 2021 at 13:02:36 UTC, Ferhat Kurtulmuş wrote:

>

[...]

Here are the command and the output.

https://controlc.com/a0968e90

Thanks, what can we do to reproduce this? Just try do anything socket-related?

The server code in Adam's socket tutorial:
http://dpldocs.info/this-week-in-d/Blog.Posted_2019_11_11.html#server

gdc test.d -o test-L/opt/mingw64/x86_64-w64-mingw32/lib -lws2_32 -lwsock32

./test

Looks like a name mangling problem. I don't know.

The only working solution is explicitly providing all library files and the source as inputs.

gdc main.d libgdruntime.a libgphobos.a libwsock32.a libws2_32.a -o main

Good catch, we have some more patches coming. But I've had a NDE aka mancold so not so active. Iain is working hard to get gcc 11 ready. If the gods are with us I might have time to try build the latest tonight or tomorrow.

Thank you for your valued efforts. I would like to report some additional results of my tests. I could also compile dub by adding "gdruntime" "gphobos" "wsock32" "ws2_32" in dub.sdl. I don't know if it is expected, but it looks like GDC does not link Phobos automatically as LDC does. If I am not wrong g++ also expects c++ runtime must be linked explicitly with -lstd++. And, I tried a simple SDL2 based dub project but I got a Segmentation fault during compilation.

April 22, 2021

On Thursday, 22 April 2021 at 06:31:14 UTC, Ferhat Kurtulmuş wrote:

>

On Wednesday, 21 April 2021 at 18:03:57 UTC, Imperatorn wrote:

>

[...]

Thank you for your valued efforts. I would like to report some additional results of my tests. I could also compile dub by adding "gdruntime" "gphobos" "wsock32" "ws2_32" in dub.sdl. I don't know if it is expected, but it looks like GDC does not link Phobos automatically as LDC does. If I am not wrong g++ also expects c++ runtime must be linked explicitly with -lstd++. And, I tried a simple SDL2 based dub project but I got a Segmentation fault during compilation.

*cpp runtime should be standard library sorry.

April 22, 2021

On Thursday, 22 April 2021 at 06:31:14 UTC, Ferhat Kurtulmuş wrote:

>

On Wednesday, 21 April 2021 at 18:03:57 UTC, Imperatorn wrote:

>

[...]

Thank you for your valued efforts. I would like to report some additional results of my tests. I could also compile dub by adding "gdruntime" "gphobos" "wsock32" "ws2_32" in dub.sdl. I don't know if it is expected, but it looks like GDC does not link Phobos automatically as LDC does. If I am not wrong g++ also expects c++ runtime must be linked explicitly with -lstd++. And, I tried a simple SDL2 based dub project but I got a Segmentation fault during compilation.

Did you try running this with the build script pointing to http://github.com/Imperatorn/gcc?