Firebird News

Monday, March 31, 2014

Compiling Linux Kernel 3.xx.x Vanilla Final - Ubuntu/Debian way

Here is my guide on Compiling 3.xx.x Vanilla Final - Ubuntu/Debian using the Debian way

This article is about compiling a kernel on Ubuntu systems. It describes how to build a custom kernel using the latest unmodified kernel sources from (vanilla kernel) so that you are independent from the kernels supplied by your distribution.
Install the Required packages for building it
apt-get install git-core kernel-package fakeroot build-essential ncurses-dev
Then download latest kernel version
cd /usr/src
sudo su 
wget --continue
tar jxvf linux-3.*.*.tar.bz2
cd linux-3.*.*

$ cp /boot/config-`uname -r` ./.config
$ make menuconfig

make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-vanillaice kernel_image kernel_headers
cd ..
dpkg -i linux-image-3.*.*
dpkg -i linux-headers-3.*.*
sudo shutdown -r now

you can install the headers too from /usr/src/linux-headers-3.*.*-*
in my case i can show you how the packages are named
ls *.deb

I also created a python script

that can be used like this
git clone
cd kernelcompile
sudo ./

Friday, March 14, 2014

php5 and firebird pdo on ubuntu / debian

The recommendd method is to use the official php5 source from ubuntu or debian and build only the pdo firebird extension and install it
sudo apt-get install php5-dev firebird2.5-dev php-pear devscripts debget

You need to build the pdo extension from php from ubuntu source code here is the source for php package (apt-get source will do the job for any release)
apt-get source php5
cd php5-*
cd ext/pdo_firebird
sudo ln -s /usr/include/php5 /usr/include/php
sudo make install 

Check to have in php.ini to have the next lines also with phpinfo() function

sudo pico/vi /etc/php5/conf.d/pdo.ini
# configuration for php PDO module

php -i | grep PDO
PDO support => enabled
PDO drivers => firebird
PDO Driver for Firebird/InterBase => enabled

you can also check in apache if all is correct
by creating a page in /var/www/pdo_info.php
with this content

then in the browser press F3 and search PDO , here is my phpinfo()
to check if all is ok with the driver then create one small example that loads the driver and then is connecting to the database server

after the driver is loaded now you can use the pdo as usual , here is the fetch example

Tuesday, March 04, 2014

Fire Ruby - howto start with Firebird and Ruby on Ubuntu / Debian

This howto is about installing firebird ruby driver on Ubuntu (tested on natty) and Debian (tested on Sid)
you might need some firebird dependencies and if you need the stable Firebird server  Firebird 2.5 guide to install it

The very basic firebird package to build only the driver is firebird2.5-dev

sudo apt-get install firebird2.5-dev git-core
and choose yes when asked

if is already installed you will get :

firebird2.*-dev was already installed

Then you need to install ruby and rubygems , the recommended way is to use and install rvm

rvm install 2.1
rvm use 2.1

Best way is to install it from gem

gem install fb

Alternate way  is to build install our gem (latest build-able is located here )

git clone
cd fb/
rake gem

You will get something like this in terminal :
cd pkg/fb-0.7.0
  Successfully built RubyGem
  Name: fb
  Version: 0.7.0
  File: fb-0.7.0.gem
mv fb-0.7.0.gem ..
cd -

Now is time to install it using the gem command

gem install pkg/fb-0.*.*.gem

Please read the README.
here is how i tested on my machine

I had to add require 'rubygems'
to the example from README and all was ok after that

Here is part of the example i ran on my pc

pico test.rb 

And here are the results for my ruby test
ruby test.rb 
ID: 0, Name: John 0
ID: 9, Name: John 9

What is next class ? RoR on Firebird

Tuesday, November 26, 2013

Realocated sector count is 1 , should i fear ?

yesterday my hdd started to fail  (bad blocks from reading files) and from the raw read error rates i was worried that is already dead but it seems that seagate  ST9500325AS drives they do high error rates also one sector can be corrected it seems using filesystem vodoo
The self tests are only done for 10% and then they stop
Seems that only in Linux you can force it to write to a corrupted sector and fix the issue

A nice tool to read the smart values in human format is gsmartcontrol.

sudo apt-get install gsmartcontrol

Tuesday, October 01, 2013

Django Firebird and pyinstaller notes

After installing pyinstaller in python 2.7.x

pip  install pyinstaller
c:\\python27\\scripts\\pyinstaller --version

You need Firebird client installed : run firebird installer

pip install django
pip install fdb
pip install django-firebird

my application is using django-postman and is named that way

c:\\python27\\scripts\\pyinstaller -d --name=django_postman

I had a issue with Cookie and django 1.5.x (ImportError: No module named Cookie )

ls -lah
-rwxrwxr-x 1 mariuz mariuz 2.9M Oct  1 13:28 dist/django_postman/django_postman.exe

There are some issues with ctypes dependency support in fdb

So i had to modify in drive_c/Python27/Lib/site-packages/fdb/

these lines

    #fb_library_name = find_library('fbclient.dll')
    fb_library_name = 'C:\\windows\\system32\\fbclient.dll'
    fb_library_name = find_library('fbclient')
if sys.platform in ['win32', 'cygwin', 'os2', 'os2emx']:
#    fb_library = WinDLL(fb_library_name)
    fb_library = WinDLL('fbclient.dll')

here is my config

Flask and pyinstaller notice

I have started to test flask and pyinstaller setup in wine/linux

first i needed to install flask with pip

wine cmd.exe
c:\\python27\\scripts\\pip install flask

then after i have created the hello world flask needs to be added in the --hidden-import at command line like this

c:\\python27\\scripts\\pyinstaller --hidden-import=flask --onefile -d -y

and you can start it with
* Running on

Then load in your browser :) The size of the single file binary
ls -lah hello.exe 
-rwxrwxr-x 1 mariuz mariuz 5.6M Oct  1 18:03 hello.exe

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

cd ~

tar -jxvf android-ndk-r9d-linux-x86_64.tar.bz2

export NDK=$HOME/android-ndk-r9d
echo $NDK

get the Firebird 3.0 alpha2 src

tar -jxvf Firebird-
cd Firebird-

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

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

after that the is created for arm

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

You can download from here

Sunday, July 28, 2013

Install Android x86 4.3 on my eeepc with qemu

In fact is an re-install , i had 4.2 in dual boot with debian sid on my eeepc and i wanted to do an upgrade , the issue is that i don't have a usb stick to boot from it so i took another route

I have installed qemu and then downloaded the 4.3 iso from android x86 site and started this way to detect partitions on the main drive

qemu -boot d -cdrom android-x86-4.3-20130725.iso -hda /dev/sda

 format the partition already prepared in my case 15G /dev/sda4 also do not install grub if you want to modify it manually from debian partition

 After the install is finished you need to test it first that it works i mount /dev/sda4 to see the dir structure
mount /dev/sda4 /mnt
ls /mnt/
android-4.3-test  lost+found

so i have modified /etc/grub.d/40_custom this way
 menuentry "Android-x86 4.3" {
set root=(hd0,4) linux /android-4.3-test/kernel quiet root=/dev/ram0 androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode SRC=/android-4.3-test DATA= initrd /android-4.3-test/initrd.img

sudo update-grub2

 and restart choose the new android version