It's alive! D building D building D, all on Android

Ignacious via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Jan 8 17:05:51 PST 2017


Just reporting here that I was able to get a hello world working 
using windows and UoW.

Some issues I had:

1. Had issues with outdated libraries. (ncurses, gcc, etc)
2. UoW Aniversary is based on Ubuntu 14, I was able to upgrade to 
16.04 following online sources. Lots of snags but eventually 
worked. (had to remove an file like 
50unattended-upgrades.ucf-dist to get everything to finish 
upgrading)

Basically search for solutions of each error online and 
eventually one will work. If anyone does this they could document 
it a bit better for others.

3. Installed android NDK without too much trouble.

4. Building with ldc2 works but must link with something like

$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/clang 
-Wl,-z,nocopyreloc --sysroot=$NDK/platforms/android-9/arch-arm 
-lgcc -gcc-toolchain 
$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 
-target armv7-none-linux-androideabi -no-canonical-prefixes 
-fuse-ld=bfd -Wl,--fix-cortex-a8 -Wl,--no-undefined 
-Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -fPIE -pie -mthumb 
-Wl,--export-dynamic -lc -lm test.o lib/libphobos2-ldc.a 
lib/libdruntime-ldc.a -o test

5. Push to android device and make sure to make executable or it 
will fail silently(e.g., chmod 755 test). Install a terminal 
emulator, obviously.

Haven't tried more complex examples but all the hard work seems 
to be paying off.

Thanks.




More information about the Digitalmars-d-announce mailing list