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: std.container.rbtree has no search method?! e.g. `contains`, `canFind`

2024-07-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 13 July 2024 at 17:41:42 UTC, mw wrote: Hi, on doc: https://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree I cannot find any search method?! e.g. `contains`, `canFind`. Is this a over look? Or there are such functions else where? The functions are called `equalRange`

Re: std.container.rbtree has no search method?! e.g. `contains`, `canFind`

2024-07-13 Thread Dennis via Digitalmars-d-learn
On Saturday, 13 July 2024 at 17:41:42 UTC, mw wrote: I cannot find any search method?! e.g. `contains`, `canFind`. Is this a over look? Or there are such functions else where? It's the `in` operator: https://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree.opBinaryRight But indeed, t

std.container.rbtree has no search method?! e.g. `contains`, `canFind`

2024-07-13 Thread mw via Digitalmars-d-learn
Hi, on doc: https://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree I cannot find any search method?! e.g. `contains`, `canFind`. Is this a over look? Or there are such functions else where?

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.