[vpp-dev] VPP Plugins build errors from IPSec module


Neale Ranns
 

Hi Kausik,

Did you run:
make install-ext-dep

/neale

From: <vpp-dev@...> on behalf of "Majumdar, Kausik" <Kausik.Majumdar@...>
Date: Tuesday 25 February 2020 at 23:35
To: "vpp-dev@..." <vpp-dev@...>
Cc: "vppsb-dev@..." <vppsb-dev@...>, "Majumdar, Kausik" <Kausik.Majumdar@...>
Subject: [vpp-dev] VPP Plugins build errors from IPSec module

Hi folks,
 
I am trying to build VPP netlink and router plugins based on vpp branch v20.01 to integrate and run with routing control plane FRR. I am following the guidelines based on https://github.com/FRRouting/frr/wiki/Alternate-forwarding-planes:-VPP
 
I am finding issues while trying to compile the IPSec plugin code, it is exiting with the below error. I have tried with latest VPP master branch, the result is pretty much same. Is there any resolution to this issue or am I missing something? If I try to use VPP v18.10 branch then I hit other netlink issue which I think discussed in this thread in the past. Hence moved to latest VPP code base, tried to link VPPSB and build the netlink-install and router-install plugins, hitting IPSec build failures. Any recommendation would be helpful.
 
I am running Centos 7.4 machine.
 
[root@localhost build-root]# git branch
* (detached from v20.01)
  master
 
[root@localhost build-root]# make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for external @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/external.mk @@@@
@@@@ Source found in /root/vpp/build @@@@
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for vpp @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/vpp.mk @@@@
@@@@ Source found in /root/vpp/src @@@@
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for netlink @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/netlink.mk @@@@
@@@@ Source found in /root/vpp/netlink @@@@
@@@@ Configuring external: nothing to do @@@@
@@@@ Building external: nothing to do @@@@
@@@@ Installing external: nothing to do @@@@
@@@@ Configuring vpp: nothing to do @@@@
@@@@ Building vpp in /root/vpp/build-root/build-vpp_debug-native/vpp @@@@
[1/660] Building C object plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o
FAILED: plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o
/opt/rh/devtoolset-7/root/bin/cc -Dcrypto_ipsecmb_plugin_EXPORTS -I/root/vpp/src -I. -Iinclude -I/root/vpp/src/plugins -Iplugins -I/opt/vpp/external/x86_64/include -Wno-address-of-packed-member -g -fPIC -Werror -Wall -march=corei7 -mtune=corei7-avx  -O0 -DCLIB_DEBUG -fstack-protector -DFORTIFY_SOURCE=2 -fno-common  -fPIC   -march=silvermont -maes -MD -MT plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o -MF plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o.d -o plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o   -c /root/vpp/src/plugins/crypto_ipsecmb/ipsecmb.c
/root/vpp/src/plugins/crypto_ipsecmb/ipsecmb.c:20:10: fatal error: intel-ipsec-mb.h: No such file or directory
 #include <intel-ipsec-mb.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
[4/660] Building C object plugins/ct6/CMakeFiles/ct6_test_plugin.dir/ct6_test.c.o
ninja: build stopped: subcommand failed.
make: *** [vpp-build] Error 1
[root@localhost build-root]#
 
Thanks,
Kausik


Neale Ranns
 

Hi Kausik,

The remaining build errors are from the router plugin, those I cannot help with.

/neale


On 26/02/2020 08:19, "vpp-dev@... on behalf of Majumdar, Kausik" <vpp-dev@... on behalf of kausik.majumdar@...> wrote:


Hi Neale,

Thanks for your reply! Yes, now I have compiled vpp v20.01 codebase, built rpm package and installed it. The vpp process comes up. Currently, the built errors are bit different, netlink lib built is failing. Also, I see the same issue being discussed earlier in the vpp-dev mailing alias, but not sure what was the solution. I have seen the same issue with latest vpp and v18.10 code base.

Please suggest me any recommendation here.

Thanks,
Kausik

/root/vpp/build-data/../netlink/librtnl/netns.c:69:5: error: 'RTA_VIA' undeclared here (not in a function)
_(RTA_VIA, via, 1) \
^
/root/vpp/build-data/../netlink/librtnl/rtnl.c:269:39: error: 'RTNLGRP_MPLS_ROUTE' undeclared (first use in this function)
grpmask(RTNLGRP_NOTIFY) | grpmask(RTNLGRP_MPLS_ROUTE),
^

1. The netlink and router plugins failed to built due to the below errors:

[root@localhost vpp]# ln -sf /home/vagrant/vppsb/netlink
[root@localhost vpp]# ln -sf /home/vagrant/vppsb/router
[root@localhost vpp]# ln -sf ../../netlink/netlink.mk build-data/packages/
[root@localhost vpp]# ln -sf ../../router/router.mk build-data/packages/
[root@localhost vpp]# cd build-root/
[root@localhost build-root]# git branch
* (detached from v20.01)
master
[root@localhost build-root]# make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for external @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/external.mk @@@@
@@@@ Source found in /root/vpp/build @@@@
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for vpp @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/vpp.mk @@@@
@@@@ Source found in /root/vpp/src @@@@
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for netlink @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/netlink.mk @@@@
@@@@ Source found in /root/vpp/netlink @@@@
@@@@ Configuring external: nothing to do @@@@
@@@@ Building external: nothing to do @@@@
@@@@ Installing external: nothing to do @@@@
@@@@ Configuring vpp: nothing to do @@@@
@@@@ Building vpp in /root/vpp/build-root/build-vpp_debug-native/vpp @@@@
ninja: no work to do.
@@@@ Installing vpp: nothing to do @@@@
@@@@ Configuring netlink: nothing to do @@@@
@@@@ Building netlink in /root/vpp/build-root/build-vpp_debug-native/netlink @@@@
make[1]: Entering directory `/root/vpp/build-root/build-vpp_debug-native/netlink'
CC librtnl/rtnl.lo
CC librtnl/netns.lo
/root/vpp/build-data/../netlink/librtnl/netns.c:69:5: error: 'RTA_VIA' undeclared here (not in a function)
_(RTA_VIA, via, 1) \
^
/root/vpp/build-data/../netlink/librtnl/netns.c:82:13: note: in definition of macro '_'
.type = t, .unique = u, \
^
/root/vpp/build-data/../netlink/librtnl/netns.c:86:3: note: in expansion of macro 'ns_foreach_rta'
ns_foreach_rta
^
/root/vpp/build-data/../netlink/librtnl/rtnl.c: In f[root@localhost vpp]# ln -sf /home/vagrant/vppsb/netlink
[root@localhost vpp]# ln -sf /home/vagrant/vppsb/router
[root@localhost vpp]# ln -sf ../../netlink/netlink.mk build-data/packages/
[root@localhost vpp]# ln -sf ../../router/router.mk build-data/packages/
[root@localhost vpp]# cd build-root/
[root@localhost build-root]# ls
a gcm##b##_pre vpp-20.01-release.x86_64.rpm
aes_gcm_pre hash_fn vpp-api-lua-20.01-release.x86_64.rpm
autowank install-vpp_debug-native vpp-api-python-20.01-release.x86_64.rpm
build-config.mk install-vpp-native vpp-api-python3-20.01-release.x86_64.rpm
build-config.mk.README Makefile vpp-debuginfo-20.01-release.x86_64.rpm
build-vpp_debug-native platforms.mk vpp-devel-20.01-release.x86_64.rpm
build-vpp-native rpmbuild vpp-latest.tar.xz
c scripts vpp-lib-20.01-release.x86_64.rpm
config.site vagrant vpp-plugins-20.01-release.x86_64.rpm
copyimg vpp-20.01-release.tar.xz vpp-selinux-policy-20.01-release.x86_64.rpm
[root@localhost build-root]# git branch
* (detached from v20.01)
master
[root@localhost build-root]# make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for external @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/external.mk @@@@
@@@@ Source found in /root/vpp/build @@@@
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for vpp @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/vpp.mk @@@@
@@@@ Source found in /root/vpp/src @@@@
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for netlink @@@@
@@@@ Makefile fragment found in /root/vpp/build-data/packages/netlink.mk @@@@
@@@@ Source found in /root/vpp/netlink @@@@
@@@@ Configuring external: nothing to do @@@@
@@@@ Building external: nothing to do @@@@
@@@@ Installing external: nothing to do @@@@
@@@@ Configuring vpp: nothing to do @@@@
@@@@ Building vpp in /root/vpp/build-root/build-vpp_debug-native/vpp @@@@
ninja: no work to do.
@@@@ Installing vpp: nothing to do @@@@
@@@@ Configuring netlink: nothing to do @@@@
@@@@ Building netlink in /root/vpp/build-root/build-vpp_debug-native/netlink @@@@
make[1]: Entering directory `/root/vpp/build-root/build-vpp_debug-native/netlink'
CC librtnl/rtnl.lo
CC librtnl/netns.lo
/root/vpp/build-data/../netlink/librtnl/netns.c:69:5: error: 'RTA_VIA' undeclared here (not in a function)
_(RTA_VIA, via, 1) \
^
/root/vpp/build-data/../netlink/librtnl/netns.c:82:13: note: in definition of macro '_'
.type = t, .unique = u, \
^
/root/vpp/build-data/../netlink/librtnl/netns.c:86:3: note: in expansion of macro 'ns_foreach_rta'
ns_foreach_rta
^
/root/vpp/build-data/../netlink/librtnl/rtnl.c: In function 'rtnl_socket_open':
/root/vpp/build-data/../netlink/librtnl/rtnl.c:269:39: error: 'RTNLGRP_MPLS_ROUTE' undeclared (first use in this function)
grpmask(RTNLGRP_NOTIFY) | grpmask(RTNLGRP_MPLS_ROUTE),
^
/root/vpp/build-data/../netlink/librtnl/rtnl.c:269:39: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [librtnl/rtnl.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [librtnl/netns.lo] Error 1
make[1]: Leaving directory `/root/vpp/build-root/build-vpp_debug-native/netlink'
make: *** [netlink-build] Error 2
[root@localhost build-root]#
unction 'rtnl_socket_open':
/root/vpp/build-data/../netlink/librtnl/rtnl.c:269:39: error: 'RTNLGRP_MPLS_ROUTE' undeclared (first use in this function)
grpmask(RTNLGRP_NOTIFY) | grpmask(RTNLGRP_MPLS_ROUTE),
^
/root/vpp/build-data/../netlink/librtnl/rtnl.c:269:39: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [librtnl/rtnl.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [librtnl/netns.lo] Error 1
make[1]: Leaving directory `/root/vpp/build-root/build-vpp_debug-native/netlink'
make: *** [netlink-build] Error 2
[root@localhost build-root]#

-----Original Message-----
From: Neale Ranns (nranns) <nranns@...>
Sent: Tuesday, February 25, 2020 10:32 PM
To: Majumdar, Kausik <Kausik.Majumdar@...>; vpp-dev@...
Cc: vppsb-dev@...
Subject: Re: [vpp-dev] VPP Plugins build errors from IPSec module

Message received from external source. Exercise caution when opening attachments, clicking links, or exchanging information.



Hi Kausik,

Did you run:
make install-ext-dep

/neale

From: <vpp-dev@...> on behalf of "Majumdar, Kausik" <Kausik.Majumdar@...>
Date: Tuesday 25 February 2020 at 23:35
To: "vpp-dev@..." <vpp-dev@...>
Cc: "vppsb-dev@..." <vppsb-dev@...>, "Majumdar, Kausik" <Kausik.Majumdar@...>
Subject: [vpp-dev] VPP Plugins build errors from IPSec module

Hi folks,

I am trying to build VPP netlink and router plugins based on vpp branch v20.01 to integrate and run with routing control plane FRR. I am following the guidelines based on https://secure-web.cisco.com/1NEdokSbQqopKRLdvL5uyb7-Fga29wluiY0hC6MVPft3y5NxoQRIpsqSeJs5Wj_rRNGrjfdCGAcrZvCTwlF1LDg5zrWe6zIrbudgg0KqNY6MFYjZ6bZaGemmECxB0ptw8v_U5Ey8JaXrq72fEgmJISgAxmrU3PpWEnsXst-MdOtCU6lppszxmSh7lOG4gLgTcIDCdY1dUs9UCYmOoXqW_2Hrx-hu5TcH8Ex0UFt5tP5W3sZQrsqkPi7JqkxIUSqgvanDmYIcJMtkdOIIvpiG7Av4x0RhuxmIByx8jScHPKMsGsXTlFAgEMRJNKMgfUhMqEiK_45N-rZciiM9xh-VasQ/https%3A%2F%2Fgithub.com%2FFRRouting%2Ffrr%2Fwiki%2FAlternate-forwarding-planes%3A-VPP

I am finding issues while trying to compile the IPSec plugin code, it is exiting with the below error. I have tried with latest VPP master branch, the result is pretty much same. Is there any resolution to this issue or am I missing something? If I try to use VPP v18.10 branch then I hit other netlink issue which I think discussed in this thread in the past. Hence moved to latest VPP code base, tried to link VPPSB and build the netlink-install and router-install plugins, hitting IPSec build failures. Any recommendation would be helpful.

I am running Centos 7.4 machine.

[root@localhost build-root]# git branch
* (detached from v20.01)
master

[root@localhost build-root]# make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install @@@@ Arch for platform 'vpp' is native @@@@ @@@@ Finding source for external @@@@ @@@@ Makefile fragment found in /root/vpp/build-data/packages/external.mk @@@@ @@@@ Source found in /root/vpp/build @@@@ @@@@ Arch for platform 'vpp' is native @@@@ @@@@ Finding source for vpp @@@@ @@@@ Makefile fragment found in /root/vpp/build-data/packages/vpp.mk @@@@ @@@@ Source found in /root/vpp/src @@@@ @@@@ Arch for platform 'vpp' is native @@@@ @@@@ Finding source for netlink @@@@ @@@@ Makefile fragment found in /root/vpp/build-data/packages/netlink.mk @@@@ @@@@ Source found in /root/vpp/netlink @@@@ @@@@ Configuring external: nothing to do @@@@ @@@@ Building external: nothing to do @@@@ @@@@ Installing external: nothing to do @@@@ @@@@ Configuring vpp: nothing to do @@@@ @@@@ Building vpp in /root/vpp/build-root/build-vpp_debug-native/vpp @@@@ [1/660] Building C object plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o
FAILED: plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o
/opt/rh/devtoolset-7/root/bin/cc -Dcrypto_ipsecmb_plugin_EXPORTS -I/root/vpp/src -I. -Iinclude -I/root/vpp/src/plugins -Iplugins -I/opt/vpp/external/x86_64/include -Wno-address-of-packed-member -g -fPIC -Werror -Wall -march=corei7 -mtune=corei7-avx -O0 -DCLIB_DEBUG -fstack-protector -DFORTIFY_SOURCE=2 -fno-common -fPIC -march=silvermont -maes -MD -MT plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o -MF plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o.d -o plugins/crypto_ipsecmb/CMakeFiles/crypto_ipsecmb_plugin.dir/ipsecmb.c.o -c /root/vpp/src/plugins/crypto_ipsecmb/ipsecmb.c
/root/vpp/src/plugins/crypto_ipsecmb/ipsecmb.c:20:10: fatal error: intel-ipsec-mb.h: No such file or directory
#include <intel-ipsec-mb.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
[4/660] Building C object plugins/ct6/CMakeFiles/ct6_test_plugin.dir/ct6_test.c.o
ninja: build stopped: subcommand failed.
make: *** [vpp-build] Error 1
[root@localhost build-root]#

Thanks,
Kausik