Can't run executable built with Dub - OS thinks it is shared library
Stephen C
schatelain at msn.com
Fri Oct 29 02:29:47 UTC 2021
On Wednesday, 27 October 2021 at 22:09:26 UTC, Paul Backus wrote:
> [Since Debian 9][1], pretty much all Debian-based distros have
> their C toolchain set up to produce position-independent
> executables by default. So you will probably need to have DMD
> pass `-no-pie` when it invokes GCC to link the executable (or
> do a separate link step and pass it yourself).
>
> [1]:
> https://www.debian.org/releases/stretch/i386/release-notes/ch-information.en.html#pie-is-now-default
I just wanted to post that this worked. Running DMD with the "-v"
flag showed exactly how it uses CC to link. I was able to compile
with DMD and then add the "-no-pie" flag to the CC linker command
and it works perfectly now - the binary is tagged as "executable"
and can now be run by clicking it's icon in the GUI.
Thanks, Paul.
More information about the Digitalmars-d
mailing list