Dear Ravi, Looks like you are hitting two different issues, but there is no enough details in your email to b able to help you. For avx2 compilation issue, please make sure that you use clean repo (i.e git clean -fdx). Also provide OS version and gcc version.
On memory issue, I'm afraid that 1GB is just not enough... -- Damjan > On 26 May 2018, at 01:48, Ravi Kerur <rke...@gmail.com> wrote: > > Hi, > > I am seeing following build errors with latest vpp git repo. CPU on > the system I am building supports 'avx2'. Commenting 'avx2' in vnet.am > builds succesfully. However, I would like to use 'avx2' version of the > library. I have followed exact build instructions given in wiki. > > /*******build errors**********/ > > libtool: error: cannot find the library 'libvnet_avx2.la' or > unhandled argument 'libvnet_avx2.la'(B[m > Makefile:5720: recipe for target 'libvnet.la' failed > make[5]: *** [libvnet.la] Error 1 > make[5]: Leaving directory '/root/vpp/build-root/build-vpp-native/vpp' > Makefile:8217: recipe for target 'all-recursive' failed > make[4]: *** [all-recursive] Error 1 > make[4]: Leaving directory '/root/vpp/build-root/build-vpp-native/vpp' > Makefile:4204: recipe for target 'all' failed > make[3]: *** [all] Error 2 > make[3]: Leaving directory '/root/vpp/build-root/build-vpp-native/vpp' > Makefile:691: recipe for target 'vpp-build' failed > make[2]: *** [vpp-build] Error 2 > make[2]: Leaving directory '/root/vpp/build-root' > /root/vpp/build-data/platforms.mk:20: recipe for target 'install-deb' failed > make[1]: *** [install-deb] Error 1 > make[1]: Leaving directory '/root/vpp/build-root' > Makefile:467: recipe for target 'pkg-deb' failed > make: *** [pkg-deb] Error 2 > > > /**************Fix by commenting*******************/ > root@:/vpp# git diff > diff --git a/src/vnet.am b/src/vnet.am > index 3450b10..8d5c6d2 100644 > --- a/src/vnet.am > +++ b/src/vnet.am > @@ -1284,8 +1284,8 @@ libvnet_avx2_la_SOURCES = > $(libvnet_multiversioning_files) > libvnet_avx2_la_CFLAGS = \ > $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \ > -DCLIB_MULTIARCH_VARIANT=avx2 > -noinst_LTLIBRARIES += libvnet_avx2.la > -libvnet_la_LIBADD += libvnet_avx2.la > +#noinst_LTLIBRARIES += libvnet_avx2.la > +#libvnet_la_LIBADD += libvnet_avx2.la > endif > > if CC_SUPPORTS_AVX512 > > > VM I am using has 1GB memory and vpp fails to start with following > error message > > May 25 23:07:12 rkerur: Main heap allocation failure! > May 25 23:07:12 rkerur systemd[1]: vpp.service: Main process exited, > code=exited, status=1/FAILURE > May 25 23:07:12 rkerur systemd[1]: vpp.service: Unit entered failed state. > May 25 23:07:12 rkerur systemd[1]: vpp.service: Failed with result > 'exit-code'. > May 25 23:07:13 rkerur systemd[1]: vpp.service: Service hold-off time > over, scheduling restart. > May 25 23:07:13 rkerur systemd[1]: Stopped vector packet processing engine. > May 25 23:07:13 rkerur systemd[1]: Starting vector packet processing engine... > May 25 23:07:13 rkerurvpp[6720]: Main heap allocation failure! > May 25 23:07:13 rkerur systemd[1]: Started vector packet processing engine. > > Since 'main_heap_size' is defined to be 1GB (uword main_heap_size = > (1ULL << 30)), what is the minimum memory requirement for vpp > successful run? > > Thanks. > > >