Skip to contentSkip to conversation

Fix build failure on s390x

PATCH In review Sean Young 2 participants 2 messages Feb 16, 2020 – Feb 26, 2020 Media (V4L/DVB)

lore
Share & tools
lore

Sean Young

author
#0 lore raw

PATCH 1/1 Fix build failure on s390x

See: https://bugzilla.redhat.com/show_bug.cgi?id=1800228

/usr/bin/ld: .libs/libdvbv5_la-dvb-fe.o:(.bss+0x8): multiple definition of `delivery_system_name'; .libs/libdvbv5_la-dvb-v5.o:/builddir/build/BUILD/v4l-utils-1.18.0/lib/libdvbv5/dvb-v5.h:29: first defined here /usr/bin/ld: .libs/libdvbv5_la-dvb-fe.o:(.bss+0xa8): multiple definition of `dvb_v5_name'; .libs/libdvbv5_la-dvb-v5.o:/builddir/build/BUILD/v4l-utils-1.18.0/lib/libdvbv5/dvb-v5.h:28: first defined here /usr/bin/ld: .libs/libdvbv5_la-dvb-fe.o:(.rodata+0x3ec): multiple definition of `fe_bandwidth_name'; .libs/libdvbv5_la-dvb-v5.o:/builddir/build/BUILD/v4l-utils-1.18.0/lib/libdvbv5/dvb-v5.h:20: first defined here

delivery_system_name etc are being defined both in lib/libdvbv5/dvb-v5.c and lib/libdvbv5/dvb-v5.h.

---
 lib/libdvbv5/gen_dvb_structs.pl | 3 +++
 1 file changed, 3 insertions(+)
lib/libdvbv5/gen_dvb_structs.pl +3 -0
index 7e1d645c..d15d1fc3 100755
@@ -419,6 +419,9 @@ sub output_arrays($$$$$)
     }
     printf OUT " %s[%i]", $name, $size;
   } else {
+    if ($decl) {
+      printf OUT "extern ";
+    }
     printf OUT "const %s%s[%i]", $type, $name, $size + 1;
   }
 
Signature · 1 line
2.24.1
Acked-by on v1 1/1
#1 lore raw

Hi Sean,

Quoted 19 lines · Sean Young

See: https://bugzilla.redhat.com/show_bug.cgi?id=1800228

/usr/bin/ld: .libs/libdvbv5_la-dvb-fe.o:(.bss+0x8): multiple definition of `delivery_system_name'; .libs/libdvbv5_la-dvb-v5.o:/builddir/build/BUILD/v4l-utils-1.18.0/lib/libdvbv5/dvb-v5.h:29: first defined here /usr/bin/ld: .libs/libdvbv5_la-dvb-fe.o:(.bss+0xa8): multiple definition of `dvb_v5_name'; .libs/libdvbv5_la-dvb-v5.o:/builddir/build/BUILD/v4l-utils-1.18.0/lib/libdvbv5/dvb-v5.h:28: first defined here /usr/bin/ld: .libs/libdvbv5_la-dvb-fe.o:(.rodata+0x3ec): multiple definition of `fe_bandwidth_name'; .libs/libdvbv5_la-dvb-v5.o:/builddir/build/BUILD/v4l-utils-1.18.0/lib/libdvbv5/dvb-v5.h:20: first defined here

delivery_system_name etc are being defined both in lib/libdvbv5/dvb-v5.c and lib/libdvbv5/dvb-v5.h.

---
 lib/libdvbv5/gen_dvb_structs.pl | 3 +++
 1 file changed, 3 insertions(+)
lib/libdvbv5/gen_dvb_structs.pl +0 -0
index 7e1d645c..d15d1fc3 100755

lib/libdvbv5/gen_dvb_structs.pl sub output_arrays($$$$$) · line 427

Quoted 9 lines
lib/libdvbv5/gen_dvb_structs.pl +3 -0
@@ -419,6 +419,9 @@ sub output_arrays($$$$$)
     }
     printf OUT " %s[%i]", $name, $size;
   } else {
+    if ($decl) {
+      printf OUT "extern ";
+    }
     printf OUT "const %s%s[%i]", $type, $name, $size + 1;
   }
 
Signature · 1 line
Sakari Ailus