Re: Would APEs work with D?

2024-04-15 Thread Imperatorn via D.gnu

On Friday, 22 March 2024 at 15:12:16 UTC, redthing1 wrote:

On Tuesday, 18 May 2021 at 14:43:52 UTC, Imperatorn wrote:

On Tuesday, 18 May 2021 at 08:40:10 UTC, Iain Buclaw wrote:
On Monday, 17 May 2021 at 11:08:33 UTC, Raimondo Mancino 
wrote:

[...]


The command would be pretty much the same as gcc (`-nostdinc 
-nostdlib`), but instead of `-include cosmopolitan.h`, you'd 
pass a cosmopolitan binding module (importC may solve the 
need for that), and a minimal (possibly empty) object.d to 
satisfy the compiler's need to have an object module.


Brace yourself... ImportC is coming.


Now that ImportC is here, may I ask: did you get this working? 
I'm also very interested in it.


I actually didn't find time to try it. But maybe someone else has?


Re: cross-GDC for tiny embedded Linux

2023-10-30 Thread Imperatorn via D.gnu
On Wednesday, 25 October 2023 at 17:11:11 UTC, Dmitry Ponyatov 
wrote:
How/where are you referencing mmap64? Could some include be 
missing or path issue?


ref/gcc-12.3.0/libphobos/libdruntime/core/internal/gc/os.d:145
ref/gcc-12.3.0/libphobos/libdruntime/core/thread/fiber.d:1050
host/lib/gcc/i686-linux-musl/12.3.0/../../../../i686-linux-musl/lib/libgphobos.a(os.o)
etc


Did you solve it?


Re: cross-GDC for tiny embedded Linux

2023-10-22 Thread Imperatorn via D.gnu

On Sunday, 22 October 2023 at 21:52:18 UTC, Dmitry Ponyatov wrote:

[...]


fixed by moving to `musl` usage -- not a surprise that `uClibc` 
becomes obsoleted libc comparing their compilation time, 
configuration complexity, and incompatibility with modern 
toolchains


[...]


How/where are you referencing mmap64? Could some include be 
missing or path issue?


Re: etc.c.sqlite3 missing from GDC phobos since gcc-12?

2023-09-22 Thread Imperatorn via D.gnu

On Friday, 11 August 2023 at 05:50:43 UTC, Joe Kappus wrote:
I noticed this yesterday when trying to package the dlang 
onedrive client in Gentoo with GDC 13.2 and it failed since it 
requires this.


It appears to have been removed when gdc became self-hosting in 
gcc during the gcc-12 release cycle.


There when it was present: 
https://github.com/gcc-mirror/gcc/tree/releases/gcc-11.2.0/libphobos/src/etc/c
Gone now: 
https://github.com/gcc-mirror/gcc/tree/releases/gcc-13.2.0/libphobos/src/etc/c
Still in dmd: 
https://github.com/dlang/phobos/blob/master/etc/c/sqlite3.d


I've asked in the #d IRC channel on Libera, and their guess was 
it was omitted by mistake so I'm writing in to verify: Would 
you know whether it's a bug and will return or otherwise why it 
got dropped? Thanks!


Hmm, is the plan that it should be on dub instead?


Re: Are there any GDC builds available for Windows?

2021-10-29 Thread Imperatorn via D.gnu

On Friday, 29 October 2021 at 15:42:26 UTC, Mike Parker wrote:

On Friday, 29 October 2021 at 13:37:16 UTC, Imperatorn wrote:


Yes! I would say that's the place where discussions happen in 
general.


https://discord.gg/bMZk9Q4


Eh, plenty of discussion happens here, too. Discord is where 
fast-paced discussions happen. Forum discussions are less 
frantic and easier to keep up with when you don't have time to 
scroll through the 300+ messages that were posted since the 
last time you checked. Not dissing the Discord server :-) Just 
noting that it's more suited to real-time discussion.





Re: Are there any GDC builds available for Windows?

2021-10-29 Thread Imperatorn via D.gnu

On Friday, 29 October 2021 at 13:30:00 UTC, Preetpal wrote:

On Monday, 18 October 2021 at 18:41:20 UTC, Imperatorn wrote:

https://forum.dlang.org/post/wxhgplqtvtqhkeeks...@forum.dlang.org

On Saturday, 19 June 2021 at 23:08:46 UTC, Preetpal wrote:

On Friday, 23 April 2021 at 11:43:59 UTC, Imperatorn wrote:

[...]


Are there any new problems in solving this issue or is it an 
issue of time? Also, were there any other blocking issues?


Are you on Discord? We are there if you have more questions 


