Skip to content

Guix: Cross compile for linux fails unless -fPIC is passed to cxxflags #166

@vertiond

Description

@vertiond

Cross compiling for x86_64-linux-gnu using contrib/guix-build.sh fails unless -fPIC is passed to cxxflags.

  CXXLD    vertcoin-cli
  CXXLD    vertcoin-tx
  CXXLD    vertcoin-wallet
  CXX      qt/vertcoin_qt-main.o
  CXX      qt/libbitcoinqt_a-bantablemodel.o
  CXX      qt/libbitcoinqt_a-bitcoin.o
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-Sponge.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-blake.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-groestl.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-keccak.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-bmw.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:9739: vertcoin-tx] Error 1
make[2]: *** Waiting for unfinished jobs....
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-Sponge.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-blake.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-groestl.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-keccak.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: crypto/libbitcoin_crypto_base.a(libbitcoin_crypto_base_a-bmw.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
x86_64-linux-gnu-ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:9743: vertcoin-wallet] Error 1
make[2]: Leaving directory '/vertcoin/distsrc-x86_64-linux-gnu/src'
make[1]: *** [Makefile:19948: all-recursive] Error 1
make[1]: Leaving directory '/vertcoin/distsrc-x86_64-linux-gnu/src'
make: *** [Makefile:803: all-recursive] Error 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions