LDC error in termux.
kinke
noone at nowhere.com
Mon Aug 9 19:49:54 UTC 2021
On Monday, 9 August 2021 at 19:31:29 UTC, _Coffee wrote:
> Sorry about the possible beginner error, but when installing
> ldc (`pkg install ldc`) in termux and testing it with a "Hello
> world" program, it returned an error.
>
> ```
> $ vim hello_world.d
> $ ldc2 hello_world.d
> clang-12: error: invalid linker name in argument '-fuse-ld=bfd'
> Error: /data/data/com.termux/files/usr/bin/cc failed with
> status: 1
> ```
What arch are you on? - Termux is special and doesn't provide the
`ld.bfd` linker/symlink for some reason (unlike the Android NDK).
That's at least known to be the case for AArch64, so the config
file for Termux AArch64 builds includes `-linker=` (yes, empty)
as default cmdline option to make it work (=> use default `ld`).
See
https://github.com/termux/termux-packages/blob/2b1e6e3e476bd932eda6d7805e8c239abb2d8d8c/packages/ldc/build.sh#L195-L198.
More information about the Digitalmars-d
mailing list