Compiling support for libkqueue on docker image

Mark Donnelly mark at painless-security.com
Thu Oct 17 15:42:20 UTC 2024


Good day everyone!

I'm trying to create a docker image of FreeRADIUS 3.2.x (on Ubuntu24) with
libkqueue support enabled.  I had hoped it would be as easy as installing
the libkqueue-dev package before building, but it's turning out to be more
difficult.

First, I ensured that the docker image had libkqueue-dev installed during
the build process.  (For now I've listed it in debian/control.in as a build
dependency.)   I can verify that the libkqueue-dev package is installed,
but when the build runs ./configure, the configure script detects kqueue
support as "no".

I found that if I run the configure script manually with the LIBS
environment variable set to "-lkqueue", then configure is able to detect
kqueue support as "yes".

I looked at how configure.ac is set up to look for kqueue, and see that
it's on line 1802 as a parameter to the AC_CHECK_FUNCS check.  After
looking up what that means (I'm new to autoconf), it looks like autoconf
has been set up to check for kqueue within existing libraries, but not try
to load the libkqueue library before running that check.  So, I added a
block starting at line 1046:


dnl #
dnl #  Check for -lkqueue
dnl #  This library may be needed for kqueue.
dnl #
AC_SEARCH_LIBS([kqueue], [kqueue])

However, my attempts at running autoconf to regenerate the configure file
have all failed with lots of warnings or errors.  What's the correct way to
run autoconf for the FreeRADIUS source tree?

Cheers,
--Mark


More information about the Freeradius-Users mailing list