Re: how to install the new dmd on Mac M1?

2022-08-25 Thread MichaelBi via Digitalmars-d-learn

On Friday, 26 August 2022 at 00:55:05 UTC, Nicholas Wilson wrote:

On Friday, 26 August 2022 at 00:34:30 UTC, MichaelBi wrote:
when using ldc2, has this error "ld: library not found for 
-lssl" after dub build --compiler=ldc2


So where is your ssl library located and how (if at all) are 
you telling the compiler/linker where to find it?


I installed openssl and also export the path of lib, but still 
got that errors...


Re: how to install the new dmd on Mac M1?

2022-08-25 Thread MichaelBi via Digitalmars-d-learn
On Thursday, 25 August 2022 at 15:19:56 UTC, Steven Schveighoffer 
wrote:

On 8/25/22 10:44 AM, MichaelBi wrote:
On Thursday, 25 August 2022 at 14:37:01 UTC, Steven 
Schveighoffer wrote:

[...]


it's simple as following:

-iMac ~ % curl -fsS https://dlang.org/install.sh | bash -s dmd
Unsupported Arch arm64


So install.sh is checking the architecture, and failing because 
the OS reports it as arm64.


```sh
case $(uname -m) in
x86_64|amd64) ARCH=x86_64; MODEL=64;;
aarch64) ARCH=aarch64; MODEL=64;;
i*86) ARCH=x86; MODEL=32;;
*)
fatal "Unsupported Arch $(uname -m)"
;;
```

You could change the line that starts with `aarch64` to 
`aarch64|arm64`


That might work. I'm not sure, because really you want x86_64 
for dmd (there is no aarch64 or arm64 build of dmd).


Have you tried using the dmg package?

-Steve


you are right, the package install is OK. but after running dub 
build --compiler=dmd, the error of "ld: library not found for - 
lssl" is still there...


Re: Comping a Musl-linked druntime & phobos?

2022-08-25 Thread TheGag96 via Digitalmars-d-learn

On Thursday, 25 August 2022 at 01:52:15 UTC, Mathias LANG wrote:

(snip)


Hmmm... Maybe I don't understand. What exactly *is* Alpine Linux 
doing? That .patch file didn't contain anything substantial. It 
looks like it has some version of LDC on hand to use, probably 
already set up properly to use Musl. You're saying that you 
shouldn't need to pass in `-target` because if the compiler was 
compiled with `CRuntime_Musl`, it will just use that 
automatically. But that requires exactly what I don't have: a 
compiler that uses Musl. Am I missing something?


Re: how to install the new dmd on Mac M1?

2022-08-25 Thread Nicholas Wilson via Digitalmars-d-learn

On Friday, 26 August 2022 at 00:34:30 UTC, MichaelBi wrote:
when using ldc2, has this error "ld: library not found for 
-lssl" after dub build --compiler=ldc2


So where is your ssl library located and how (if at all) are you 
telling the compiler/linker where to find it?




Re: how to install the new dmd on Mac M1?

2022-08-25 Thread MichaelBi via Digitalmars-d-learn

On Thursday, 25 August 2022 at 16:06:49 UTC, Ben Jones wrote:
On Thursday, 25 August 2022 at 15:19:56 UTC, Steven 
Schveighoffer wrote:

On 8/25/22 10:44 AM, MichaelBi wrote:
On Thursday, 25 August 2022 at 14:37:01 UTC, Steven 
Schveighoffer wrote:

On 8/25/22 10:19 AM, MichaelBi wrote:



Is there a reason you want to use DMD specifically?  If you use 
homebrew then `brew install ldc dub` will just works for dub 
projects, and to explicitly run the compiler just use `ldc2` 
instead of `dmd`.  LDC is actually an ARM executable and 
outputs ARM executables.  I assume it's easy to install ldc 
without homebrew, but I haven' tried.


when using ldc2, has this error "ld: library not found for -lssl" 
after dub build --compiler=ldc2


Re: How do you work with lst files?

2022-08-25 Thread Bastiaan Veelo via Digitalmars-d-learn
On Wednesday, 24 August 2022 at 22:29:51 UTC, Christian Köstlin 
wrote:
I want to ask around how you from the dlang community work with 
.lst coverage files?


No personal experience, but there are half a dozen options on 
https://code.dlang.org/search?q=Coverage


— Bastiaan.


Re: how to install the new dmd on Mac M1?

2022-08-25 Thread Ben Jones via Digitalmars-d-learn
On Thursday, 25 August 2022 at 15:19:56 UTC, Steven Schveighoffer 
wrote:

