Thursday, September 26, 2013

Building Firebird Client for Android

Download and install ndk  unzip in your home
install firebird build dependencies

sudo apt-get build-dep firebird2.5

unzip ~/Downloads/android-ndk-r13-linux-x86_64.zip
export NDK=$HOME/android-ndk-r13d
echo $NDK

get the Firebird 3.0 source

http://web.firebirdsql.org/download/prerelease/source/Firebird-3.0.1.32609-0.tar.bz2
tar -jxvf Firebird-3.0.1.32609-0.tar.bz2

cd Firebird-3.0.1.32609-0


cp /usr/include/x86_64-linux-gnu/unicode/platform.h extern/icu/source/common/unicode
cp /usr/include/x86_64-linux-gnu/unicode/uvernum.h extern/icu/source/common/unicode

./autogen.sh --with-system-editline --enable-binreloc --with-cross-build=android.arme

after that the libfbclient.so is created for arm

cd gen/Release/firebird/lib
file libfbclient.so.3.0.0
libfbclient.so.3.0.0: ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped

You can download from here
http://mariuz.android-dev.ro/android_fbclient/libfbclient.so.3.0.0

10 comments:

  1. Hi,
    I can't build firebird:
    $sudo apt-get build-dep firebird2.5

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to find a source package for firebird2.5

    what did I do wrong?

    ReplyDelete
  2. Hi Mariuz.
    Could You please post the result Firebird client library file?

    ReplyDelete
  3. Hi

    How to build the libfbclient.so file on windows???

    ReplyDelete
  4. Hi,
    I've menage to compile the client.
    Now I have the file, but I don't find a way to use it properly.
    Have you made some tests?
    Can you post some "code" to help us?

    ReplyDelete
  5. Dear Mariuz

    Could You please post the result Firebird client library file?

    ReplyDelete
  6. yes i will post them after i fix one issue
    fixing unicode/platform.h for arm android

    I take them from a debian ARM
    virtual machine

    ReplyDelete
  7. dpkg -S /usr/include/x86_64-linux-gnu/unicode/platform.h
    libicu-dev:amd64: /usr/include/x86_64-linux-gnu/unicode/platform.h

    So i need to take it from arm package

    wget http://http.us.debian.org/debian/pool/main/i/icu/libicu-dev_52.1-3_armel.deb

    mkdir foo
    dpkg -x libicu-dev_52.1-3_armel.deb foo

    ls -lah foo/usr/include/arm-linux-gnueabi/unicode/platform.h

    ReplyDelete
  8. oh wait files are identical no diff if i check with meld or diff


    diff foo/usr/include/arm-linux-gnueabi/unicode/platform.h /usr/include/x86_64-linux-gnu/unicode/platform.h

    ReplyDelete
  9. Well, I'm very new to Android on Delphi XE5. So if anybody here can do me a favor, please instruct me step by step how to use this lib (libfbclient.so.3.0.0) on Android device and XE5 IDE. Or if there are links somewhere else that can guide the beginner like me, please note for me. Alot alot of thanks.

    ReplyDelete