libfreeradius usage

Mathis Marion mathis.marion at silabs.com
Thu Sep 12 07:54:52 UTC 2024


On 11/09/2024 7:14 PM, Alan DeKok wrote:
> On Sep 11, 2024, at 6:10 AM, Mathis Marion <mathis.marion at silabs.com> wrote:
>> I want to experiment with libfreeradius, but I am having trouble even
>> compiling the main library header. First, the "libradius.h" header uses
>> the "RCSIDH()" macro before including "build.h"[1]. But even with a
>> manual inclusion of "build.h", I get a missing header dependency:
> 
>    It's not really intended to be built outside of the main server distribution.  i.e. it's not a stand-alone library.
> 

Good to know, then I wonder why the development headers are being
installed, and why a development package is available for the library
in Debian, maybe there are historic reasons.

To provide a bit of context, I was looking into replacing the RADIUS
client of our Wi-SUN border router for Linux[1]. I suppose that the
recommended method is to use radclient then?

[1]: https://github.com/SiliconLabs/wisun-br-linux

>    If you build the whole server, then it will also build libfreeradius.
> 
>>     $ echo '#include <freeradius/libradius.h>' | gcc -include freeradius/build.h -xc -
>>     In file included from /usr/local/include/freeradius/build.h:13,
>>                  from <command-line>:
>>     /usr/local/include/freeradius/autoconf.h:749:10: fatal error: freeradius/automask.h: No such file or directory
>>       749 | #include <freeradius/automask.h>
>>           |          ^~~~~~~~~~~~~~~~~~~~~~~
>>     compilation terminated.
>>
>> The "automask.h" header is present in the repo[2], but it does not seem
>> to be installed as part of the library headers with "make install". It
>> is also not present in by distribution's package of the library[3]. I
>> tried with v3.2.5 packaged by Debian, and v3.2.6 compiled from source,
>> am I doing something wrong?
> 
>    Hmm.. maybe that should be installed?
> 
>> I have also found a similar issue[4] which states that "autoconf.h"
>> should not be included, and that "missing.h" provides the necessary
>> values. In any case there is a chain of header dependency which
>> currently forces "autoconf.h" to be included so I am not sure how
>> relevant that statement is.
>>
>>     libradius.h > build.h > autoconf.h > automask.h
> 
>    That might need to be installed, too.
> 

"autoconf.h" is actually installed, but it pulls "automask.h" which
is not.

>> I did not find much documentation or examples for this library, feel
>> free to redirect me to the right resources in case I missed them. I am
>> also a bit confused with the relation between libfreeradius and the
>> freeradius-client project, the latter seems basically abandoned but it
>> is not clear to me what the functional differences are between the 2.
> 
>    FreeRADIUS is the server, which includes libfreeradius.
> 
>    freeradius-client is a separate and stand-alone project which implements a simple RADIUS client.  It has about 1% of the functionality of FreeRADIUS.
> 

Thank you for the clarification.

>    Alan DeKok.
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html


More information about the Freeradius-Devel mailing list