On 8/25/22 10:44 AM, MichaelBi wrote:
On Thursday, 25 August 2022 at 14:37:01 UTC, Steven 
Schveighoffer wrote:

On 8/25/22 10:19 AM, MichaelBi wrote:



Is there a reason you want to use DMD specifically?  If you use 
homebrew then `brew install ldc dub` will just works for dub 
projects, and to explicitly run the compiler just use `ldc2` 
instead of `dmd`.  LDC is actually an ARM executable and outputs 
ARM executables.  I assume it's easy to install ldc without 
homebrew, but I haven' tried.


Re: how to install the new dmd on Mac M1?

2022-08-25 Thread Steven Schveighoffer via Digitalmars-d-learn

On 8/25/22 10:44 AM, MichaelBi wrote:

On Thursday, 25 August 2022 at 14:37:01 UTC, Steven Schveighoffer wrote:

On 8/25/22 10:19 AM, MichaelBi wrote:
I downloaded the new dmd 2.1 on Mac, but with fail message of 
"unsupported Arch arm64". how can I do? thanks.


DMD is x86 only. M1 macs can run x86 via rosetta.

I haven't had this specific problem. Can you list the actual commands 
you are running, and the output from the system?


-Steve


it's simple as following:

-iMac ~ % curl -fsS https://dlang.org/install.sh | bash -s dmd
Unsupported Arch arm64


So install.sh is checking the architecture, and failing because the OS 
reports it as arm64.


```sh
case $(uname -m) in
x86_64|amd64) ARCH=x86_64; MODEL=64;;
aarch64) ARCH=aarch64; MODEL=64;;
i*86) ARCH=x86; MODEL=32;;
*)
fatal "Unsupported Arch $(uname -m)"
;;
```

You could change the line that starts with `aarch64` to `aarch64|arm64`

That might work. I'm not sure, because really you want x86_64 for dmd 
(there is no aarch64 or arm64 build of dmd).


Have you tried using the dmg package?

-Steve


Re: how to install the new dmd on Mac M1?

2022-08-25 Thread MichaelBi via Digitalmars-d-learn
On Thursday, 25 August 2022 at 14:37:01 UTC, Steven Schveighoffer 
wrote:

On 8/25/22 10:19 AM, MichaelBi wrote:
I downloaded the new dmd 2.1 on Mac, but with fail message of 
"unsupported Arch arm64". how can I do? thanks.


DMD is x86 only. M1 macs can run x86 via rosetta.

I haven't had this specific problem. Can you list the actual 
commands you are running, and the output from the system?


-Steve


it's simple as following:

-iMac ~ % curl -fsS https://dlang.org/install.sh | bash -s dmd
Unsupported Arch arm64


Re: how to install the new dmd on Mac M1?

2022-08-25 Thread Steven Schveighoffer via Digitalmars-d-learn

On 8/25/22 10:19 AM, MichaelBi wrote:
I downloaded the new dmd 2.1 on Mac, but with fail message of 
"unsupported Arch arm64". how can I do? thanks.


DMD is x86 only. M1 macs can run x86 via rosetta.

I haven't had this specific problem. Can you list the actual commands 
you are running, and the output from the system?


-Steve


how to install the new dmd on Mac M1?

2022-08-25 Thread MichaelBi via Digitalmars-d-learn
I downloaded the new dmd 2.1 on Mac, but with fail message of 
"unsupported Arch arm64". how can I do? thanks.


Re: How to build DMD/Phobos on Windows

2022-08-25 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 24 August 2022 at 21:11:42 UTC, rikki cattermole 
wrote:

For dmd you use build.d that is in the repository.



Hm, I guess the makefiles should be deleted?


For phobos win64.mak (used for 32bit by default as well):

"# Makefile to build D runtime library phobos{64,32mscoff}.lib 
for Windows MSVC"


So MSVC make.


It’s a shame as I cannot install MSVC on this laptop 
(permissions).




Beyond that idk, but its starting point (oh and druntime is now 
in dmd repo, so ugh... yeah)


Yeah, I see that build become more involved.



Re: How to build DMD/Phobos on Windows

2022-08-25 Thread bauss via Digitalmars-d-learn
On Wednesday, 24 August 2022 at 21:11:42 UTC, rikki cattermole 
wrote:

For dmd you use build.d that is in the repository.

For phobos win64.mak (used for 32bit by default as well):

"# Makefile to build D runtime library phobos{64,32mscoff}.lib 
for Windows MSVC"


So MSVC make.

Beyond that idk, but its starting point (oh and druntime is now 
in dmd repo, so ugh... yeah)


We really need a page in the documentation that describes how to 
build each component of D for each major platform.