[Kea-users] Unit test Linkage issue to dhcpsrv

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] Unit test Linkage issue to dhcpsrv

Gokulakrishnan Gopalakrishnan
My user_chk hook unit test is failing with this following linkage issue:

  CXXLD    libdhcp_user_chk_unittests

libdhcp_user_chk_unittests-user_unittests.o: In function `getHostNameIPAddress':

/opt/jenkins/workspace/Kea/Kea/src/hooks/dhcp/user_chk/tests/../../../../../src/hooks/dhcp/user_chk/load_unload.cc:195: undefined reference to `isc::dhcp::CfgMgr::instance()'

/opt/jenkins/workspace/Kea/Kea/src/hooks/dhcp/user_chk/tests/../../../../../src/hooks/dhcp/user_chk/load_unload.cc:195: undefined reference to `isc::dhcp::CfgMgr::getStagingCfg()'

/opt/jenkins/workspace/Kea/Kea/src/hooks/dhcp/user_chk/tests/../../../../../src/hooks/dhcp/user_chk/load_unload.cc:195: undefined reference to `isc::dhcp::CfgIface::use(unsigned short, std::string const&)'

collect2: error: ld returned 1 exit status

In addition to existing Makefile.am LIBS, I've added these dhcpsrv Libs too. Looks like I'm missing something here. Can someone please help here?

libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/bin/dhcp4/libdhcp4.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/testutils/libdhcpsrvtest.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/testutils/libkea-testutils.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcp/tests/libdhcptest.la

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Unit test Linkage issue to dhcpsrv

Gokulakrishnan Gopalakrishnan
Any clue here? I'm adding <# include "load_unload.cc"> in my unit test and wondering how to fix this linkage issue. is there any other libs, I need to add in the list

On Thu, Sep 7, 2017 at 10:55 PM, Gokulakrishnan Gopalakrishnan <[hidden email]> wrote:
My user_chk hook unit test is failing with this following linkage issue:

  CXXLD    libdhcp_user_chk_unittests

libdhcp_user_chk_unittests-user_unittests.o: In function `getHostNameIPAddress':

/opt/jenkins/workspace/Kea/Kea/src/hooks/dhcp/user_chk/tests/../../../../../src/hooks/dhcp/user_chk/load_unload.cc:195: undefined reference to `isc::dhcp::CfgMgr::instance()'

/opt/jenkins/workspace/Kea/Kea/src/hooks/dhcp/user_chk/tests/../../../../../src/hooks/dhcp/user_chk/load_unload.cc:195: undefined reference to `isc::dhcp::CfgMgr::getStagingCfg()'

/opt/jenkins/workspace/Kea/Kea/src/hooks/dhcp/user_chk/tests/../../../../../src/hooks/dhcp/user_chk/load_unload.cc:195: undefined reference to `isc::dhcp::CfgIface::use(unsigned short, std::string const&)'

collect2: error: ld returned 1 exit status

In addition to existing Makefile.am LIBS, I've added these dhcpsrv Libs too. Looks like I'm missing something here. Can someone please help here?

libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/bin/dhcp4/libdhcp4.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/testutils/libdhcpsrvtest.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/testutils/libkea-testutils.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcp/tests/libdhcptest.la


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