www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - LDC error in termux.

reply _Coffee <rukkaplus gmail.com> writes:
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
```
Aug 09 2021
parent reply kinke <noone nowhere.com> writes:
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.
Aug 09 2021
parent _Coffee <rukkaplus gmail.com> writes:
On Monday, 9 August 2021 at 19:49:54 UTC, kinke wrote:
 What arch are you on? - Termux is special and doesn't provide
``` $ uname -a 2020 armv71 Android ``` Are there problems with Architecture armv71 too? I'm sorry, i'm not very expert yet. :(
Aug 09 2021