I tend to fumble around debugging stuff like this, so forgive me if I’m not 
doing what you ask; I really have no idea how :)

What I was able to piece together was starting up with LD_DEBUG=all :

root@build:/var/log/kea# LD_DEBUG=all /usr/local/sbin/kea-dhcp4 -c 
/usr/local/etc/kea/kea.conf -d &> kea2.log

Chopping through that log file, I found this:

2017-09-06 07:33:28.874 ERROR [kea-dhcp4.hooks/46864] HOOKS_LOAD_ERROR 'load' 
function in hook library /usr/local/lib/hooks/libdhcp_flex_id.so returned error 
1

Following that back up the logfile I found this:

2017-09-06 07:33:28.874 ERROR [kea-dhcp4.flex-id/46864] 
FLEX_ID_EXPRESSION_NOT_DEFINED Expression (identifier-expression) is not 
defined.

And following that back up further still, I found this:

/usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined 
symbol: subnet4_select (fatal)

So then I pulled out anything related to that particular error for the flex_id 
library:

root@build:/var/log/kea# grep "/usr/local/lib/hooks/libdhcp_flex_id.so: error:" 
kea2.log
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: buffer4_receive (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: buffer4_send (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: context_create (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: context_destroy (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: control_command_receive (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease4_decline (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease4_expire (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease4_recover (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease4_release (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease4_renew (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease4_select (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease6_expire (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease6_rebind (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease6_recover (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease6_renew (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: lease6_select (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: pkt4_receive (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: pkt4_send (fatal)
     46864:     /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup 
error: undefined symbol: subnet4_select (fatal)

What confuses me though, is that by cherry picking the first undefined symbol 
itself from the log file, it appears to be there, so I’m not sure why it’s not 
able to look it up:

root@build:/var/log/kea# grep buffer4_receive kea2.log
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/hooks/libdhcp_flex_id.so [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-dhcp++.so.5 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-asiolink.so.4 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-dns++.so.0 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-cc.so.2 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-hooks.so.3 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-log.so.3 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-eval.so.5 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-threads.so.1 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-util.so.2 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-exceptions.so.0 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/lib/x86_64-linux-gnu/libgcc_s.so.1 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/lib/x86_64-linux-gnu/libpthread.so.0 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/lib/x86_64-linux-gnu/libc.so.6 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/local/lib/libkea-cryptolink.so.2 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/lib/x86_64-linux-gnu/libm.so.6 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/usr/lib/x86_64-linux-gnu/liblog4cplus-1.1.so.9 [0]
     46864:     symbol=buffer4_receive;  lookup in 
file=/lib64/ld-linux-x86-64.so.2 [0]

Also, I’m confused about how the LD_LIBRARY_PATH issue would cause runtime 
issues.  Wouldn’t the hook fail to compile in the first place, or is 
LD_LIBRARY_PATH required at runtime?

Notwithstanding, I found this:

https://kea.isc.org/ticket/3741

Which suggests that while even though the startup error is different, running 
ldconfig after make install works, if required, however in my case, that didn’t 
do much of anything.

So any other insight appreciated :)

> On Sep 6, 2017, at 3:47 AM, Francis Dupont <[email protected]> wrote:
> 
> Try to get the HOOKS_OPEN_ERROR which returns errors from dlopen().
> Note the main reason to get dlopen to not find DSOs is to forget to
> set LD_LIBRARY_PATH...
> 
> Regards
> 
> Francis Dupont <[email protected]>

_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to