Statically compiled binary with C interop crashes.
yabobay
yabobay at yahoo.com
Wed Apr 17 11:03:22 UTC 2024
I'm using [dray](https://code.dlang.org/packages/dray) in my
project with dub, here's the relevant parts of the dub.json:
```json
"dependencies" : {"dray": "~>4.2.0-r3"},
"dflags-ldc": ["--static"],
"lflags": ["-static"]
```
In my regular setup with Debian, i can compile and run my code
dynamically just fine, but i wanted to make a static executable
so i made an alpine container where i was able to do that, but
running it gives me this:
```
INFO: Initializing raylib 4.2
INFO: Supported raylib modules:
INFO: > rcore:..... loaded (mandatory)
INFO: > rlgl:...... loaded (mandatory)
INFO: > rshapes:... loaded (optional)
INFO: > rtextures:. loaded (optional)
INFO: > rtext:..... loaded (optional)
INFO: > rmodels:... loaded (optional)
INFO: > raudio:.... loaded (optional)
WARNING: GLFW: Error: 65544 Description: X11: Failed to load Xlib
fish: Job 1, './ttn' terminated by signal SIGSEGV (Address
boundary error)
```
Why would it need to load Xlib? Shouldn't it be packed in with
the executable?
More information about the Digitalmars-d-learn
mailing list