Forum Stats

  • 3,770,454 Users
  • 2,253,116 Discussions
  • 7,875,462 Comments

Discussions

Can't build berkeleyDB jdbc driver for android

user8199959
user8199959 Member Posts: 3
edited Oct 5, 2017 3:41PM in Berkeley DB Java Edition

I'm developing an android app that needs to use big databased but it needs to run on the Android device.

I've found this database and tried to follow those instructions:

http://docs.oracle.com/cd/E17076_02/html/installation/build_android_jdbc.html

1) Downloaded db-6.2.32

2) ran the configure --enable-jdbc && make without problems

Now i'm trying to run step 4.:

$ < ndk-install-directory >/ndk-build

This gives me this error:

<span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Android</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> NDK</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">:</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> APP_PLATFORM </span><span class="kwd" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #101094;">not</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> </span><span class="kwd" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #101094;">set</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">.</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> </span><span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Defaulting</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> to minimum supported version android</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">-</span><span class="lit" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #7d2727;">14.</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> </span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">home</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">mariano</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Android</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">android</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">-</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">ndk</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">-</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">r15b</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">build</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">core</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">build</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">-</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">binary</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">.</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">mk</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">:</span><span class="lit" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #7d2727;">688</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">:</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> <br/></span><span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Android</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> NDK</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">:</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> </span><span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Module</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> db_archive depends on </span><span class="kwd" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #101094;">undefined</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> modules</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">:</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> dl log icuuc icui18n utils </span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">home</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">mariano</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Android</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">android</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">-</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">ndk</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">-</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">r15b</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">build</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">core</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">/</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">build</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">-</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">binary</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">.</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">mk</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">:</span><span class="lit" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #7d2727;">701</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">:</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> <br/></span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">***</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> </span><span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Android</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> NDK</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">:</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> </span><span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Aborting</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> </span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">(</span><span class="kwd" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #101094;">set</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> APP_ALLOW_MISSING_DEPS</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">=</span><span class="kwd" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #101094;">true</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;"> to allow missing dependencies</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">)</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">    </span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">.</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">  </span><span class="typ" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #2b91af;">Stop</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">.</span>

After that, edited Android.mk and added the following line:

<span class="pln" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">APP_ALLOW_MISSING_DEPS</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #303336;">=</span><span class="kwd" style="font-style: inherit; font-weight: inherit; font-size: inherit; font-family: inherit; color: #101094;">true</span>

This make the process to start but at the end, I have several errors that I don't know how to fix:

    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:162:34: error: unrecognized instruction mnemonic                    if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {                                                   ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:1099:2: note: expanded from macro 'MUTEXP_ACQUIRE'            MUTEX_SET(&(mutexp)->tas))            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:477:3: note: expanded from macro 'MUTEX_SET'                    "ldrex          %0, [%2]\n\t"                           \                    ^    <inline asm>:1:2: note: instantiated into assembly here            ldrex           x8, [x28]            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:162:34: error: unrecognized instruction mnemonic                    if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {                                                   ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:1099:2: note: expanded from macro 'MUTEXP_ACQUIRE'            MUTEX_SET(&(mutexp)->tas))            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:478:17: note: expanded from macro 'MUTEX_SET'                    "cmp            %0, %1\n\t"                             \                                            ^    <inline asm>:3:2: note: instantiated into assembly here            strexne x8, x20, [x28]            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:162:34: error: unrecognized instruction mnemonic                    if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {                                                   ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:1099:2: note: expanded from macro 'MUTEXP_ACQUIRE'            MUTEX_SET(&(mutexp)->tas))            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:477:3: note: expanded from macro 'MUTEX_SET'                    "ldrex          %0, [%2]\n\t"                           \                    ^    <inline asm>:1:2: note: instantiated into assembly here            ldrex           x8, [x28]            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:162:34: error: unrecognized instruction mnemonic                    if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {                                                   ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:1099:2: note: expanded from macro 'MUTEXP_ACQUIRE'            MUTEX_SET(&(mutexp)->tas))            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:478:17: note: expanded from macro 'MUTEX_SET'                    "cmp            %0, %1\n\t"                             \                                            ^    <inline asm>:3:2: note: instantiated into assembly here            strexne x8, x22, [x28]            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:213:3: error: too few operands for instruction                    MEMBAR_ENTER();                    ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:492:23: note: expanded from macro 'MEMBAR_ENTER'            ({ __asm__ volatile ("dsb"); })                                 ^    <inline asm>:1:2: note: instantiated into assembly here            dsb            ^~~    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:439:3: error: too few operands for instruction                    MEMBAR_ENTER();                    ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:492:23: note: expanded from macro 'MEMBAR_ENTER'            ({ __asm__ volatile ("dsb"); })                                 ^    <inline asm>:1:2: note: instantiated into assembly here            dsb            ^~~    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:623:4: error: too few operands for instruction                            MEMBAR_EXIT();                            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:494:23: note: expanded from macro 'MEMBAR_EXIT'            ({ __asm__ volatile ("dsb"); })                                 ^    <inline asm>:1:2: note: instantiated into assembly here            dsb            ^~~    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:635:3: error: too few operands for instruction                    MEMBAR_EXIT();                    ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:494:23: note: expanded from macro 'MEMBAR_EXIT'            ({ __asm__ volatile ("dsb"); })                                 ^    <inline asm>:1:2: note: instantiated into assembly here            dsb            ^~~    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/mutex/mut_tas.c:619:4: error: too few operands for instruction                            MEMBAR_EXIT();                            ^    /home/mariano/Downloads/db-6.2.32/build_android/jdbc/jni/../../../src/dbinc/mutex_int.h:494:23: note: expanded from macro 'MEMBAR_EXIT'            ({ __asm__ volatile ("dsb"); })                                 ^    <inline asm>:1:2: note: instantiated into assembly here            dsb            ^~~    7 warnings and 9 errors generated.

I'm running linux mint,

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit

This discussion has been closed.