signum-network / signum-miner

The official signum-network miner
GNU General Public License v3.0
17 stars 4 forks source link

Build failure: multiple definition of `global_128' #8

Open ghost opened 3 years ago

ghost commented 3 years ago

cargo 1.53.0 (4369396ce 2021-04-27) gcc (Gentoo 11.2.0 p1) 11.2.0 rustc 1.53.0 (53cb7b09b 2021-06-17)

$ cargo build --release --features=simd
....
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-Wl,--as-needed" "-L" "/opt/rust-bin-1.53.0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/signum/apps/signum-miner/target/release/deps/signum_miner-e4fbb5d139392f02.signum_miner.cl76mwzx-cgu.0.rcgu.o" "-o" "/home/signum/apps/signum-miner/target/release/deps/signum_miner-e4fbb5d139392f02" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/signum/apps/signum-miner/target/release/deps" "-L" "/home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out" "-L" "/home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out" "-L" "/home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out" "-L" "/home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out" "-L" "/home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out" "-L" "/home/signum/apps/signum-miner/target/release/build/ring-49d50c14e47510a9/out" "-L" "/opt/rust-bin-1.53.0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-lshabal" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lshabal_sse2" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lshabal_avx" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lshabal_avx2" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lshabal_avx512f" "-Wl,--no-whole-archive" "/tmp/rustcosWSWl/libring-9c220b0bb7ba4d7a.rlib" "-Wl,--start-group" "-Wl,--end-group" "/opt/rust-bin-1.53.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-c4d9a5b072ee3191.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
  = note: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out/libshabal_avx.a(shabal_avx.o):(.bss.global_128+0x0): multiple definition of `global_128'; /home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out/libshabal_sse2.a(shabal_sse2.o):(.bss.global_128+0x0): first defined here
          /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out/libshabal_avx.a(shabal_avx.o):(.bss.global_128_fast+0x0): multiple definition of `global_128_fast'; /home/signum/apps/signum-miner/target/release/build/signum-miner-948b50df75bd5d8f/out/libshabal_sse2.a(shabal_sse2.o):(.bss.global_128_fast+0x0): first defined here
jjos2372 commented 3 years ago

It works here with rustc 1.52.1.

ghost commented 3 years ago

The fix is simple: just add the static keyword.

See also the "Default to -fno-common" section in https://gcc.gnu.org/gcc-10/porting_to.html

jjos2372 commented 3 years ago

The fix is simple: just add the static keyword.

See also the "Default to -fno-common" section in https://gcc.gnu.org/gcc-10/porting_to.html

Great, please send a Pull Request if you can.

ghost commented 3 years ago

Great, please send a Pull Request if you can.

I can, but I would like to know how is signum-network/signum-miner related to PoC-Consortium/scavenger. All PoC-Consortium repositories are going to be archived, just like PoC-Consortium/burstcoin?

What is the rationale behind the following renaming/rebranding/forking chain:

Which organization is the primary one? https://github.com/signum-network or some other organization?

jjos2372 commented 3 years ago

Hello, we cannot say about other repositories, if they will be archived or not. They are controlled by different people. The ones we maintain are those under https://github.com/signum-network.

ghost commented 3 years ago

@jjos2372 Just a reminder that the following pull requests can easily be merged: