
Hey guys, this probably isn't the official GHC mailing list, but I've been trying to build and install a new GHC on an old RHEL5 system, as mentioned in my previous Cafe thread. I was able to make some good headway: I installed a ghc-6.8 binary, and then used that to build ghc-6.10 source, and then used that to build ghc-6.12 source. The idea is to keep going until I get to ghc-7.6. However, when I get to 7.0, my builds all eventually die with this error: quote: -------- /usr/bin/ld: rts/dist/build/RtsStartup.dyn_o: relocation R_X86_64_PC32 against `StgRun' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status -------- After this failed the first time, I tried adding -fPIC to SRC_HC_OPTS, GhcStage1HcOpts, and so forth in build.mk. But ultimately I get the same error. I tried skipping a version and building ghc-7.2 instead, but the same error pops up. -- frigidcode.com

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 30/04/13 03:05, Christopher Howard wrote:
Hey guys, this probably isn't the official GHC mailing list, but I've been trying to build and install a new GHC on an old RHEL5 system, as mentioned in my previous Cafe thread. I was able to make some good headway: I installed a ghc-6.8 binary, and then used that to build ghc-6.10 source, and then used that to build ghc-6.12 source. The idea is to keep going until I get to ghc-7.6.
However, when I get to 7.0, my builds all eventually die with this error:
quote: -------- /usr/bin/ld: rts/dist/build/RtsStartup.dyn_o: relocation R_X86_64_PC32 against `StgRun' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status --------
After this failed the first time, I tried adding -fPIC to SRC_HC_OPTS, GhcStage1HcOpts, and so forth in build.mk. But ultimately I get the same error.
I tried skipping a version and building ghc-7.2 instead, but the same error pops up.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
There's a separate mailing list for GHC that might prove a bit more useful for GHC problems: glassgow-haskell-users - -- Mateusz K. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAEBAgAGBQJRf7XoAAoJEM1mucMq2pqXqdAP/jjs0pSstTPa8EstKs1ZfmcN PcDCgL+QfIe5eSQv1JROyq/dN43Q9zd7fBiuSi0wMU0ROdFG1coyK0xhXHkvr1Lc 4hESy0IHlrCZGXEqMIPMjpB6MmOqS7fzLWxTOAV6u2BG0GomoeRp7qe9JpX5J4uQ M0RXzT1OXqAmAOWKVbUb2qJzUAkY3iC0uxvko4tLXPQiFgqoNde0yTRis0y2FXDR wDoFoZcTWic3SU4ZOmj4SuUAFjaMqKtLjtyFJ1kIAj3U9QhNkwu1v6vNBu+nNDRf aX6zArpDEOP8oMNcrjjsnfqIDeWmdL6cMU14+GdZDHcKeJR3gLc90g5dtzFIqGTH HlocoXnm3PwetCk7CYxP1e7brWyM0nAl17OSEf/Ze13czlr5NKfH/Hr1I4WenBMG SA/HDzP9Y/TS/crJSF8b9MMU8juOUqFtADCglJVFEK8Jawsizsgh/ZW9ljwT+r7d gIhKdQW8SeMrBKPvB60LS2zyDf0naE99lehBoc/sk9CkT8JI3tW4oD42t2wW/XjE f8X5JBWSitxcDnL9aWTIcftF7MXSRP2hbs7WRL+D4fwr4VRAvRJBVg9ljcXxL5p9 /8lX4s8gXked+vfoHr21DzMVI3iSjjKN5bUC+2ePmhIfMGb39HoWwUed7/KkOD6O hvamdJEtWiUMdNXSuTL1 =H2In -----END PGP SIGNATURE-----

Hello,
please see this thread which I think is about the same issue you are
seeing: http://www.haskell.org/pipermail/haskell-cafe/2012-June/102023.html
In short, this is apparently caused by broken GCC. The solution is to
use build.mk with disable optimizations or download from
http://justhub.org/download which packages GHC for RHEL/CentOS/...
GhcLibWays = v
SRC_HC_OPTS = -H64m -O0 -fasm # -O -H64m
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O0 -fasm # -O2 -fasm
GhcLibHcOpts = -O -fasm # -O2 -XGenerics
GhcHcOpts = -Rghc-timing
# GhcLibWays += p
# GhcLibWays += dyn
NoFibWays =
STRIP_CMD = :
Also cc-ing Chris Dornan of justhub.org.
Best regards,
Krzysztof Skrzętnicki
On Tue, Apr 30, 2013 at 4:05 AM, Christopher Howard
Hey guys, this probably isn't the official GHC mailing list, but I've been trying to build and install a new GHC on an old RHEL5 system, as mentioned in my previous Cafe thread. I was able to make some good headway: I installed a ghc-6.8 binary, and then used that to build ghc-6.10 source, and then used that to build ghc-6.12 source. The idea is to keep going until I get to ghc-7.6.
However, when I get to 7.0, my builds all eventually die with this error:
quote: -------- /usr/bin/ld: rts/dist/build/RtsStartup.dyn_o: relocation R_X86_64_PC32 against `StgRun' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status --------
After this failed the first time, I tried adding -fPIC to SRC_HC_OPTS, GhcStage1HcOpts, and so forth in build.mk. But ultimately I get the same error.
I tried skipping a version and building ghc-7.2 instead, but the same error pops up.
-- frigidcode.com
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Christopher Howard
-
Krzysztof Skrzętnicki
-
Mateusz Kowalczyk