Source: suricata
Severity: serious
Tags: ftbfs help
Justification: fails to build from source (but built successfully in the past)

Suricata fails to build on armel at link time [1] due to duplicate objects 
between what
is built by the Rust compiler and what is built by gcc:

/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_add_4':
(.text+0x0): multiple definition of `__sync_fetch_and_add_4'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_add_4+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_sub_4':
(.text+0x38): multiple definition of `__sync_fetch_and_sub_4'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_sub_4+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_or_4':
(.text+0x70): multiple definition of `__sync_fetch_and_or_4'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_or_4+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_and_4':
(.text+0xa8): multiple definition of `__sync_fetch_and_and_4'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_and_4+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_xor_4':
(.text+0xe0): multiple definition of `__sync_fetch_and_xor_4'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_xor_4+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_nand_4':
(.text+0x118): multiple definition of `__sync_fetch_and_nand_4'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_nand_4+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_add_2':
(.text+0x154): multiple definition of `__sync_fetch_and_add_2'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_add_2+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_sub_2':
(.text+0x1b4): multiple definition of `__sync_fetch_and_sub_2'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_sub_2+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_or_2':
(.text+0x214): multiple definition of `__sync_fetch_and_or_2'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_or_2+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_and_2':
(.text+0x274): multiple definition of `__sync_fetch_and_and_2'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_and_2+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_xor_2':
(.text+0x2d4): multiple definition of `__sync_fetch_and_xor_2'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_xor_2+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_nand_2':
(.text+0x334): multiple definition of `__sync_fetch_and_nand_2'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_nand_2+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_add_1':
(.text+0x398): multiple definition of `__sync_fetch_and_add_1'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_add_1+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_sub_1':
(.text+0x3f4): multiple definition of `__sync_fetch_and_sub_1'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_sub_1+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_or_1':
(.text+0x450): multiple definition of `__sync_fetch_and_or_1'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_or_1+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_and_1':
(.text+0x4ac): multiple definition of `__sync_fetch_and_and_1'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_and_1+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_xor_1':
(.text+0x508): multiple definition of `__sync_fetch_and_xor_1'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_xor_1+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_fetch_and_nand_1':
(.text+0x564): multiple definition of `__sync_fetch_and_nand_1'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_fetch_and_nand_1+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_val_compare_and_swap_4':
(.text+0xbe8): multiple definition of `__sync_val_compare_and_swap_4'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_val_compare_and_swap_4+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_val_compare_and_swap_2':
(.text+0xc38): multiple definition of `__sync_val_compare_and_swap_2'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_val_compare_and_swap_2+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_val_compare_and_swap_1':
(.text+0xcb0): multiple definition of `__sync_val_compare_and_swap_1'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_val_compare_and_swap_1+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_synchronize':
(.text+0xd9c): multiple definition of `__sync_synchronize'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_synchronize+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_lock_test_and_set_4':
(.text+0xda8): multiple definition of `__sync_lock_test_and_set_4'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_lock_test_and_set_4+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_lock_test_and_set_2':
(.text+0xde0): multiple definition of `__sync_lock_test_and_set_2'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_lock_test_and_set_2+0x0):
 first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/9/libgcc.a(linux-atomic.o): in 
function `__sync_lock_test_and_set_1':
(.text+0xe40): multiple definition of `__sync_lock_test_and_set_1'; 
../rust/target/release/libsuricata.a(compiler_builtins-d2631cd9ed12b87c.compiler_builtins.k83988xm-cgu.1.rcgu.o):(.text.__sync_lock_test_and_set_1+0x0):
 first defined here

I have reported this to the debian-arm list [2, 3] but unfortunately we
have not arrived at a solution yet. Can anyone help (also calling out to
the Debian Rust Packaging Team)?

Thanks and best regards
Sascha

[1] 
https://buildd.debian.org/status/fetch.php?pkg=suricata&arch=armel&ver=1%3A5.0.2-1&stamp=1582286594&raw=0
[2] https://lists.debian.org/debian-arm/2019/11/msg00001.html
[3] https://lists.debian.org/debian-arm/2019/12/msg00014.html

Reply via email to