Sorry for not replying sooner, I never got a message for this 
in my email.


I am not on Discord, I have never used it before and am not 
familiar with it. Is there a place for D lang on Discord where 
I should go if I have more questions?


Yes! I would say that's the place where discussions happen in 
general.


https://discord.gg/bMZk9Q4


Are there any GDC builds available for Windows?

2021-10-18 Thread Imperatorn via D.gnu

https://forum.dlang.org/post/wxhgplqtvtqhkeeks...@forum.dlang.org

On Saturday, 19 June 2021 at 23:08:46 UTC, Preetpal wrote:

On Friday, 23 April 2021 at 11:43:59 UTC, Imperatorn wrote:
On Thursday, 22 April 2021 at 09:59:23 UTC, Ferhat Kurtulmuş 
wrote:

[...]


The good news is, there aren't many of them. So we can fix it, 
but the initial time plan is out of the picture. Maybe some 
time in May?


Are there any new problems in solving this issue or is it an 
issue of time? Also, were there any other blocking issues?


Are you on Discord? We are there if you have more questions 


Re: Are there any GDC builds available for Windows?

2021-06-22 Thread Imperatorn via D.gnu

On Saturday, 19 June 2021 at 23:08:46 UTC, Preetpal wrote:

On Friday, 23 April 2021 at 11:43:59 UTC, Imperatorn wrote:
On Thursday, 22 April 2021 at 09:59:23 UTC, Ferhat Kurtulmuş 
wrote:

[...]


The good news is, there aren't many of them. So we can fix it, 
but the initial time plan is out of the picture. Maybe some 
time in May?


Are there any new problems in solving this issue or is it an 
issue of time? Also, were there any other blocking issues?


Most things should be fixed now. Unfortunately I don't have any 
time right now. Iain is your best hope!


Re: Would APEs work with D?

2021-05-18 Thread Imperatorn via D.gnu

On Tuesday, 18 May 2021 at 08:40:10 UTC, Iain Buclaw wrote:

On Monday, 17 May 2021 at 11:08:33 UTC, Raimondo Mancino wrote:

[...]


The command would be pretty much the same as gcc (`-nostdinc 
-nostdlib`), but instead of `-include cosmopolitan.h`, you'd 
pass a cosmopolitan binding module (importC may solve the need 
for that), and a minimal (possibly empty) object.d to satisfy 
the compiler's need to have an object module.


Brace yourself... ImportC is coming.


Re: Are there any GDC builds available for Windows?

2021-04-23 Thread Imperatorn via D.gnu
On Thursday, 22 April 2021 at 09:59:23 UTC, Ferhat Kurtulmuş 
wrote:

On Thursday, 22 April 2021 at 09:40:51 UTC, Imperatorn wrote:

On Thursday, 22 April 2021 at 07:19:37 UTC, Imperatorn wrote:

[...]


Currently these seem to not be correctly linked in libphobos:
process.d needs shell32.lib
advapi32.d needs advapi32.lib
winsock2.d needs ws2_32
socket.d needs ws2_32.lib and wsock32.lib

