Debian 12 and Azure SQL setup issues (trying unixodb/ FreeTDS / iODBC) .

Alan DeKok aland at deployingradius.com
Mon Dec 11 12:42:29 UTC 2023


On Dec 11, 2023, at 3:43 AM, Olaf <siegson at gmail.com> wrote:
> 
> On my new Debian 12.2 server things seem not that easy.
> By default, Freeradius is not compiled with unixdbc.
> Ok, I'm not an advanced user on compile from source but ending up with
> things like:
> 
> configure: WARNING: silently not building rlm_sql_unixodbc. configure:
> WARNING: FAILURE: rlm_sql_unixodbc requires: libodbc sql.h.

  If unixodbc is installed, then the configure process should be able to find it.  The only magic is finding out where the unixodbc libraries / header files are, and passing that to configure.  The simplest way is:

$ ./configure --with-unixodbc-include-dir=/path/to/include --with-unixodbc-lib-dir=/path/to/lib ... other args ...

  It should then work.

  My guess is that the unixodbc libraries are installed in a non-standard place, so the files aren't found by the C compiler during normal process.  So find out where those files are, and pass the directories to configure.

> https://serverfault.com/questions/448365/debian-build-the-freeradius-package-with-unixodbc-support

  That page is 11 years old.  There's a much newer page on the FreeRADIUS wiki, written by one of the FreeRADIUS contributors.  But from reading posts to the lists, it seems there's a secret prohibition against reading the official documentation.  I have no idea why,

> ##############################################################
> Next try is to use iODBC.
> Also not working. iodbc modules on debian12 are 12+ years old.
> Ok compiling from source and issues again;
> 
> configure.ac:320: error: possibly undefined macro: AM_PATH_GTK
>      If this token and others are legitimate, please use m4_pattern_allow.
>      See the Autoconf documentation.
> make: *** [/usr/share/cdbs/1/class/autotools-files.mk:71:

  Uh... what?  The string "AM_PATH_GTK" doesn't appear in the FreeRADIUS source code.  If you're trying to build some other program, we can't help you.  We didn't write that software, and we know nothing about it.

> Next try is to use FreeTDS module with
> /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
> odbc.ini, odbcinst.ini and FreeTDS.conf configured as it should be.
> 
> no luck still,
> freeradius -X always show:
> 
> rlm_sql (sql): Opening additional connection (0), 1 of 32 pending slots used
> rlm_sql_freetds: unable to establish db to symbolic servername mydatabasedsn
> rlm_sql_freetds: client error: severity(0), number(34), origin(0),

  FreeRADIUS is unable to connect to the database.  Either the database is unavailable, or the configuration parameters are wrong.

  Unfortunately we don't run freetds here, and we don't know a lot about it.  The rlm_sql_freetds driver was contributed a long time ago.  It it works, great.  If not, it's a hard problem to solve.

  And please use an official 3.2.x release.  You didn't say which version you're trying to build.  So if it's an older version, don't bother.  Use the most recent release.

  Alan DeKok.



More information about the Freeradius-Users mailing list