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:

Shortbread said...

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?

Yordan said...

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

Unknown said...

Hi

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

Axl84 said...

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?

Unknown said...

Dear Mariuz

Could You please post the result Firebird client library file?

Popa Adrian Marius said...

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

Popa Adrian Marius said...

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

Popa Adrian Marius said...

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

Popa Adrian Marius said...

I have added the result file here


http://mariuz.android-dev.ro/android_fbclient/libfbclient.so.3.0.0

Unknown said...

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.