Met the same issue.

Vpp uses its “libtool” under “./build-root/build-vpp-native/vpp/libtool” 
(version is 2.4.6)
Quickly workaround is that modify this libtool, “link_all_deplibs=no” => 
“link_all_deplibs=yes”

Then “make run-release” again.

Tested under Ubuntu 16.04, in VM.


/Zhaoyan


From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Nicolau, Radu
Sent: Thursday, February 23, 2017 6:06 PM
To: Tkachuk, Georgii <georgii.tkac...@intel.com>; Lu, Patrick 
<patrick...@intel.com>; yusuf khan <yusuf.at...@gmail.com>; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] dpdk sw crypto- build error

If the issue appears on Ubuntu and other Debian based distros then the root of 
the problem is libtool, which is patched to set link_all_deplibs=no in the 
libtool script, effectively making libtool ignore library dependencies – the 
dependency_libs section in the .la files.

A quick workaround is to install libtool from sources.

Regards,
Radu
From: vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io> 
[mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of Tkachuk, Georgii
Sent: Wednesday, February 22, 2017 6:10 PM
To: Lu, Patrick <patrick...@intel.com<mailto:patrick...@intel.com>>; yusuf khan 
<yusuf.at...@gmail.com<mailto:yusuf.at...@gmail.com>>; 
vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] dpdk sw crypto- build error

We worked around this by adding extra compile flags to prevent the IPSec lib 
from being stripped from the compiler command:
Also, we proactively placed the libIPSec_MB.a into /usr/lib/. so that we don’t 
have to provide the path.

diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk
index 401a383..b5b2369 100644
--- a/build-data/platforms/vpp.mk
+++ b/build-data/platforms/vpp.mk
@@ -54,7 +54,7 @@ vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG 
-DFORTIFY_SOURCE=2 -march=$(MARCH) \
        -fstack-protector-all -fPIC -Werror

 vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-       -fstack-protector -fPIC -Werror
+       -fstack-protector -fPIC -Werror 
-Wl,--whole-archive,-l:libIPSec_MB.a,--no-whole-archive
 vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
        -fstack-protector -fPIC -Werror

If you don’t want to modify the vpp.mk it should also be possible to add the 
change to the vpp by guarding the IPSec lib as above in this bit:

if WITH_DPDK_CRYPTO_SW
DPDK_LD_ADD = -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
endif

Regards,
George

From: Lu, Patrick
Sent: Wednesday, February 22, 2017 11:02 AM
To: yusuf khan <yusuf.at...@gmail.com<mailto:yusuf.at...@gmail.com>>; 
vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Cc: Tkachuk, Georgii 
<georgii.tkac...@intel.com<mailto:georgii.tkac...@intel.com>>
Subject: RE: [vpp-dev] dpdk sw crypto- build error

Hi Yusuf,

We saw the same issue. Copying George for workaround.

Thanks,

Patrick

From: vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io> 
[mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of yusuf khan
Sent: Wednesday, February 22, 2017 8:50 AM
To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: [vpp-dev] dpdk sw crypto- build error

Hi,

I am trying to build latest vpp with vpp_uses_dpdk_cryptodev_sw = yes option to 
enable vpp sw crypto.
Initilia steps of downloading/compiling aesni-mb and isal-crypto works fine.
But during linking stage i am getting below errors...

CCLD     bin/vpp
  CCLD     vpp_api_test
  CCLD     pcap2pg
./.libs/libvnet.so: undefined reference to `aesni_gcm256_init'
./.libs/libvnet.so: undefined reference to `aes_xcbc_expand_key_avx'
./.libs/libvnet.so: undefined reference to `submit_job_sse'
./.libs/libvnet.so: undefined reference to `sha1_one_block_sse'
./.libs/libvnet.so: undefined reference to `flush_job_avx2'
./.libs/libvnet.so: undefined reference to `sha512_one_block_avx'
./.libs/libvnet.so: undefined reference to `aesni_gcm256_dec_finalize'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_enc_update'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_pre'
./.libs/libvnet.so: undefined reference to `sha1_one_block_avx'
./.libs/libvnet.so: undefined reference to `sha256_one_block_sse'
./.libs/libvnet.so: undefined reference to `aes_xcbc_expand_key_sse'
./.libs/libvnet.so: undefined reference to `sha224_one_block_avx'
./.libs/libvnet.so: undefined reference to `sha256_one_block_avx'
./.libs/libvnet.so: undefined reference to `init_mb_mgr_avx2'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_init'
./.libs/libvnet.so: undefined reference to `sha384_one_block_sse'
./.libs/libvnet.so: undefined reference to `submit_job_avx2'
./.libs/libvnet.so: undefined reference to `aesni_gcm256_dec_update'
./.libs/libvnet.so: undefined reference to `flush_job_avx'
./.libs/libvnet.so: undefined reference to `submit_job_avx512'
./.libs/libvnet.so: undefined reference to `aes_keyexp_256_avx'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_dec_finalize'
./.libs/libvnet.so: undefined reference to `aes_keyexp_192_avx'
./.libs/libvnet.so: undefined reference to `init_mb_mgr_sse'
./.libs/libvnet.so: undefined reference to `aes_keyexp_256_sse'
./.libs/libvnet.so: undefined reference to `aesni_gcm256_enc_finalize'
./.libs/libvnet.so: undefined reference to `init_mb_mgr_avx'
./.libs/libvnet.so: undefined reference to `aes_keyexp_128_sse'
./.libs/libvnet.so: undefined reference to `sha512_one_block_sse'
./.libs/libvnet.so: undefined reference to `aes_keyexp_128_avx'
./.libs/libvnet.so: undefined reference to `init_mb_mgr_avx512'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_dec_update'
./.libs/libvnet.so: undefined reference to `flush_job_avx512'
./.libs/libvnet.so: undefined reference to `sha384_one_block_avx'
./.libs/libvnet.so: undefined reference to `sha224_one_block_sse'
./.libs/libvnet.so: undefined reference to `md5_one_block_sse'
./.libs/libvnet.so: undefined reference to `aesni_gcm256_enc_update'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_enc_finalize'
./.libs/libvnet.so: undefined reference to `aesni_gcm256_pre'
./.libs/libvnet.so: undefined reference to `aes_keyexp_192_sse'
./.libs/libvnet.so: undefined reference to `submit_job_avx'
./.libs/libvnet.so: undefined reference to `flush_job_sse'
collect2: error: ld returned 1 exit status
Makefile:4651: recipe for target 'bin/vpp' failed

Most probably libvnet links with some dpdk.a , which inturn links to 
aes*-crypto libs but its undefined.
I tried nm on  build-root/install-vpp-native/dpdk/lib/librte_pmd_aesni_gcm.a  
and i get same undefined .

root@VPP:~/sample/vpp# nm 
build-root/install-vpp-native/dpdk/lib/librte_pmd_aesni_gcm.a |grep U
                 U aesni_gcm128_dec_finalize
                 U aesni_gcm128_dec_update
                 U aesni_gcm128_enc_finalize
                 U aesni_gcm128_enc_update
                 U aesni_gcm128_init
                 U aesni_gcm128_pre
                 U aesni_gcm256_dec_finalize
                 U aesni_gcm256_dec_update
                 U aesni_gcm256_enc_finalize
                 U aesni_gcm256_enc_update
                 U aesni_gcm256_init
                 U aesni_gcm256_pre

Let me know if this is known issue?
BTW i am building on ubuntu xenial native, no vm.

Br,
Yusuf
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to