Building the sql cipher, not generating the sqlcipher.jar

325 views
Skip to first unread message

Lamchith M C

unread,
Oct 10, 2013, 4:54:47 AM10/10/13
to sqlc...@googlegroups.com
Hi,

I have successfully generated the 3 so files, but the jar file generation is failing. ant release is failing for me. I have installed ant 1.9.2 . Attached is the build.xml used ,Can any one share the correct build.xml. I have tried removing the buil.xml file and again running the android update project -p  so that the build.xml is generated. Do i need to do any changes to this build.xml ? 

I have attached the make error and the build.xml file.

environment: Ubuntu  12.04.3 LTS on virtual box
                    Java 1.7
                    Ant version 1.9.2
                    Android nd r8e
ant_error.txt
build.xml

Lamchith M C

unread,
Oct 10, 2013, 4:59:36 AM10/10/13
to sqlc...@googlegroups.com
FYI: i am trying to build sqlcipher for android

Nick Parker

unread,
Oct 10, 2013, 9:08:43 AM10/10/13
to sqlc...@googlegroups.com
Hi Lamchith,

Your error message states that the aidl program can not be found, which
would need to be on your PATH during the build process. I believe they
have moved aidl around in more recent SDK releases as mine locally is
within the build-tools/18.0.1 directory. Please make sure you have
build tools installed via the Android SDK Manager as well.
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "SQLCipher Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sqlcipher+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
Nick Parker

signature.asc

Lamchith M C

unread,
Oct 15, 2013, 11:33:47 AM10/15/13
to sqlc...@googlegroups.com
Thank you for your reply Nick. I tried installing 18.0.1 and now the error message is same with that of aidl inside 18.0.1.Do i need to do anything else ?
make_error.txt

Nick Parker

unread,
Oct 15, 2013, 11:51:32 AM10/15/13
to sqlc...@googlegroups.com
Hi,

You need to make sure that the directory containing the aidl executable
is in PATH environment variable. When you execute the following:

> which aidl

It should print the full path to the aidl executable. You would need to
execute something like the following, though verify the path is correct
on your machine:

> export PATH=$ANDROID_HOME/build-tools/18.0.1:$PATH
> > an email to sqlcipher+...@googlegroups.com <javascript:>.
> > For more options, visit https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
> --
> Nick Parker
signature.asc

Lamchith M C

unread,
Oct 15, 2013, 12:21:34 PM10/15/13
to sqlc...@googlegroups.com
which aidl is giving /home/lamchith/adt-bundle-linux-x86_64-20130917/sdk/build-tools/18.0.1/aidl and it is present in the PATH.

Nick Parker

unread,
Oct 15, 2013, 12:22:35 PM10/15/13
to sqlc...@googlegroups.com
Hi,

Could you please include the error message you receive when attempting
to build?

On 10/15/13 11:21 AM, Lamchith M C wrote:
> which aidl is giving
> /home/lamchith/adt-bundle-linux-x86_64-20130917/sdk/build-tools/18.0.1/aidl
> and it is present in the PATH.
>
> On Tuesday, October 15, 2013 9:21:32 PM UTC+5:30, Nick Parker wrote:
>
> Hi,
>
> You need to make sure that the directory containing the aidl executable
> is in PATH environment variable. When you execute the following:
>
> > which aidl
>
> It should print the full path to the aidl executable. You would
> need to
> execute something like the following, though verify the path is correct
> on your machine:
>
> > export PATH=$ANDROID_HOME/build-tools/18.0.1:$PATH
>
> On 10/15/13 10:33 AM, Lamchith M C wrote:
> > Thank you for your reply Nick. I tried installing 18.0.1 and now the
> > error message is same with that of aidl inside 18.0.1.Do
> <http://18.0.1.Do> i need to do

Lamchith M C

unread,
Oct 15, 2013, 12:26:59 PM10/15/13
to sqlc...@googlegroups.com

