This shows you the differences between two versions of the page.
firebird [2018-09-22 23:04:10] |
firebird [2018-09-22 23:04:10] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== uuidUDF, UUID Lib, CREATE_UUID in Firebird 2.5 ====== | ||
+ | * Assume Firebird 2.5.7-amd64 is in /opt/firebird | ||
+ | * Download https://www.ibphoenix.com/download/tools/udf#63 ([[https://jenda.hrach.eu/m/firebird-uuidlibv12.zip|mirror]]) | ||
+ | * 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... | ||
+ | <code> | ||
+ | --- 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); | ||
+ | </code> | ||
+ | * make uuidlib | ||
+ | * cp uuidlib /opt/firebird/UDF/uuidlib.so | ||
+ | * cd /opt/firebird/UDF/; ln -s uuidlib.so uuidlib | ||
+ | * Edit /opt/firebird/firebird.conf: | ||
+ | * UdfAccess = Restrict /opt/firebird/UDF;/opt/firebird/UDF/uuidlib | ||
+ | * 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". |