Re: How to build a statically linked executable, before i loose my mind

2024-07-14 Thread ryuukk_ via Digitalmars-d-learn
On Sunday, 14 July 2024 at 06:34:54 UTC, Richard (Rikki) Andrew Cattermole wrote: On 14/07/2024 5:06 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:44:22 UTC, Richard (Rikki) Andrew Cattermole wrote: On 14/07/2024 4:37 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (R

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 14/07/2024 5:06 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:44:22 UTC, Richard (Rikki) Andrew Cattermole wrote: On 14/07/2024 4:37 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (Rikki) Andrew Cattermole wrote: Seeing ``_d_arraybounds_slice`` missing sounds like

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread ryuukk_ via Digitalmars-d-learn
On Saturday, 13 July 2024 at 16:44:22 UTC, Richard (Rikki) Andrew Cattermole wrote: On 14/07/2024 4:37 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (Rikki) Andrew Cattermole wrote: Seeing ``_d_arraybounds_slice`` missing sounds like druntime isn't being linked against.

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 14/07/2024 4:37 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (Rikki) Andrew Cattermole wrote: Seeing ``_d_arraybounds_slice`` missing sounds like druntime isn't being linked against. It is possible that your distribution of ldc doesn't include a static build of dru

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread ryuukk_ via Digitalmars-d-learn
On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (Rikki) Andrew Cattermole wrote: Seeing ``_d_arraybounds_slice`` missing sounds like druntime isn't being linked against. It is possible that your distribution of ldc doesn't include a static build of druntime/phobos. You need to verify that l

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Seeing ``_d_arraybounds_slice`` missing sounds like druntime isn't being linked against. It is possible that your distribution of ldc doesn't include a static build of druntime/phobos. You need to verify that ld is trying to link against a static build and that static build exists.

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread ryuukk_ via Digitalmars-d-learn
For anyone curious: https://github.com/ryuukk/dls/tree/master ``make build-dcd-release && make build-dls-release`` i'm giving up for now, i'll never touch druntime/phobos/dub never again

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread ryuukk_ via Digitalmars-d-learn
I'm loosing it Even with dub it doesn't work `"lflags": [ "-static", "--link-defaultlib-shared=false" ],` ``` (cut due to forum's limit) trivia.d:(.text._D6dparse6trivia__T22MultiLineCommentHelperHTyaZQBd6__ctorMFNaNbNcNfAyaZSQCtQCp__TQClHTyaZQCt+0x1a9): undefined reference to `_d_arraybound

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 14/07/2024 2:53 AM, ryuukk_ wrote: First of all, i build with `ldmd2` Second of all, i do not use DUB Lastly, it fails with: ``` ldmd2 -L-staticĀ  ... ``` ``` /usr/bin/ld: cannot find -lphobos2-ldc-shared: No such file or directory /usr/bin/ld: cannot find -ldruntime-ldc-shared: No such fi

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread Sergey via Digitalmars-d-learn
On Saturday, 13 July 2024 at 14:53:41 UTC, ryuukk_ wrote: Why does it complain about SHARED when passing STATIC? It depends on the OS and if Linux - distribution.