Wrong ar during cross-compilation
It appears that during cross-compilation, while building stage 1 ghc, the build system uses ar for target architecture instead of ar for build/host architecture.
It will cause linking errors on systems where ar for target architecture is incompatible with ar for build/host architecture (sample output attached below).
(...)
"rm" -f libraries/Cabal/Cabal/dist-boot/build/libHSCabal-1.22.3.0-3tdTeip89ooLNDDdwdA54s.a.contents
"rm" -f libraries/bin-package-db/dist-boot/build/libHSbin-package-db-0.0.0.0-Gk3F1vzzO3g80wuNGtok3x.a libraries/bin-package-db/dist-boot/build/libHSbin-package-db-0.0.0.0-Gk3F1vzzO3g80wuNGtok3x.a.contents
echo libraries/bin-package-db/dist-boot/build/GHC/PackageDb.o >> libraries/bin-package-db/dist-boot/build/libHSbin-package-db-0.0.0.0-Gk3F1vzzO3g80wuNGtok3x.a.contents
"/Users/jakub/src/haskell/PNaCl/gsoc/wrappers/i686-unknown-nacl-ar" q libraries/bin-package-db/dist-boot/build/libHSbin-package-db-0.0.0.0-Gk3F1vzzO3g80wuNGtok3x.a @libraries/bin-package-db/dist-boot/build/libHSbin-package-db-0.0.0.0-Gk3F1vzzO3g80wuNGtok3x.a.contents
/Users/jakub/src/nacl_sdk/pepper_canary/toolchain/mac_x86_newlib/bin/i686-nacl-ar: creating libraries/bin-package-db/dist-boot/build/libHSbin-package-db-0.0.0.0-Gk3F1vzzO3g80wuNGtok3x.a
"rm" -f libraries/bin-package-db/dist-boot/build/libHSbin-package-db-0.0.0.0-Gk3F1vzzO3g80wuNGtok3x.a.contents
(...)
ld: archive has no table of contents file '/Users/jakub/src/haskell/PNaCl/ghc-pnacl/libraries/terminfo/dist-boot/build/libHSterminfo-0.4.0.1-7qZwBlx3clR8sTBilJl253.a' for architecture x86_64
Trac metadata
Trac field | Value |
---|---|
Version | 7.11 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Build System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown/Multiple |
Architecture |