Android Status

Ignacious via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jan 8 16:40:35 PST 2017


On Sunday, 8 January 2017 at 22:19:31 UTC, Joakim wrote:
> On Sunday, 8 January 2017 at 21:52:01 UTC, Ignacious wrote:
>> Not sure what is going on, of course ;) So much BS just to do 
>> something that is suppose to be simple ;)
>>
>>
>> test.d
>>
>>
>>
>> void main()
>> {
>>
>> }
>>
>> here is test.o
>>
>> http://pastebin.com/NRrKgKtb
>>
>> Any ideas?
>
> Oh, that's easy: install the NDK too, as shown on the wiki.  
> You need the linker that supports ARM from the NDK.  Follow the 
> instructions from the wiki to compile and link the binary, 
> simply having ldc do everything won't work.
>

Ok, after executing

$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

I get a test elf file with no errors(although 2.5MB for a hello 
world).

I had to do the chmod 755 test

then

./test

to get any output. Before that no output and no errors so wasn't 
sure what as going on.

Looks like everything is working! ;)

Seems like someone really needs to put some time in to getting 
all this stuff organized and situated

Maybe the D language foundation can push some money towards it to 
get it started off on the right foot?

I'll try to get some of the opengl examples on your repository to 
see if they work soon.


> Cross-compiler toolchains are never simple, consider yourself 
> lucky for having gotten off easy. :)

I realize things are difficult but it's people that make it that 
way ;) Life would be so much simpler if people would just 
properly document stuff exactly(or, rather, do what they are 
suppose to do). (Even windows seems to love to forget to put in 
descriptions of services, tasks, application descriptions, etc).

The main problem I have had seems to be that UoW uses ver 14. 
Somehow I was able to upgrade by following docs online(wasn't 
easy but eventually got there and everything seems to work... I 
should have documented ;) but I wasn't sure if the process would 
work. Supposedly ver 16 exists by one has to be part of the dev 
team or something.



More information about the Digitalmars-d-learn mailing list