Monday, August 29, 2011

Android D stuff

I opened an account on bitbucket.org finally, in order to fork gdc with some of my 'fixes' that get the druntime and libphobos working in an Android context.

Check that out here.

2 comments:

  1. So now can you write android apps natively using the D programming Language ...anyways about that header files D requires you to compile them to def files because D cant read header files it does'nt have a text preprocessor like C

    ReplyDelete
  2. Hi!

    I have been trying to compile the android NDK with GDC. Right now I've run into a fairly vague error message: "configure: error: cannot compute suffix of object files: cannot compile"

    I was wondering if you or anyone else has also run into this and had some wisdom for getting by it.

    My process to get this far has gone like this:

    Download the r6 ndk from http://dl.google.com/android/ndk/android-ndk-r6-linux-x86.tar.bz2
    Download your version of the r6 ndk from https://bitbucket.org/serotonin/android-gdc-ndk/overview
    Download your version of gdc from
    https://bitbucket.org/serotonin/gdc/overview

    Copy your ndk files into the stock ndk directory (which is "/home/chad/downloads/phonehax/gdc/android-ndk-r6-dest" on my machine). I am doing this because your files seem to be stripped down and lack a bunch of the other stuff, so I want it all to be complete, just in case.

    export NDK=/home/chad/downloads/phonehax/gdc/android-ndk-r6-dest

    Run $NDK/build/tools/download-toolchain-sources.sh /home/chad/downloads/phonehax/gdc/android-tool-sources
    (I needed to modify the download-toolchain-sources.sh file because they changed their repository URL address. you haven't provided an alternative source tree for these, so i wonder if they might be anachronous to the rest of my downloads.)

    Copy your GDC directory into the /home/chad/downloads/phonehax/gdc/android-tool-sources/gcc/gcc-4.4.3/gcc/d and run setup-gcc.sh -v2 from the gcc directory as per GDC's directions.

    Run $NDK/build/tools/rebuild-all-prebuilt.sh --toolchain-src-dir=/home/chad/downloads/phonehax/gdc/android-tool-sources --build-dir=$NDK

    I run into that error sometime in that rebuild-all-prebuilt.sh step.
    Here is (a somewhat truncated version of) the log: http://pastebin.com/xGPpHXKH
    Search for "error:" to see the spot where it errors.

    What I'm ultimately trying to do is just get some binaries so I can try this thing out.

    Please let me know your thoughts, one way or the other.
    I really want D support for on Android. Thank you for working on this!

    ReplyDelete