Archive for September, 2020

Installing Firebird 3.06 on Ubuntu 18.04.5 LTS

Monday, September 21st, 2020

Thanks to my inexperience with the Ubuntu package manager, and my talent for breaking software, I managed to trash my Ubuntu installation recently to the point where it wouldn’t even boot.  It gave me the opportunity to test my backups, and I’m happy to say that re-installing Ubuntu with a restore of data, with some re-installation of apps got me pretty much back to where I was.  I did however, encounter an issue where Ubuntu would not login to the GUI.  Thankfully I eventually found this post, which solved the problem.

The original issue started around the installation of Firebird 3.0.5 for Linux. It appeared the installer needed a file libtommath.so.0 which was not present on my distro.  I thought I had gotten it installed properly, then I ran into the infamous “COLLATION UNICODE_CI_AI for CHARACTER SET UTF8 is not installed” error.  I managed to get past that, but when I opened the database in an FMX app using FireDAC in local mode I got an exception “N8Firebird16status_exceptionE”.   FlameRobin would open it without issue.  If I chose Break in the exception dialog it looked for the source to libstdc++.so.6. The exception was in a call to isc_attach_database or isc_dsql_fetch.  I assumed it was an incompatibility between FireDAC and the standard C++ library.

It turns out I had gotten myself into a mess trying to get the libtommath file.  I broke some package references and when I tried to fix them, a slew of packages were removed.  I was warned not to continue unless I knew what I was doing, but when has that stopped me?  Also there didn’t seem to be any alternative to fix the package manager’s complaint that things were broken even if everything still seemed functional.  Ah live and learn…

This time I tried installing Firebird 3.06 thinking it was newer and might address some of the problems I had encountered….nope.  This time I used a symlink ( sudo ln -sf /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 ) to resolve the missing libtommath.

Then I got a completely new error in the FMX deployment code.  It attempted to create a hidden folder “/home/<username>/.fmxlinux” which contains “libfmux-1.48.so”.  I did not invoke paserver with sudo so I didn’t have adequate permissions and got an EFCreateError exception with an empty message triggered by line 9345 of System.Classes.  I only mention that because the message should contain the filename being created and the OS error message but it did not.

After resolving the permission issue, I re-confirmed that even on my fresh Linux/Firebird install, I still get an exception when attempting to access my database, which of course pertains to the missing collation.  Since I didn’t make note of how I resolved the collation error when I installed 3.05 I can’t be sure what I did, or whether the “resolution”  did not truly work.

Reading the “Release notes for Firebird 3.06″ I saw they had upgraded the ICU libraries to v52.1 so I downloaded the package and installed it.  Re-starting Firebird the collation error was resolved and neither FireDAC or FlameRobin reported the “N8Firebird16status_exceptionE” error any longer.  Obviously whatever I did to fix the collation error when I installed Firebird 3.05 was not correct despite the fact I was no longer getting the collation exception.

I hope this helps someone else install FireBird 3.06 on Ubuntu/Debian and saves them all the time I spent searching for solutions to the myriad of issues I encountered including my own folly.

I Just Don’t GetIt

Thursday, September 17th, 2020

In case you were wondering, GetIt appears to be down at the moment.  I went to take 5 minutes to update a bug report, and I needed to install FmxLinux to do so, only to see:

GetIt Not Accessible

GetIt Not Accessible

I guess it will have to wait.  This is the problem of automating everything.  You become reliant on services that need to be up 24×7 or the odds are they will impede your work at some point.

UPDATE:  GetIt is back up now.

Ubuntu is better with WINE

Tuesday, September 15th, 2020

It’s been a couple of years since I made the jump to Ubuntu 18.04 LTS as my primary operating system, thanks in no small part to Windows 10 updates and BODs.

It all started when I loaded my Toshiba Satellite L70D laptop with an SSD and Ubuntu to try to extend its usable lifetime. To give you an idea how old it is, the laptop shipped with Windows 8.1 on it, and I bought it because it was one of the few 17″ laptops still available at the time.  I would have bought a 17″ Macbook Pro after my 15″ died, but it seemed Apple

and other manufacturer’s were no longer making 17″ laptops.  Now you can find numerous 17″ PC laptops aimed at the gaming market.  Anyway, the laptop ran well and I discovered I could run VMs using VirtualBox reliably.  I had been using VMWare Fusion before, and had tried earlier versions of VirtualBox with no success.

I had been looking for a lean OS on which to run numerous VMs.  I was considering OS/X, but there is definitely a cost premium for the hardware, and the choices available are more limited than the clone market.  I even thought about a Hackintosh but didn’t really want to explore EULA violations and support issues for updates.

After discovering all the major software I was using had Ubuntu supported versions, I decided to take the jump and load it on my new (at the time) desktop.  While I ran into a few VirtualBox issues along the way I have never lost any data so far, and would have to say that my experience rivals the commercial VM software I have used.  I’ve also had no hardware support issues like I had experienced previously when trying out Linux distros.

Linux seems to have matured enough that even a noob with a little Googling can find the solution to any issue or question I have had thus far.  Of course I chose Ubuntu because it is one of the largest distros, so it’s a relatively safe choice, but other distros I played with seemed just as viable.

Recently I wanted to see if a personal VCL project would run natively under Ubuntu.  I was contemplating making an FMX version just to have it natively on Linux without using a VM.  The app uses a dynamic plug-in architecture with run-time packages.  It is based on code I originally received from Mark Miller; the author of Coderush for Delphi and DevExpress’ Coderush for .NET.  The project also uses Firebird 3.0 embedded, and the VirtualTreeView in grid mode, since it’s open source and lightning fast.

I tried CrossVCL’s VTreeView demo only to find out that it is indeed a work in progress.  It’s VTreeView support has some painting issues and run-time exceptions were thrown so I knew I needed to find another way to get my VCL app onto Ubuntu without using VirtualBox.  The other night I thought I would see if I could get it to work under WINE.  I installed Q4Wine from the Ubuntu software app, and added my application EXE with the default settings.  Much to my surprise, it fired right up.  I even managed to make an Ubuntu shortcut and add it to my favorites.

CompositeApp running on Ubuntu 18.04LTS with WINE

Embedding Firebird 3.0X

Tuesday, September 1st, 2020

With Firebird 3.0X releases there is no longer a separate install for embedded deployments.  In fact the guidance essentially is to use the ZIP package and customize it as desired.  If you want a minimal deployment, it’s difficult to know what files are absolutely necessary, unless you are very familiar with the project.

I recently had a need to distribute an application for testing, and didn’t want the users to have to install the Firebird server.  The target audience is also well suited to an embedded install, so I thought I would try it out.  With the help of ProcessMonitor and the aforementioned guidance documentation I discovered that the following files seem to be the bare requirements:

firebird.conf
databases.conf
plugins.conf
msvcr100.dll
msvcp100.dll
icuuc52.dll
icuin52.dll
icudt52l.dat
icudt52.dll
ib_util.dll
fbclient.dll
plugins\engine12.dll
plugins\fbtrace.dll

I am using Local DB access via FireDAC with Delphi 10.4 and tested this configuration by simply unzipping the files including my app, and the database into a Win7 VM and running it.  Firebird weighs in at about 16Mb where my app and it’s supporting DLLs are 40Mb with Debug info.