Android Status

Joakim via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 9 00:28:04 PST 2017


On Monday, 9 January 2017 at 00:40:35 UTC, Ignacious wrote:
> 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! ;)

Good to hear it finally works. :D

> 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.

I don't think money is the issue as much as people like you 
trying it on your own platform and documenting any problems you 
find.

>> 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).

I've tried to write up detailed instructions on the wiki.  I'm 
still improving those and plan to spin off those two sections I 
linked you, on how to just build the samples, into their own 
page.  You can contribute any steps you had to take with 
Bash/Ubuntu on Windows with the prebuilt linux/x64 cross-compiler 
there, once I put the page up.

> 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.

If you know all the steps to upgrade Ubuntu on Windows, you may 
want to document them on the wiki page I will put up or link to a 
good resource that shows how to do it.


More information about the Digitalmars-d-learn mailing list