my struggle with the build system
David Huss
david.huss at hfbk-hamburg.de
Tue Jan 14 13:45:40 UTC 2025
Hi,
I am trying to add argon2-support to the rlm_pap module in v3.0 of
freeradius. argon2 is a modern password hashing algorithm that our (art
university) LDAP uses. Now we were under the (obviously wrong)
assumption that any program would send the cleartext password to our
LDAP and ask it for a thumbs-up/down. Hence the need to add the hashing
function.
I think I am fine in terms of the code, but am fighting a bit with the
build system.
Does anybody have pointers where I would add the dependencies? I didn't
find any documentation on that and my learnings from looking at other
modules was somewhat limited. My first hunch was to add them to
src/includes and to src/includes/all.mk but then I realized all the
implementation C-files are located at src/lib
So I tried the following:
- adding argon.h to src/includes/argon.h
- adding argon.h to src/includes/all.mk
- adding all of the argon.h dependencies to src/includes as well
- adding argon.c to src/lib/argon.c
- adding argon.c to src/lib.all.mk
- adding all of the argon.c dependencies (.c-files) to src/lib
This does not work as the linker fails to find some functions from the
argon.c dependencies:
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `fill_memory_blocks'
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `finalize'
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `clear_internal_memory'
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `numlen'
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `validate_inputs'
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `initialize'
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `decode_string'
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `b64len'
/usr/bin/ld: build/lib/local/.libs/libfreeradius-radius.so: undefined
reference to `encode_string'
Is there a correct way of adding those dependencies? Forgive my
C-noob-question..
All the best from Hamburg,
David Huss
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20250114/2ba479ab/attachment.sig>
More information about the Freeradius-Devel
mailing list