cd /home/lamchith/android-database-sqlcipher/external && \
make -f Android.mk build-local-hack && \
ndk-build && \
make -f Android.mk copy-libs-hack
make[1]: Entering directory `/home/lamchith/android-database-sqlcipher/external'
make[1]: Nothing to be done for `build-local-hack'.
make[1]: Leaving directory `/home/lamchith/android-database-sqlcipher/external'
make[1]: Entering directory `/home/lamchith/android-database-sqlcipher/external'
/home/lamchith/android-database-sqlcipher/external/Android.mk:16: warning: overriding commands for target `sqlcipher/sqlite3.c'
/home/lamchith/android-database-sqlcipher/external/Android.mk:16: warning: ignoring old commands for target `sqlcipher/sqlite3.c'
/home/lamchith/android-database-sqlcipher/external/Android.mk:20: warning: overriding commands for target `copy-libs-hack'
/home/lamchith/android-database-sqlcipher/external/Android.mk:20: warning: ignoring old commands for target `copy-libs-hack'
SharedLibrary  : libsqlcipher_android.so
/home/lamchith/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__dso_handle' in /home/lamchith/android-ndk-r8e/platforms/android-3/arch-arm/usr/lib/crtbegin_so.o is referenced by DSO /home/lamchith/android-database-sqlcipher/external/android-libs/armeabi//libutils.so
Install        : libsqlcipher_android.so => external/libs/armeabi/libsqlcipher_android.so
Install        : libstlport_shared.so => external/libs/armeabi/libstlport_shared.so
Install        : libsqlcipher_android.so => external/libs/x86/libsqlcipher_android.so
Install        : libstlport_shared.so => external/libs/x86/libstlport_shared.so
make[1]: Leaving directory `/home/lamchith/android-database-sqlcipher/external'
make[1]: Entering directory `/home/lamchith/android-database-sqlcipher/external'
install -p -m644 libs/armeabi/*.so ../obj/local/armeabi/
make[1]: Leaving directory `/home/lamchith/android-database-sqlcipher/external'
cd /home/lamchith/android-database-sqlcipher/jni && \
ndk-build
make[1]: Entering directory `/home/lamchith/android-database-sqlcipher/jni'
SharedLibrary  : libdatabase_sqlcipher.so
/home/lamchith/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__dso_handle' in /home/lamchith/android-ndk-r8e/platforms/android-3/arch-arm/usr/lib/crtbegin_so.o is referenced by DSO ../external/android-libs/armeabi/libandroid_runtime.so
/home/lamchith/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__dso_handle' in /home/lamchith/android-ndk-r8e/platforms/android-3/arch-arm/usr/lib/crtbegin_so.o is referenced by DSO ../external/android-libs/armeabi/libutils.so
/home/lamchith/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__dso_handle' in /home/lamchith/android-ndk-r8e/platforms/android-3/arch-arm/usr/lib/crtbegin_so.o is referenced by DSO ../external/android-libs/armeabi/libbinder.so
Install        : libdatabase_sqlcipher.so => jni/libs/armeabi/libdatabase_sqlcipher.so
Install        : libstlport_shared.so => jni/libs/armeabi/libstlport_shared.so
Install        : libdatabase_sqlcipher.so => jni/libs/x86/libdatabase_sqlcipher.so
Install        : libstlport_shared.so => jni/libs/x86/libstlport_shared.so
make[1]: Leaving directory `/home/lamchith/android-database-sqlcipher/jni'
ant release && \
cd /home/lamchith/android-database-sqlcipher/bin/classes && \
        jar -cvf sqlcipher.jar .
Buildfile: /home/lamchith/android-database-sqlcipher/build.xml

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-pre-build:

-check-env:
 [checkenv] Android SDK Tools Revision 22.2.1
 [checkenv] Installed at /home/lamchith/adt-bundle-linux-x86_64-20130917/sdk

-setup:
     [echo] Project Name: SQLDemoActivity
  [gettype] Project Type: Application

-build-setup:
[getbuildtools] Using latest Build Tools: 18.0.1
     [echo] Resolving Build Target for SQLDemoActivity...
[gettarget] Project Target:   Android 4.3
[gettarget] API level:        18
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for SQLDemoActivity...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'release'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
     [echo] Handling aidl files...
     [echo] /home/lamchith/android-database-sqlcipher/bin/aidl
     [echo] /home/lamchith/adt-bundle-linux-x86_64-20130917/sdk/build-tools/18.0.1/aidl
     [echo] /home/lamchith/adt-bundle-linux-x86_64-20130917/sdk/platforms/android-18/framework.aidl
     [echo] /home/lamchith/android-database-sqlcipher/src
     [echo] /home/lamchith/android-database-sqlcipher/gen
     [aidl] Found 1 AIDL files.
     [aidl] Compiling 1 AIDL files.

BUILD FAILED
/home/lamchith/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/lamchith/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:664: Execute failed: java.io.IOException: Cannot run program "/home/lamchith/adt-bundle-linux-x86_64-20130917/sdk/build-tools/18.0.1/aidl": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
at com.android.ant.AidlExecTask$AidlProcessor.process(AidlExecTask.java:102)
at com.android.ant.MultiFilesTask.processFiles(MultiFilesTask.java:131)
at com.android.ant.AidlExecTask.execute(AidlExecTask.java:203)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:120)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 48 more

Total time: 19 seconds
make: *** [build-java] Error 1

Nick Parker

unread,
Oct 16, 2013, 12:15:34 PM10/16/13
to Lamchith M C, sqlc...@googlegroups.com
Hi,

I am not sure what the issue would be on your environment, what Linux
distribution and version are you using? You can certainly use the
existing SQLCipher for Android binaries which are distributed at no
charge [1].

1. http://sqlcipher.net/downloads

On 10/16/13 9:43 AM, Lamchith M C wrote:
>
> Hi Nick,
>
> Do you have any other suggestions ? i have updated with make error ,
> basically it is the same just shows the new 18.0.1 folder. Can i use jar
> files from the distribution , in case nothing works out , along with the
> generated so files.
Nick Parker
Reply all
Reply to author
Forward
0 new messages