Since gcc doesn't support pragma lib we have to fix those 
(it's used in the sources)


Yes, I saw those definitions in the sources of Phobos and 
thought that they might be the reason. libphobos shouldn't have 
relied on those pragmas. In the current situation, each 
compiler somehow has to support them. I see here[1] that LDC 
supports them.


https://github.com/ldc-developers/ldc/blob/master/CHANGELOG.md#ldc-1200-2020-02-14


The good news is, there aren't many of them. So we can fix it, 
but the initial time plan is out of the picture. Maybe some time 
in May?


Re: Are there any GDC builds available for Windows?

2021-04-22 Thread Imperatorn via D.gnu
On Thursday, 22 April 2021 at 09:59:23 UTC, Ferhat Kurtulmuş 
wrote:

On Thursday, 22 April 2021 at 09:40:51 UTC, Imperatorn wrote:

On Thursday, 22 April 2021 at 07:19:37 UTC, Imperatorn wrote:

[...]


Currently these seem to not be correctly linked in libphobos:
process.d needs shell32.lib
advapi32.d needs advapi32.lib
winsock2.d needs ws2_32
socket.d needs ws2_32.lib and wsock32.lib

Since gcc doesn't support pragma lib we have to fix those 
(it's used in the sources)


Yes, I saw those definitions in the sources of Phobos and 
thought that they might be the reason. libphobos shouldn't have 
relied on those pragmas. In the current situation, each 
compiler somehow has to support them. I see here[1] that LDC 
supports them.


https://github.com/ldc-developers/ldc/blob/master/CHANGELOG.md#ldc-1200-2020-02-14


Yeah, DMD and LDC supports them, but not G[D|C]C


Re: Are there any GDC builds available for Windows?

2021-04-22 Thread Imperatorn via D.gnu

On Thursday, 22 April 2021 at 07:19:37 UTC, Imperatorn wrote:
On Thursday, 22 April 2021 at 07:09:01 UTC, Ferhat Kurtulmuş 
wrote:

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

[...]


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


I did not understand what you mean, I am sorry. If you mean if 
I used your build scripts in gist repo[1], yes.


1: 
https://gist.githubusercontent.com/Imperatorn/7d37f22140ea5b2c80dee5a862a3/raw/761ea945c28586f5c6bbc2e09d93a27383701da8/build.sh


Sorry, yes, that's what I meant. I'm currently trying another 
branch, I'll report back when I have more information.


Currently these seem to not be correctly linked in libphobos:
process.d needs shell32.lib
advapi32.d needs advapi32.lib
winsock2.d needs ws2_32
socket.d needs ws2_32.lib and wsock32.lib

Since gcc doesn't support pragma lib we have to fix those (it's 
used in the sources)


Re: Are there any GDC builds available for Windows?

2021-04-22 Thread Imperatorn via D.gnu
On Thursday, 22 April 2021 at 07:09:01 UTC, Ferhat Kurtulmuş 
wrote:

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

[...]


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


I did not understand what you mean, I am sorry. If you mean if 
I used your build scripts in gist repo[1], yes.


1: 
https://gist.githubusercontent.com/Imperatorn/7d37f22140ea5b2c80dee5a862a3/raw/761ea945c28586f5c6bbc2e09d93a27383701da8/build.sh


Sorry, yes, that's what I meant. I'm currently trying another 
branch, I'll report back when I have more information.


Re: Are there any GDC builds available for Windows?

2021-04-22 Thread Imperatorn via D.gnu
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?


Re: Are there any GDC builds available for Windows?

2021-04-21 Thread Imperatorn via D.gnu

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

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


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.


Re: Are there any GDC builds available for Windows?

2021-04-11 Thread Imperatorn via D.gnu

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.


Re: Are there any GDC builds available for Windows?

2021-04-11 Thread Imperatorn via D.gnu
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?


Re: Are there any GDC builds available for Windows?

2021-04-10 Thread Imperatorn via D.gnu
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?


Re: Are there any GDC builds available for Windows?

2021-04-09 Thread Imperatorn via D.gnu

On Friday, 9 April 2021 at 18:37:23 UTC, Ferhat Kurtulmuş wrote:

On Friday, 9 April 2021 at 18:13:31 UTC, Imperatorn wrote:

[...]


Yes. "hello world" compiles and runs. Now I am trying to 
compile dub. I found https://github.com/D-Programming-GDC/GDMD. 
but I decided to use dub for building dub with
```somefolder/bin/dub.exe build --compiler=gdc ``` which is 
easier for me.


[...]


I can take a look in a couple of hours, in the meantime, read 
this:

https://stackoverflow.com/questions/335928/ld-cannot-find-an-existing-library


Re: Are there any GDC builds available for Windows?

2021-04-09 Thread Imperatorn via D.gnu

On Friday, 9 April 2021 at 17:45:12 UTC, Ferhat Kurtulmuş wrote:

On Friday, 9 April 2021 at 17:32:51 UTC, Ferhat Kurtulmuş wrote:

On Thursday, 8 April 2021 at 19:10:03 UTC, Imperatorn wrote:

[...]


Very good job. I am playing around with it. I am not so much 
familiar with GDC. Looks like there is no something like 
"rdmd" in /opt/mingw64/bin? I want to test it to build dub.


I think there should be a gdmd executable. My compilations 
process did not yield one.


Did you succeed in building?


Re: Are there any GDC builds available for Windows?

2021-04-08 Thread Imperatorn via D.gnu

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/7d37f22140ea5b2c80dee5a862a3/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


Re: Are there any GDC builds available for Windows?

2021-04-07 Thread Imperatorn via D.gnu

On Thursday, 8 April 2021 at 02:13:10 UTC, Preetpal wrote:

On Wednesday, 7 April 2021 at 23:01:41 UTC, Imperatorn wrote:

On Wednesday, 7 April 2021 at 22:37:33 UTC, Preetpal wrote:

On Tuesday, 6 April 2021 at 05:49:16 UTC, Imperatorn wrote:
Just FYI, we're getting closer, but have some stuff not 
working properly with std.stdio.


You can use it now but with printf:
https://gofile.io/d/mdCW2c


That's great. Thanks for the progress update.


Just got a version working with std.stdio as well. Try it out 
and report any bugs:

https://github.com/Imperatorn/gcc/releases


How are you building this on Windows? Are you doing anything 
beyond running ./configure in the repo from the mingw-w64 
command line and running the build process?


I think there probably were some other artifacts related to 
your build environment that were on your path that were 
necessary to run the GDC build that you did not package in the 
release.


Sorry, I forgot to say, you cannot currently build it without 
special configuration. I'll upload a build script later.


I just meant running the executables and see what errors you get. 
I see that I missed to upload some files, I'll fix that.


I also want to take the opportunity to thank Iain Buclaw and Adam 
D Ruppe for making this possible!


Stay tuned


Re: Are there any GDC builds available for Windows?

2021-04-05 Thread Imperatorn via D.gnu

On Tuesday, 6 April 2021 at 05:49:16 UTC, Imperatorn wrote:

On Sunday, 21 March 2021 at 13:26:53 UTC, Preetpal wrote:

On Sunday, 21 March 2021 at 11:19:57 UTC, Imperatorn wrote:

On Sunday, 21 March 2021 at 06:30:03 UTC, Preetpal wrote:

[...]


I'm working in parallell with Adam Ruppe on it. Iain has a 
patch that we're looking at. Time wise, maybe a couple of 
weeks? A month?


We technically have native gdc for Windows already, but we 
want it everything to "just work" TM.


That's awesome. It's better to have everything to "just work" 
than doing an early release.


Just FYI, we're getting closer, but have some stuff not working 
properly with std.stdio.


You can use it now but with printf:
https://gofile.io/d/mdCW2c


gdc --version
gdc (GCC) 11.0.1 20210321


Re: Are there any GDC builds available for Windows?

2021-03-22 Thread Imperatorn via D.gnu

On Sunday, 21 March 2021 at 13:26:53 UTC, Preetpal wrote:

On Sunday, 21 March 2021 at 11:19:57 UTC, Imperatorn wrote:

On Sunday, 21 March 2021 at 06:30:03 UTC, Preetpal wrote:

On Saturday, 20 March 2021 at 13:36:41 UTC, Imperatorn wrote:

[...]


That's cool :). Do you have any idea though when? Are you 
working on the native Windows GDC build?


I'm working in parallell with Adam Ruppe on it. Iain has a 
patch that we're looking at. Time wise, maybe a couple of 
weeks? A month?


We technically have native gdc for Windows already, but we 
want it everything to "just work" TM.


That's awesome. It's better to have everything to "just work" 
than doing an early release.


Yeah, we will post smth when we're ready. We will try to also get 
it into mingw.


Re: Are there any GDC builds available for Windows?

2021-03-21 Thread Imperatorn via D.gnu

On Sunday, 21 March 2021 at 06:30:03 UTC, Preetpal wrote:

On Saturday, 20 March 2021 at 13:36:41 UTC, Imperatorn wrote:

On Sunday, 21 February 2021 at 01:56:28 UTC, Preetpal wrote:

It would be great if it GDC could be installed with MSYS2.


Update:
There will soon be a native Windows gdc build w native 
druntime! Wait for it :)


