Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 758914 - app-emulation/wine-vanilla-5.0*: direct GOT relocation R_386_GOT 32 against `strlen@@GLIBC_2.0' without base register can not be used when making a shared object
Summary: app-emulation/wine-vanilla-5.0*: direct GOT relocation R_386_GOT 32 against `...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-07 15:59 UTC by Luke-Jr
Modified: 2022-05-24 01:06 UTC (History)
2 users (show)

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


Attachments
build log (build.log,374.54 KB, text/plain)
2020-12-07 15:59 UTC, Luke-Jr
Details
emerge --info (emerge--info,24.02 KB, text/plain)
2020-12-10 14:49 UTC, Luke-Jr
Details
build log w/o custom-cflags (build.log,244.88 KB, text/plain)
2020-12-10 14:49 UTC, Luke-Jr
Details
7.0 build log (build.log.zst,93.73 KB, application/zstd)
2022-04-27 23:03 UTC, Luke-Jr
Details
emerge --info (emerge--info,23.87 KB, text/plain)
2022-04-27 23:04 UTC, Luke-Jr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2020-12-07 15:59:05 UTC
Created attachment 677155 [details]
build log

x86_64-pc-linux-gnu-gcc -m32 -c -o mkstemps.o /var/tmp/portage/app-emulation/wine-vanilla-5.0.2/work/wine-5.0.2/libs/port/mkstemps.c \
  -I. -I/var/tmp/portage/app-emulation/wine-vanilla-5.0.2/work/wine-5.0.2/libs/port -I../../include \
  -I/var/tmp/portage/app-emulation/wine-vanilla-5.0.2/work/wine-5.0.2/include -D__WINESRC__ \
  -D_REENTRANT -fno-PIC -Wall -pipe -fno-tree-loop-distribute-patterns -fcf-protection=none \
  -fno-stack-protector -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body \
  -Wignored-qualifiers -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits \
  -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op \
  -fno-omit-frame-pointer -march=x86-64  -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=haswell  -O2  -fno-reorder-blocks  -pipe  -ggdb3   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
...
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../libs/port/libwine_port.a(mkstemps.o): warning: relocation in read-only section `.text'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../libs/port/libwine_port.a(mkstemps.o): direct GOT relocation R_386_GOT32 against `strlen@@GLIBC_2.0' without base register can not be used when making a shared object
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:222: winegcc] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/wine-vanilla-5.0.2/work/wine-5.0.2-abi_x86_32.x86/tools/winegcc'

This is a regression: 4.0.3 builds fine.
Comment 1 Chiitoo gentoo-dev 2020-12-09 11:55:34 UTC
Can't reproduce so far.

Could you include your 'emerge --info'?

Also, I see 'custom-cflags'.  Does this happen with that flag disabled as well?

Thanks!
Comment 2 Luke-Jr 2020-12-10 14:49:36 UTC
Created attachment 677575 [details]
emerge --info
Comment 3 Luke-Jr 2020-12-10 14:49:58 UTC
Created attachment 677578 [details]
build log w/o custom-cflags
Comment 4 Luke-Jr 2020-12-10 14:52:10 UTC
USE=-custom-cflags had the same problem (see attached build log)

It seems WINE is intentionally turning off PIC for 32-bit builds, and the x86_64 linker is enforcing it being required despite -m32. (IIRC, x86_32 doesn't require PIC for shared libs, while x86_64 does)

FWIW I have binutils 2.34-r2 at the moment
Comment 5 Nick Sarnie gentoo-dev 2021-08-05 14:53:07 UTC
Is this still reproducible with in-tree versions?
Comment 6 Luke-Jr 2021-09-07 02:47:34 UTC
Hitting this with app-emulation/wine-vanilla-6.0.1 on amd64
Comment 7 Luke-Jr 2021-12-11 17:03:18 UTC
Still an issue with 6.0.2.

Also noted that all working versions have been pruned from the tree...
Comment 8 Chiitoo gentoo-dev 2021-12-12 15:00:35 UTC
I just tried building 6.0.2 mirroring your CFLAGS and USE-flags mostly as much as I can, but still could not hit the error...

If I find the time and energy for it at some point, I'll try building a test install using the hardened profile and further align with your set-up.

Could you upload a new 'emerge --info' and build log even if they seem identical to the year-old ones.

Thanks!
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-08 03:34:35 UTC
This binutils change might be related: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=30a954525f4e53a9cd50a1a8a6f201c7cf6595c7.
Comment 10 Luke-Jr 2022-04-27 23:03:19 UTC
Created attachment 775080 [details]
7.0 build log

build log from 7.0 (still affected)
Comment 11 Luke-Jr 2022-04-27 23:04:02 UTC
Created attachment 775083 [details]
emerge --info

Updated emerge --info
Comment 12 Nick Sarnie gentoo-dev 2022-05-23 22:29:35 UTC
Can you repro with in-tree versions of wine or binutils?
Comment 13 Luke-Jr 2022-05-23 23:55:35 UTC
(In reply to Nick Sarnie from comment #12)
> Can you repro with in-tree versions of wine or binutils?

This has only ever been with in-tree versions...
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-23 23:56:56 UTC
(In reply to Luke-Jr from comment #13)
> (In reply to Nick Sarnie from comment #12)
> > Can you repro with in-tree versions of wine or binutils?
> 
> This has only ever been with in-tree versions...

That doesn't make much sense given you originally posted this in December 2020. Nick is asking if you can reproduce still this with the latest versions in tree, or at least things still in tree. i.e. Is it still relevant?
Comment 15 Luke-Jr 2022-05-24 01:04:12 UTC
(In reply to Sam James from comment #14)
> (In reply to Luke-Jr from comment #13)
> > (In reply to Nick Sarnie from comment #12)
> > > Can you repro with in-tree versions of wine or binutils?
> > 
> > This has only ever been with in-tree versions...
> 
> That doesn't make much sense given you originally posted this in December
> 2020. Nick is asking if you can reproduce still this with the latest
> versions in tree, or at least things still in tree. i.e. Is it still
> relevant?

Already confirmed it is still relevant less than a month ago: https://bugs.gentoo.org/758914#c10

Nothing in the diff for -r2 indicates it's worth re-testing.
Comment 16 Nick Sarnie gentoo-dev 2022-05-24 01:06:08 UTC
Thanks, as the issue seems to be related to binutils and the linked upstream bug was fixed in the past few months, I thought maybe a recent gentoo version bump of binutils might have fixed it.