Reputation: 478
I want to compile ghc 7.10.3 on a SLES11 instance since the downloaded binary doesn't work. Now I am getting link errors in the end:
/home/oswald/build/ghc-7.10.3/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.4.0.0-8TmvWUcS1U1IKHT0levwg3-ghc7.10.3.so: undefined reference to `__sync_val_compare_and_swap_2'
/home/oswald/build/ghc-7.10.3/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.4.0.0-8TmvWUcS1U1IKHT0levwg3-ghc7.10.3.so: undefined reference to `__sync_fetch_and_nand_2'
with a lot lines more. These seem to be GCC primitives. The installed gcc version on this machine is 4.3.4, which has primitives, but I did not find the _2 and _1 endings in the documentation (it uses variable arguments list as I understand it).
Any idea on how to solve this?
Upvotes: 1
Views: 64
Reputation: 478
Ok, so I did install a newer gcc (4.9.3) locally and then the compilation of ghc was successful.
Upvotes: 1