Skip to contentSkip to conversation

compat: fix symbol version support with meson

PATCH Superseded Bruce Richardson 3 participants 6 messages Aug 30, 2018 – Sep 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compat: fix symbol version support with meson

For meson builds, the define to enable the symbol version macros in rte_compat.h was missing. This led to symbols being omitted from shared objects. For example, checking rte_distributor.so with objdump and comparing make and meson built versions:

$ objdump -T make-build/lib/librte_distributor.so | grep _flush
 0000000000001b60 g    DF .text	00000000000000a7 (DPDK_2.0)   rte_distributor_flush
 0000000000003f10 g    DF .text	0000000000000434  DPDK_17.05  rte_distributor_flush
$ objdump -T meson-build/lib/librte_distributor.so | grep _flush
 0000000000001d50 g    DF .text	00000000000000fb  DPDK_2.0    rte_distributor_flush

Adding in the missing define fixes this.

Fixes 5b9656b157d3 ("lib: build with meson")
---
 config/rte_config.h | 3 +++
 1 file changed, 3 insertions(+)
config/rte_config.h +3 -0
index a8e479774..46775a841 100644
@@ -20,6 +20,9 @@
 
 /****** library defines ********/
 
+/* compat defines */
+#define RTE_BUILD_SHARED_LIB
+
 /* EAL defines */
 #define RTE_MAX_MEMSEG_LISTS 128
 #define RTE_MAX_MEMSEG_PER_LIST 8192
Signature · 1 line
2.17.1
Tested-by on v1 1/1
#1 lore raw
Quoted 35 lines · Bruce Richardson

For meson builds, the define to enable the symbol version macros in rte_compat.h was missing. This led to symbols being omitted from shared objects. For example, checking rte_distributor.so with objdump and comparing make and meson built versions:

$ objdump -T make-build/lib/librte_distributor.so | grep _flush
 0000000000001b60 g    DF .text	00000000000000a7
(DPDK_2.0)   rte_distributor_flush
 0000000000003f10 g    DF .text	0000000000000434  DPDK_17.05  
rte_distributor_flush
$ objdump -T meson-build/lib/librte_distributor.so | grep _flush
 0000000000001d50 g    DF .text	00000000000000fb  DPDK_2.0    
rte_distributor_flush

Adding in the missing define fixes this.

Fixes 5b9656b157d3 ("lib: build with meson")

---
 config/rte_config.h | 3 +++

 1 file changed, 3 insertions(+)
config/rte_config.h +0 -0
index a8e479774..46775a841 100644
@@ -20,6 +20,9 @@


 /****** library defines ********/

config/rte_config.h +3 -0
+/* compat defines */
+#define RTE_BUILD_SHARED_LIB
+
Quoted 3 lines

 /* EAL defines */
 #define RTE_MAX_MEMSEG_LISTS 128
 #define RTE_MAX_MEMSEG_PER_LIST 8192

Signature · 2 lines
Kind regards,
Luca Boccassi
#2 lore raw

30/08/2018 19:31, Luca Boccassi:

Quoted 15 lines · Bruce Richardson
Quoted 14 lines

For meson builds, the define to enable the symbol version macros in rte_compat.h was missing. This led to symbols being omitted from shared objects. For example, checking rte_distributor.so with objdump and comparing make and meson built versions:

$ objdump -T make-build/lib/librte_distributor.so | grep _flush
 0000000000001b60 g    DF .text	00000000000000a7
(DPDK_2.0)   rte_distributor_flush
 0000000000003f10 g    DF .text	0000000000000434  DPDK_17.05  
rte_distributor_flush
$ objdump -T meson-build/lib/librte_distributor.so | grep _flush
 0000000000001d50 g    DF .text	00000000000000fb  DPDK_2.0    
rte_distributor_flush
Quoted 8 lines
Quoted 6 lines

Adding in the missing define fixes this.

Fixes 5b9656b157d3 ("lib: build with meson")

Cc stable?

#3 lore raw
Quoted 18 lines · Thomas Monjalon

30/08/2018 19:31, Luca Boccassi:

Quoted 17 lines · Bruce Richardson
Quoted 16 lines

For meson builds, the define to enable the symbol version macros in rte_compat.h was missing. This led to symbols being omitted from shared objects. For example, checking rte_distributor.so with objdump and comparing make and meson built versions:

$ objdump -T make-build/lib/librte_distributor.so | grep _flush
 0000000000001b60 g    DF .text	00000000000000a7
(DPDK_2.0)   rte_distributor_flush
 0000000000003f10 g    DF .text	0000000000000434  DPDK_17.05  
rte_distributor_flush
$ objdump -T meson-build/lib/librte_distributor.so | grep _flush
 0000000000001d50 g    DF .text	00000000000000fb  DPDK_2.0    
rte_distributor_flush

Adding in the missing define fixes this.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Fixes 5b9656b157d3 ("lib: build with meson")

Cc stable?

Yes, will add on a V2.

#4 lore raw

PATCH v2 1/1 compat: fix symbol version support with meson

In reply to Bruce Richardson

For meson builds, the define to enable the symbol version macros in rte_compat.h was missing. This led to symbols being omitted from shared objects. For example, checking rte_distributor.so with objdump and comparing make and meson built versions:

$ objdump -T make-build/lib/librte_distributor.so | grep _flush
 0000000000001b60 g    DF .text	00000000000000a7 (DPDK_2.0)   rte_distributor_flush
 0000000000003f10 g    DF .text	0000000000000434  DPDK_17.05  rte_distributor_flush
$ objdump -T meson-build/lib/librte_distributor.so | grep _flush
 0000000000001d50 g    DF .text	00000000000000fb  DPDK_2.0    rte_distributor_flush

Adding in the missing define fixes this.

Fixes 5b9656b157d3 ("lib: build with meson")
---
 config/rte_config.h | 3 +++
 1 file changed, 3 insertions(+)
config/rte_config.h +3 -0
index a8e479774..46775a841 100644
@@ -20,6 +20,9 @@
 
 /****** library defines ********/
 
+/* compat defines */
+#define RTE_BUILD_SHARED_LIB
+
 /* EAL defines */
 #define RTE_MAX_MEMSEG_LISTS 128
 #define RTE_MAX_MEMSEG_PER_LIST 8192
Signature · 1 line
2.17.1
#5 lore raw

17/09/2018 10:18, Bruce Richardson:

Quoted 11 lines

For meson builds, the define to enable the symbol version macros in rte_compat.h was missing. This led to symbols being omitted from shared objects. For example, checking rte_distributor.so with objdump and comparing make and meson built versions:

$ objdump -T make-build/lib/librte_distributor.so | grep _flush
 0000000000001b60 g    DF .text	00000000000000a7 (DPDK_2.0)   rte_distributor_flush
 0000000000003f10 g    DF .text	0000000000000434  DPDK_17.05  rte_distributor_flush
$ objdump -T meson-build/lib/librte_distributor.so | grep _flush
 0000000000001d50 g    DF .text	00000000000000fb  DPDK_2.0    rte_distributor_flush
Quoted 8 lines

Adding in the missing define fixes this.

Fixes 5b9656b157d3 ("lib: build with meson")

Applied, thanks