Application (confd_load) must be re-compiled

I’m having trouble compiling confd_load:

root@%: /confd/bin/confd --addloadpath /yang-models
root@%: /confd/bin/confd_load -d -d -m -l -o /configs/device-init.xml
DEBUG Library MAXDEPTH/MAXKEYLEN (27/5) is not compatible with application (20/9)
- application (confd_load) must be re-compiled

I’m using confd-basic-8.0.17 in a docker container using ubuntu 18.04. confd_load is compiled using:

root@%: cd /confd/src/confd/tools
root@%: make -f Makefile.confd_cmd CONFD_DIR=/confd EXTRA_CFLAGS="-DMAXDEPTH=27 -DMAXKEYLEN=5"

Afterwards confd_load and confd_cmd is copied to /confd/bin, and yet the error message persists. The question is, what is the proper way to compile confd_load, or is the error message misleading and something else needs to be recompiled?

Hi,

For a larger DEPTH/KEY space, you typically need to recompile 3 things:

  1. libconfd
  2. confd_load
  3. confd_cmd

If you haven’t recompiled (and linked, etc) libconfd, you are probably receiving this message from ConfD itself, as it validates the input that your confd_load is sending. There are also some similar posts with answers that may be helpful, like: DEBUG Library MAXDEPTH/MAXKEYLEN 20/9 for confd_hkeypath_t are too small, ConfD needs 28/4.

libconfd is recompiled to set the depth to 25. How to recompile the confd_load and confd_cmd to update the maxdepth values to 25 ?
I am getting below error:
./confd_load
DEBUG Library MAXDEPTH/MAXKEYLEN (25/9) is not compatible with application (20/9)

  • application (confd_load) must be re-compiled

This is still telling you that your application (libconfd) is compiled with 20/9 and your confd_load has been updated to your new values. You may have provided the new values as EXTRA_CFLAGS but I have seen cases in which that isn’t enough and it has worked to edit confd_lib.h

#define MAXDEPTH 25   /* max depth of model tree (max KP length + 1) */
#define MAXKEYLEN 5   /* max number of key elems (max keys + 1) */

to ensure that the libconfd build uses the new values.

Then of course, it is important to make sure that newly built library is in the right place by running

make install