Thread overview
How can I build dynamic library with ldc in termux?
Mar 03
Domain
Mar 03
Domain
Mar 03
Domain
Mar 03
kinke
Mar 03
Domain
March 03
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared
March 03
On Sunday, 3 March 2019 at 01:47:50 UTC, Domain wrote:
> /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared
> /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared

Any dub config example?
~> dub build
Dynamic libraries are not yet supported as dependencies - building as static library.
Performing "debug" build using /data/data/com.termux/files/usr/bin/ldc2 for aarch64, arm_hardfloat.
dll:so ~master: target for configuration "library" is up to date.
dll ~master: building configuration "application"...
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
Error: /data/data/com.termux/files/usr/bin/gcc failed with status: 1
/data/data/com.termux/files/usr/bin/ldc2 failed with exit code 1.

March 03
On Sunday, 3 March 2019 at 01:51:49 UTC, Domain wrote:
> On Sunday, 3 March 2019 at 01:47:50 UTC, Domain wrote:
>> /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared
>> /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared
>
> Any dub config example?

Perhaps this:

add this flag to your dub.json:

    "dflags-linux-dmd": ["-defaultlib=libphobos2.a"],

and if you are using SDLang, convert it to JSON before :)
March 03
On Sunday, 3 March 2019 at 01:47:50 UTC, Domain wrote:
> /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared
> /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared

Looks like that package isn't set-up 100% correctly - there should be a `-link-defaultlib-shared=false` as default switch in the etc/ldc2.conf config file if the package doesn't contain shared druntime/Phobos.
March 03
On Sunday, 3 March 2019 at 12:25:28 UTC, kinke wrote:
> On Sunday, 3 March 2019 at 01:47:50 UTC, Domain wrote:
>> /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared
>> /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared
>
> Looks like that package isn't set-up 100% correctly - there should be a `-link-defaultlib-shared=false` as default switch in the etc/ldc2.conf config file if the package doesn't contain shared druntime/Phobos.

It seems already there:
// default switches injected before all explicit comma>
      switches = [
          "-defaultlib=phobos2-ldc,druntime-ldc",
          "-link-defaultlib-shared=false",
      ];
March 03
On Sunday, 3 March 2019 at 01:51:49 UTC, Domain wrote:
> [...]

Sorry, my mistake.
I can build dynamic library now.