Version 3.0.11 Compile Errors

Herwin Weststrate herwin at
Tue Jul 19 14:25:36 CEST 2016

On 19-07-16 08:49, Alan DeKok wrote:
> On Jul 19, 2016, at 12:51 AM, Wussler, Doug <doug.wussler at> wrote:
>> "--with-dhcp=no"
>   These are fixed in the v3.0.x branch in git.

Not completely true, I'm getting the same error when trying the latest
v3.0.x. It tries to compile src/modules/proto_dhcp/dhcpclient.c, which
is basicly an executable wrapped within a big "#ifdef WITH_DHCP"
statement. It can't find a main method here, that causes the build to
fail. Easiest fix is probably to add something like this at the bottom
of the file

  int main() {
    fprintf(stderr, "Build without DHCP\n");
    return -1;
  #endif /* WITH_DHCP */

Cleaner solution (and most likely more work) would be to not build
dhcpclient.c with dhcp disabled.

v3.1.x also fails: src/lib/dict.c tries to compare something with
DHCP_MAGIC_VENDOR. This is defined in src/include/dhcp.h, and only
included in this file in case dhcp is enabled.

>> I would prefer to eliminate unneeded options from the binary.
>   Honestly, it doesn't matter.  Saving ~20K of disk space is not really worth it.  The features you're trying to remove are only used when explicitly enabled in the configuration.

It might save you a few seconds compile time too. This would indicate
another solution: just remove the config option. It is broken, likely
nobody uses it, and the effects of it are close to nothing.

Herwin Weststrate

More information about the Freeradius-Users mailing list