That's cool :). Do you have any idea though when? Are you 
working on the native Windows GDC build?


I'm working in parallell with Adam Ruppe on it. Iain has a patch 
that we're looking at. Time wise, maybe a couple of weeks? A 
month?


We technically have native gdc for Windows already, but we want 
it everything to "just work" TM.


Re: Are there any GDC builds available for Windows?

2021-03-20 Thread Imperatorn via D.gnu

On Sunday, 21 February 2021 at 01:56:28 UTC, Preetpal wrote:

It would be great if it GDC could be installed with MSYS2.


Update:
There will soon be a native Windows gdc build w native druntime! 
Wait for it :)


Re: Are there any GDC builds available for Windows?

2021-02-23 Thread Imperatorn via D.gnu

On Sunday, 21 February 2021 at 01:56:28 UTC, Preetpal wrote:

It would be great if it GDC could be installed with MSYS2.


IIRC gcc will be updated with it later this year. Iain Buclaw 
would know more about this tho.


Re: Are there any GDC builds available for Windows?

2021-02-23 Thread Imperatorn via D.gnu

On Tuesday, 23 February 2021 at 10:16:33 UTC, Imperatorn wrote:

On Sunday, 21 February 2021 at 01:56:28 UTC, Preetpal wrote:

It would be great if it GDC could be installed with MSYS2.


IIRC gcc will be updated with it later this year. Iain Buclaw 
would know more about this tho.


with *it* I meant latest D just to clarify 