Results 1 to 2 of 2

Thread: Kawa for android won't build

  1. #1
    Join Date
    Jan 2010
    Location
    Albany, NY USA
    Posts
    118

    Default Kawa for android won't build

    Hi everybody,

    Has anybody successfully gotten the version of kawa that is supposed to work for android to build? I am following the directions given on the webpage Hello world in Scheme for Android, but the problem is that the current android development kit seems to have a different directory structure than this one this version is made for, and it doesn't really seem to have the same tools/etc.

    The error I get when I point to one of the directories that contains an "android.jar" file as an option to configure (instead of just using the command on the site verbatum, since that file doesn't exist here), when I run make (configure works) is:

    Code:
    malcolm@linux-o9py:~/java/kawa> make
    make[1]: Entering directory `/home/malcolm/java/kawa'
    make do-preprocess SELECTOR='%java6'
    make[2]: Entering directory `/home/malcolm/java/kawa'
    CLASSPATH=.:$CLASSPATH java gnu.kawa.util.PreProcess \
    	  %java6 +use:com.sun.net.httpserver +enable:XML \
    	  `sed -e 's|\([^ ]*\)|./\1|' < ./patch-source-list`
    (variant java6 maps to: +JAVA5 +JAVA2 +use:java.util.IdentityHashMap +use:java.lang.CharSequence +use:java.lang.Throwable.getCause +use:java.net.URI +use:java.util.regex +SAX2 +use:java.nio +use:org.w3c.dom.Node +use:javax.xml.transform +JAXP-1.3 -JAXP-QName +JAVA6 -JAVA7 -JAVA6COMPAT5 +use:java.text.Normalizer -use:java.dyn -Android)
    ./gnu/math/IntNum.java:1352: unknown command: # ifndef JAVA7
    make[2]: *** [do-preprocess] Error 255
    make[2]: Leaving directory `/home/malcolm/java/kawa'
    make[1]: *** [select-java6] Error 2
    make[1]: Leaving directory `/home/malcolm/java/kawa'
    make: *** [selected-java-source] Error 2


    I have the virtual android set up with eclipse and all that, but honestly I don't know any java and I think I would rather just hack around with it in scheme for the time being so I was pretty happy to find kawa on the web. So I guess I was also wondering if I am using an old site or if there are alternative scheme interpreters that would run on android, or some tips on getting this to build. I don't know that a package would help me at this point since I am using the android SDK as it is extracted from a tarball from the android website, so on that front I guess I am just looking for some hints on how to get it to build.

    Thanks,
    Malcolm

  2. #2
    Join Date
    Jan 2010
    Location
    Albany, NY USA
    Posts
    118

    Default Re: Kawa for android won't build

    ok, now I wish I could rename this thread but I don't want to start all over. Trying to program an android in scheme without knowing any java, or having any experience with ant, is beginning to feel like trying to canoe without knowing how to swim. But basically the main problem was that the instructions on that page were old, and the ability to work with android has been a part of the main kawa release for two versions, so I just installed from source kawa-1.10. Also, I found somewhat newer instructions from this blog: Divine Programmer: Android development in Scheme - How to build Kawa for Android SDK 2.0. Which I followed, except for two things:

    1) I used the kawa-1.10 version from the ftp site instead of the trunk from the repository, but I believe the version that I have is more recent than the trunk when either set of instructions were written, and it has the advantage of building, and

    2)There is still a problem in that the new android sdk package doesn't have "android/platforms/android-2.0/android.jar" but rather a "android/platforms/android-?/android.jar" where ? is either a 3, 4, 7 or 8. I think they must have moved to using the API versions instead of the android OS versions in the naming scheme.

    I have tried with all of the android.jar I point to in the ./configure (yes, that is the only way I know to change that setting. yes, that is a royal pain,) And they are all currently giving the following build error (I feel like it used to be different for one of them, but that could just be me). Anyhow this is what I'm getting when I try to build the android HelloScheme project.
    Code:
    Buildfile: build.xml
        [setup] Android SDK Tools Revision 7
        [setup] Project Target: Android 1.5
        [setup] API level: 3
        [setup] 
        [setup] ------------------
        [setup] Resolving library dependencies:
        [setup] ------------------
        [setup] Ordered libraries:
        [setup] ------------------
        [setup] 
        [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions.
    
    -compile-tested-if-test:
    
    -dirs:
         [echo] Creating output directories if needed...
    
    -resource-src:
         [echo] Generating R.java / Manifest.java from the resources...
    
    -aidl:
         [echo] Compiling aidl files into Java classes...
    
    jcompile:
        [javac] Compiling 1 source file to /home/malcolm/hacking/tests/android/HelloScheme/bin/classes
    
    scompile:
         [kawa] (compiling /home/malcolm/hacking/tests/android/HelloScheme/src/miki/helloscheme/HelloScheme.scm to miki.helloscheme.HelloScheme)
    
    compile:
    
    -dex:
         [echo] Converting compiled files and external libraries into /home/malcolm/hacking/tests/android/HelloScheme/bin/classes.dex...
         [echo]          
    
    -package-resources:
         [echo] Packaging resources
     [aaptexec] WARNNG: Using deprecated 'resources' attribute in AaptExecLoopTask.Use nested element(s) <res path="value" /> instead.
     [aaptexec] WARNNG: Using deprecated 'outfolder' attribute in AaptExecLoopTask.Use 'apkfolder' (path) instead.
     [aaptexec] WARNNG: Using deprecated 'basename' attribute in AaptExecLoopTask.Use 'resourcefilename' (string) instead.
     [aaptexec] Creating full resource package...
    
    -package-debug-sign:
    [apkbuilder] WARNING: Using deprecated 'basename' attribute in ApkBuilderTask.Use 'apkfilepath' (path) instead.
    [apkbuilder] WARNING: Using deprecated <file> inner element in ApkBuilderTask.Use <dex path=...> instead.
    
    BUILD FAILED
    /home/malcolm/hacking/tests/android/HelloScheme/build.xml:372: The following error occurred while executing this line:
    /home/malcolm/hacking/tests/android/HelloScheme/build.xml:225: java.lang.NullPointerException
    I have absolutely no idea what any of that means. I think I will try to learn java whenever I get some time, but in the meantime does anyone have any idea what the problem could be?

    Thanks,
    Malcolm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •