Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 640902 - =net-misc/bfgminer-5.4.2 - ld: x86_64/libx8664.a(sha256_xmm_amd64.o): relocation R_X86_64_32 against undefined symbol `sha256_consts_m128i' can not be used when making a shared object; recompile with -fPIC
Summary: =net-misc/bfgminer-5.4.2 - ld: x86_64/libx8664.a(sha256_xmm_amd64.o): relocat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-13 09:48 UTC by Milos Ivanovic
Modified: 2018-01-04 18:58 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,27.81 KB, text/plain)
2017-12-13 09:48 UTC, Milos Ivanovic
Details
emerge --info (emerge.info,5.65 KB, text/plain)
2018-01-04 18:57 UTC, FR
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Ivanovic 2017-12-13 09:48:32 UTC
Created attachment 509778 [details]
build.log

Hi team,

I'm getting the following errors trying to compile bfgminer:

[...snip...]
x86_64-pc-linux-gnu-gcc -DHAS_YASM -march=native -O2 -pipe  -Wl,-O1 -Wl,--as-needed -o bfgminer-rpc api-example.o
x86_64-pc-linux-gnu-gcc -DHAS_YASM -march=native -O2 -pipe -pthread   -Wl,-O1 -Wl,--as-needed -o bfgminer bfgminer-miner.o bfgminer-deviceapi.o bfgminer-util.o bfgminer-sha2.o bfgminer-api.o bfgminer-version.o bfgminer-logging.o       malgo/bfgminer-sha256d.o bfgminer-sha256_generic.o bfgminer-sha256_via.o bfgminer-sha256_cryptopp.o bfgminer-sha256_sse2_amd64.o bfgminer-sha256_sse4_amd64.o bfgminer-sha256_altivec_4way.o  bfgminer-driver-cpu.o                                                 lib/libgnu.a ccan.bfg/libccan.a -lbase58 -lblkmaker-0.1 -lblkmaker_jansson-0.1  -lcurl -ljansson  -lpthread -L/usr/lib64 -lncursesw -lm      x86_64/libx8664.a
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: x86_64/libx8664.a(sha256_xmm_amd64.o): relocation R_X86_64_32 against undefined symbol `sha256_consts_m128i' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: x86_64/libx8664.a(sha256_sse4_amd64.o): relocation R_X86_64_32 against undefined symbol `g_4sha256_k' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
[...snip...]

The full build log is attached.
Comment 1 Milos Ivanovic 2017-12-13 10:07:26 UTC
Workaround:

1. echo 'net-misc/bfgminer nopie' >> /etc/portage/package.env
2. mkdir /etc/portage/env
3. echo 'CFLAGS="${CFLAGS} -no-pie"' > /etc/portage/env/nopie
4. emerge bfgminger
Comment 2 Anthony Basile gentoo-dev 2017-12-17 04:03:59 UTC
you should be all set
Comment 3 FR 2018-01-04 18:57:08 UTC
Created attachment 513376 [details]
emerge --info
Comment 4 FR 2018-01-04 18:58:16 UTC
error still there with USE flag "sha256d" !