struggling to get master to build

Ben Gamari ben at smart-cactus.org
Fri Feb 18 17:29:41 UTC 2022


Norman Ramsey <nr at cs.tufts.edu> writes:

> I recently pulled to bring my local copy of GHC HEAD up to
> 67dd5724297094af93be1887ef000845722c6f2b.  But I cannot seem
> to get it to build.
>
> I'm following these steps:
>
>   git pull --ff-only --prune --recurse-submodules --force
>
>   rm -r _build
>
>   ./boot
>
>   ./configure
>
>   ./hadrian build -j
>
> The build is failing with this error message:
>
>   Warning: -rtsopts and -with-rtsopts have no effect with -shared.
>       Call hs_init_ghc() from your main() function to set these options.
>   ld.lld: error: can't create dynamic relocation R_X86_64_64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>   >>> defined in _build/stage1/rts/build/S/adjustor/NativeAmd64Asm.thr_dyn_o
>   >>> referenced by _build/stage1/rts/build/S/adjustor/NativeAmd64Asm.thr_dyn_o:(.text+0x50)
>   collect2: error: ld returned 1 exit status
>   `cc' failed in phase `Linker'. (Exit code: 1)
>   Command failed
>   Build failed.
>
> The offending command is very long indeed; it is appended to this message.
>
It looks like this may be fall-out from !7511, presumably because lld
apparently disallows text relocations by default. This is presumably
Linux; which distribution are you using?

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20220218/47b32b72/attachment.sig>


More information about the ghc-devs mailing list