Bug 21375 – phobos: Error: cannot directly load global variable constants with PIC or PIE code

Status
NEW
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2020-11-10T16:54:06Z
Last change time
2024-12-01T16:37:50Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Iain Buclaw
Depends on
21374
Moved to GitHub: phobos#10444 →

Comments

Comment #0 by ibuclaw — 2020-11-10T16:54:06Z
This happens when building phobos with DFLAGS="-fPIE". Compiling with `-fPIC` works just fine (possibly because of issue 9378). std/internal/digest/sha_SSSE3.d-mixin-739(739): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-739(740): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-747(777): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-749(779): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-751(781): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-753(783): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-755(774): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-758(776): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-760(778): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-762(780): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-764(782): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-766(784): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-769(790): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-771(792): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-773(794): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-775(796): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-777(798): Error: cannot directly load global variable constants with PIC or PIE code std/internal/digest/sha_SSSE3.d-mixin-780(792): Error: cannot directly load global variable constants with PIC or PIE code std/internal/math/biguintx86.d-mixin-793(822): Error: cannot directly load global variable storagenopMulAdd with PIC or PIE code std/internal/math/biguintcore.d(130): Error: template instance std.internal.math.biguintx86.multibyteMulAdd!'-' error instantiating
Comment #1 by ibuclaw — 2020-11-10T17:00:50Z
Adding relevant version(D_PIC) conditions, and dmd ICEs as per what was reported in issue 21374.
Comment #2 by robert.schadek — 2024-12-01T16:37:50Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10444 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB