rlm_sql_sqlite issue on CentOS 6.x with sqlite3_create_function_v2

stefan.paetow at diamond.ac.uk stefan.paetow at diamond.ac.uk
Tue Feb 4 16:59:36 CET 2014


Hi Alan/Arran, 

We have discovered a problem with the SQLite module. During the compilation, you look for sqlite3_open_v2, but not for sqlite3_create_function_v2. On CentOS, the most recent version of SQLite is 3.6.20 (as per "sqlite3 -version"), and the sqlite3_create_function_v2 function was only added in version 3.7.3 as per http://freecode.com/projects/sqlite/releases/323290. 

In https://github.com/FreeRADIUS/freeradius-server/blob/f95aa0da8b512c4e36ab5bff30eaa4d325b8d149/src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c you've wrapped the use of that function in a nice IFDEF, but I'm guessing the setting of that IFDEF needs to be updated to check for that function as well?

:
:
checking for x86_64-redhat-linux-gnu-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for sqlite3_open in -lsqlite3... yes
checking for sqlite3_open_v2 in -lsqlite3... yes
checking for sqlite3.h... yes
:
:

Without that check, we get this error:

Could not link driver rlm_sql_sqlite: /usr/lib64/freeradius/rlm_sql_sqlite.so: undefined symbol: sqlite3_create_function_v2
Make sure it (and all its dependent libraries!)are in the search path of your system's ld.

We discovered this as part of a Moonshot test.

Stefan Paetow
Software Engineer
+44 1235 778812
Diamond Light Source Ltd.
Diamond House, Harwell Science and Innovation Campus
Didcot, Oxfordshire, OX11 0DE



-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 





More information about the Freeradius-Users mailing list