Hi, I have currently installed freeradius 2.1.10 and Mysql 5..5.10 on a pfsense box which is freebsd. I want this to work with mysql however I was wondering how to install freeradius with mysql support as I am unable to do it via ports or try any commands or flags with ./configure via tarball. Only pkg_add is available, can I recompile or install from scratch to get freeradius to bind to mysql? Thanks, Frank
Franz wrote:
I have currently installed freeradius 2.1.10 and Mysql 5..5.10 on a pfsense box which is freebsd. I want this to work with mysql however I was wondering how to install freeradius with mysql support as I am unable to do it via ports or try any commands or flags with ./configure via tarball.
So.. what's going wrong?
Only pkg_add is available, can I recompile or install from scratch to get freeradius to bind to mysql?
Yes. If you want to know how to build software from scratch on a system, read the doumentation for that system. You'll usually need at least gmake and gcc. Alan DeKok.
Well since when doing pkg_add I am unable to specify --with-PACKAGE[=ARG] or --with-mysql-include-dir=DIR etc... The shared lib files never get created so when enabling SQL I get "Could not link driver rlm_sql_mysql". Now, when I try to do ./configure I get "lib/pcc" sanity check error thanks On Wed, Mar 30, 2011 at 2:39 AM, Alan DeKok <aland@deployingradius.com>wrote:
Franz wrote:
I have currently installed freeradius 2.1.10 and Mysql 5..5.10 on a pfsense box which is freebsd. I want this to work with mysql however I was wondering how to install freeradius with mysql support as I am unable to do it via ports or try any commands or flags with ./configure via tarball.
So.. what's going wrong?
Only pkg_add is available, can I recompile or install from scratch to get freeradius to bind to mysql?
Yes.
If you want to know how to build software from scratch on a system, read the doumentation for that system. You'll usually need at least gmake and gcc.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Franz wrote:
Well since when doing pkg_add I am unable to specify --with-PACKAGE[=ARG] or --with-mysql-include-dir=DIR etc... The shared lib files never get created so when enabling SQL I get "Could not link driver rlm_sql_mysql". Now, when I try to do ./configure I get "lib/pcc" sanity check error
As I said, you need to use gcc. I also asked *what* was going on, and you haven't said. I guess you're interested in solving it yourself. Alan DeKok.
I have installed gcc-4.4.5.20100706 and gmake-3.81_4 however when I do a gcc --version I get: gcc (GCC) 4.2.1 20070719 [FreeBSD] What is wrong is that I am unable to build freeradius with mysql support, when I do ./configure | grep mysql_config I get: configure: error: C preprocessor "/lib/cpp" fails sanity check I am unable to solve this myself, by far, this is why I am asking for help to this great community, and what better to get it directly from the developer :) thanks On Wed, Mar 30, 2011 at 8:07 AM, Alan DeKok <aland@deployingradius.com>wrote:
Franz wrote:
Well since when doing pkg_add I am unable to specify --with-PACKAGE[=ARG] or --with-mysql-include-dir=DIR etc... The shared lib files never get created so when enabling SQL I get "Could not link driver rlm_sql_mysql". Now, when I try to do ./configure I get "lib/pcc" sanity check error
As I said, you need to use gcc.
I also asked *what* was going on, and you haven't said.
I guess you're interested in solving it yourself.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Franz wrote:
What is wrong is that I am unable to build freeradius with mysql support, when I do ./configure | grep mysql_config I get:
configure: error: C preprocessor "/lib/cpp" fails sanity check
I am unable to solve this myself, by far, this is why I am asking for help to this great community, and what better to get it directly from the developer :)
And for the third time, you haven't given us enough information to help you. If you're going to make it difficult for us to help you, there's no reason for us to help you. Alan DeKok.
Hi Franz, In message <AANLkTikH+a1YJDGU5N-TyF-8Xo8_tdE23EqO2V7k+YJX@mail.gmail.com>, Franz <flamana@gmail.com> writes
I have currently installed freeradius 2.1.10 and Mysql 5..5.10 on a pfsense box which is freebsd. I want this to work with mysql however I was wondering how to install freeradius with mysql support as I am unable to do it via ports or try any commands or flags with ./configure via tarball. Only pkg_add is available, can I recompile or install from scratch to get freeradius to bind to mysql?
Alan has already given you the answer - you need a development environment. pfSense does not contain compilers and other development tools to keep the image size down. Another reason why pfSense does not contain development tools is because it is arguably inappropriate to build software on a firewall. Maybe you are using pfSense for some other task, though if you are using it as a firewall, I would argue strongly that your RADIUS server should be running on another machine inside your firewall. You can't reconfigure a binary package - the configuration is burned in when it is created, usually by the default options. It is nonsense to try to pass configuration flags to pkg_add. The default options are always set for minimum external dependencies - if you want features like SQL or LDAP support, you have to set the relevant options yourself and rebuild the package. FreeBSD does not adopt the approach of some Linux distributions, where the additional modules are distributed in separate binary packages. You will need to set the appropriate options for the net/freeradius2 port and build a package using that port on a FreeBSD box of the appropriate release and major version - ideally the minor version should also match, though that doesn't usually matter. You can then pkg_add that package on the pfSense machine. pfSense 2.0 RC is based on FreeBSD 8.1 - amd64 for the 64 bit version and i386 for the 32 bit version. pfSense 1.2.3 is based on FreeBSD 7.2 i386. A virtual machine can be useful for building packages if you don't have access to a FreeBSD machine. When I maintained the FreeBSD FreeRADIUS ports, I was asked to create a net/freeradius-mysql slave port for someone working on pfSense. This is FreeRADIUS 1.x and should probably die. It isn't realistic to create slave ports for all the dependencies that people might require - port bloat is frowned on. With best wishes, David -- David Wood david@wood2.org.uk
Hi, Thanks David and Alan for this great advise, I will try it and post back. Thanks! On Wed, Mar 30, 2011 at 8:56 AM, David Wood <david@wood2.org.uk> wrote:
Hi Franz,
In message <AANLkTikH+a1YJDGU5N-TyF-8Xo8_tdE23EqO2V7k+YJX@mail.gmail.com>, Franz <flamana@gmail.com> writes
I have currently installed freeradius 2.1.10 and Mysql 5..5.10 on a
pfsense box which is freebsd. I want this to work with mysql however I was wondering how to install freeradius with mysql support as I am unable to do it via ports or try any commands or flags with ./configure via tarball. Only pkg_add is available, can I recompile or install from scratch to get freeradius to bind to mysql?
Alan has already given you the answer - you need a development environment. pfSense does not contain compilers and other development tools to keep the image size down.
Another reason why pfSense does not contain development tools is because it is arguably inappropriate to build software on a firewall. Maybe you are using pfSense for some other task, though if you are using it as a firewall, I would argue strongly that your RADIUS server should be running on another machine inside your firewall.
You can't reconfigure a binary package - the configuration is burned in when it is created, usually by the default options. It is nonsense to try to pass configuration flags to pkg_add.
The default options are always set for minimum external dependencies - if you want features like SQL or LDAP support, you have to set the relevant options yourself and rebuild the package. FreeBSD does not adopt the approach of some Linux distributions, where the additional modules are distributed in separate binary packages.
You will need to set the appropriate options for the net/freeradius2 port and build a package using that port on a FreeBSD box of the appropriate release and major version - ideally the minor version should also match, though that doesn't usually matter. You can then pkg_add that package on the pfSense machine.
pfSense 2.0 RC is based on FreeBSD 8.1 - amd64 for the 64 bit version and i386 for the 32 bit version.
pfSense 1.2.3 is based on FreeBSD 7.2 i386.
A virtual machine can be useful for building packages if you don't have access to a FreeBSD machine.
When I maintained the FreeBSD FreeRADIUS ports, I was asked to create a net/freeradius-mysql slave port for someone working on pfSense. This is FreeRADIUS 1.x and should probably die. It isn't realistic to create slave ports for all the dependencies that people might require - port bloat is frowned on.
With best wishes,
David -- David Wood david@wood2.org.uk
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Ok, So Installed freeradius2 from ports on another system, and which is working, then I did pkg_create -Rjb freeradius-2.1.10_2 and got all needed files, transported all to the pfsense machine, did a pkg_add and all installed ok, however when enabling sql I still see error: Could not link driver rlm_sql_mysql: file not found Make sure it (and all its dependent libraries!) are in the search path of your system's ld. /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" /usr/local/etc/raddb/sites-enabled/inner-tunnel[131]: Failed to load module "sql". /usr/local/etc/raddb/sites-enabled/inner-tunnel[47]: Errors parsing authorize section. and when I check all fles are in here: /usr/local/lib/freeradius-2.1.10 rlm_sql_mysql-2.1.10.la rlm_sql_mysql.so rlm_sql_mysql.la rlm_sql_mysql.a rlm_sql_mysql-2.1.10.so under radiusd.conf the shared lib points to: libdir = /usr/local/lib/freeradius-2.1.10 Any clue as to why it does not see the files? Thanks On Wed, Mar 30, 2011 at 9:12 AM, Franz <flamana@gmail.com> wrote:
Hi, Thanks David and Alan for this great advise, I will try it and post back.
Thanks!
On Wed, Mar 30, 2011 at 8:56 AM, David Wood <david@wood2.org.uk> wrote:
Hi Franz,
In message <AANLkTikH+a1YJDGU5N-TyF-8Xo8_tdE23EqO2V7k+YJX@mail.gmail.com>, Franz <flamana@gmail.com> writes
I have currently installed freeradius 2.1.10 and Mysql 5..5.10 on a
pfsense box which is freebsd. I want this to work with mysql however I was wondering how to install freeradius with mysql support as I am unable to do it via ports or try any commands or flags with ./configure via tarball. Only pkg_add is available, can I recompile or install from scratch to get freeradius to bind to mysql?
Alan has already given you the answer - you need a development environment. pfSense does not contain compilers and other development tools to keep the image size down.
Another reason why pfSense does not contain development tools is because it is arguably inappropriate to build software on a firewall. Maybe you are using pfSense for some other task, though if you are using it as a firewall, I would argue strongly that your RADIUS server should be running on another machine inside your firewall.
You can't reconfigure a binary package - the configuration is burned in when it is created, usually by the default options. It is nonsense to try to pass configuration flags to pkg_add.
The default options are always set for minimum external dependencies - if you want features like SQL or LDAP support, you have to set the relevant options yourself and rebuild the package. FreeBSD does not adopt the approach of some Linux distributions, where the additional modules are distributed in separate binary packages.
You will need to set the appropriate options for the net/freeradius2 port and build a package using that port on a FreeBSD box of the appropriate release and major version - ideally the minor version should also match, though that doesn't usually matter. You can then pkg_add that package on the pfSense machine.
pfSense 2.0 RC is based on FreeBSD 8.1 - amd64 for the 64 bit version and i386 for the 32 bit version.
pfSense 1.2.3 is based on FreeBSD 7.2 i386.
A virtual machine can be useful for building packages if you don't have access to a FreeBSD machine.
When I maintained the FreeBSD FreeRADIUS ports, I was asked to create a net/freeradius-mysql slave port for someone working on pfSense. This is FreeRADIUS 1.x and should probably die. It isn't realistic to create slave ports for all the dependencies that people might require - port bloat is frowned on.
With best wishes,
David -- David Wood david@wood2.org.uk
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Got it working, if anyone else is interested what needed to be done is run ldconfig -m /usr/local/lib/mysql and ldconfig -m /usr/local/lib/freeradius-2.1.10 to add these directories to ldconfig_paths. Thanks On Wed, Mar 30, 2011 at 6:37 PM, Franz <flamana@gmail.com> wrote:
Ok, So Installed freeradius2 from ports on another system, and which is working, then I did pkg_create -Rjb freeradius-2.1.10_2 and got all needed files, transported all to the pfsense machine, did a pkg_add and all installed ok, however when enabling sql I still see error:
Could not link driver rlm_sql_mysql: file not found Make sure it (and all its dependent libraries!) are in the search path of your system's ld. /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" /usr/local/etc/raddb/sites-enabled/inner-tunnel[131]: Failed to load module "sql". /usr/local/etc/raddb/sites-enabled/inner-tunnel[47]: Errors parsing authorize section.
and when I check all fles are in here: /usr/local/lib/freeradius-2.1.10 rlm_sql_mysql-2.1.10.la rlm_sql_mysql.so rlm_sql_mysql.la rlm_sql_mysql.a rlm_sql_mysql-2.1.10.so
under radiusd.conf the shared lib points to:
libdir = /usr/local/lib/freeradius-2.1.10
Any clue as to why it does not see the files?
Thanks
On Wed, Mar 30, 2011 at 9:12 AM, Franz <flamana@gmail.com> wrote:
Hi, Thanks David and Alan for this great advise, I will try it and post back.
Thanks!
On Wed, Mar 30, 2011 at 8:56 AM, David Wood <david@wood2.org.uk> wrote:
Hi Franz,
In message <AANLkTikH+a1YJDGU5N-TyF-8Xo8_tdE23EqO2V7k+YJX@mail.gmail.com>, Franz <flamana@gmail.com> writes
I have currently installed freeradius 2.1.10 and Mysql 5..5.10 on a
pfsense box which is freebsd. I want this to work with mysql however I was wondering how to install freeradius with mysql support as I am unable to do it via ports or try any commands or flags with ./configure via tarball. Only pkg_add is available, can I recompile or install from scratch to get freeradius to bind to mysql?
Alan has already given you the answer - you need a development environment. pfSense does not contain compilers and other development tools to keep the image size down.
Another reason why pfSense does not contain development tools is because it is arguably inappropriate to build software on a firewall. Maybe you are using pfSense for some other task, though if you are using it as a firewall, I would argue strongly that your RADIUS server should be running on another machine inside your firewall.
You can't reconfigure a binary package - the configuration is burned in when it is created, usually by the default options. It is nonsense to try to pass configuration flags to pkg_add.
The default options are always set for minimum external dependencies - if you want features like SQL or LDAP support, you have to set the relevant options yourself and rebuild the package. FreeBSD does not adopt the approach of some Linux distributions, where the additional modules are distributed in separate binary packages.
You will need to set the appropriate options for the net/freeradius2 port and build a package using that port on a FreeBSD box of the appropriate release and major version - ideally the minor version should also match, though that doesn't usually matter. You can then pkg_add that package on the pfSense machine.
pfSense 2.0 RC is based on FreeBSD 8.1 - amd64 for the 64 bit version and i386 for the 32 bit version.
pfSense 1.2.3 is based on FreeBSD 7.2 i386.
A virtual machine can be useful for building packages if you don't have access to a FreeBSD machine.
When I maintained the FreeBSD FreeRADIUS ports, I was asked to create a net/freeradius-mysql slave port for someone working on pfSense. This is FreeRADIUS 1.x and should probably die. It isn't realistic to create slave ports for all the dependencies that people might require - port bloat is frowned on.
With best wishes,
David -- David Wood david@wood2.org.uk
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Wed, Mar 30, 2011 at 06:37:59PM -0400, Franz wrote:
/usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" /usr/local/etc/raddb/sites-enabled/inner-tunnel[131]: Failed to load module "sql". /usr/local/etc/raddb/sites-enabled/inner-tunnel[47]: Errors parsing authorize section. and when I check all fles are in here: /usr/local/lib/freeradius-2.1.10 [1]rlm_sql_mysql-2.1.10.la rlm_sql_mysql.so [2]rlm_sql_mysql.la rlm_sql_mysql.a [3]rlm_sql_mysql-2.1.10.so under radiusd.conf the shared lib points to: libdir = /usr/local/lib/freeradius-2.1.10 Any clue as to why it does not see the files?
I note that the error above is for failing to load "sql" (i.e. rlm_sql), but your listing above shows only rlm_sql_mysql. You need both. Anyway, what do these commands show? ldd /usr/local/lib/rlm_sql.so ldd /usr/local/lib/rlm_sql_mysql.so Possibly you are missing some library which rlm_sql_mysql in turn depends on (such as the correct version of libmysqlclient) Regards, Brian.
participants (4)
-
Alan DeKok -
Brian Candler -
David Wood -
Franz