www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How can I build dynamic library with ldc in termux?

reply Domain <dont_email empty.com> writes:
/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
Mar 02
next sibling parent reply Domain <dont_email empty.com> writes:
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.
Mar 02
next sibling parent Guillaume Piolat <first.last gmail.com> writes:
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 :)
Mar 03
prev sibling parent Domain <dont_email empty.com> writes:
On Sunday, 3 March 2019 at 01:51:49 UTC, Domain wrote:
 [...]
Sorry, my mistake. I can build dynamic library now.
Mar 03
prev sibling parent reply kinke <noone nowhere.com> writes:
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.
Mar 03
parent Domain <dont_email empty.com> writes:
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", ];
Mar 03