libfreeradius usage
Alan DeKok
aland at deployingradius.com
Wed Sep 11 17:14:39 UTC 2024
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.
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.
> 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.
Alan DeKok.
More information about the Freeradius-Devel
mailing list