Re: [PATCH v2] crypto/openssl: add openssl path for cross compile
From: De Lara Guarch, Pablo <hidden>
Date: 2017-09-05 08:22:43
Hi Akhil,
-----Original Message----- From: Akhil Goyal [mailto:akhil.goyal@nxp.com] Sent: Tuesday, August 29, 2017 8:02 AM To: dev@dpdk.org; De Lara Guarch, Pablo [off-list ref] Cc: hemant.agrawal@nxp.com; Doherty, Declan [off-list ref]; Akhil Goyal [off-list ref] Subject: [PATCH v2] crypto/openssl: add openssl path for cross compile OPENSSL_PATH should be defined in case openssl driver is cross compiled Signed-off-by: Akhil Goyal <redacted> ---
...
quoted hunk ↗ jump to hunk
--- a/mk/rte.app.mk +++ b/mk/rte.app.mk@@ -151,7 +151,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -lrte_pmd_aesni_mb _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += - lrte_pmd_aesni_gcm _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += - L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += -lrte_pmd_openssl - lcrypto +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += - L${OPENSSL_PATH}/lib -lrte_pmd_openssl -lcrypto
I am getting the following messages when compiling:
/usr/bin/ld: skipping incompatible /lib/libcrypto.so when searching for -lcrypto
/usr/bin/ld: skipping incompatible /lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /lib/libm.so when searching for -lm
Since, OPENSSL_PATH is not defined in my system, it is trying to link against libraries in /lib/.
I suggest adding a condition to add the openssl directory only if OPENSSL_PATH is defined:
+ifeq ($(OPENSSL_PATH),)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += -lrte_pmd_openssl -lcrypto
+else
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += -L${OPENSSL_PATH}/lib -lrte_pmd_openssl -lcrypto
+endif
Would this work for you?
Thanks,
Pablo