Assume Firebird 2.5.7-amd64 is in /opt/firebird
-
go to Source/
Edit makefile. Add -fPIC -g to CFLAGS
make clean (yes, they ship compiled objects in distribution tarball)
Apply the following patch. No idea, maybe in 2005 the TMP/TEMP variable used to exist. Or you can somehow set environment for your firebird server…
--- uuidlibv12/uuidlibv1.2/Source/uuid.c 2005-10-12 13:13:40.000000000 +0200
+++ uuidlibv12-patched/uuidlibv1.2/Source/uuid.c 2018-01-20 12:44:38.446284700 +0100
@@ -91,6 +91,7 @@
char * tmp = getenv("TMP");
if (!tmp) {
tmp = getenv("TEMP");
+tmp="/tmp";
}
char * tmpStr;
tmpStr = (char *) malloc(strlen(tmp) + 20);
@@ -130,6 +131,7 @@
char * tmp = getenv("TMP");
if (!tmp) {
tmp = getenv("TEMP");
+tmp="/tmp";
}
char * tmpStr;
tmpStr = (char *) malloc(strlen(tmp) + 20);
make uuidlib
cp uuidlib /opt/firebird/UDF/uuidlib.so
cd /opt/firebird/UDF/; ln -s uuidlib.so uuidlib
Edit /opt/firebird/firebird.conf:
Restart Firebird
Maybe you will need to execute uuidUDF.sql if your application already did not do it.
Try running “select UUID_CREATE() from rdb$database”.