Compiling support for libkqueue on docker image

Alan DeKok aland at deployingradius.com
Fri Oct 18 14:32:39 UTC 2024


On Oct 17, 2024, at 11:42 AM, Mark Donnelly <mark at PAINLESS-SECURITY.COM> wrote:
> 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".

  The default build for Linux is to use select().  For *BSD, kqueue is the default.

  I'd prefer to not change that default.

> 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".

  That is the best way to selectively enable libkqueue on Linux.

> 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])

  Unfortunately, that changes the defaults for everyone.  So that change won't go in.

  Maybe we can add a configure flag --with-libkqueue ?

> 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?

$ make reconfig

  Alan DeKok.



More information about the Freeradius-Users mailing list