GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:47:09Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/7987GHC Build Error2019-07-07T18:47:09ZsingpolymaGHC Build ErrorTrying to build HEAD as a native compiler (not cross-compiler). Build options:
BuildFlavour = quick
stage=1
INTEGER_LIBRARY = integer-simple
Stage1Only = YES
DYNAMIC_BY_DEFAULT = NO
I'm trying to get an integer-simple based build going...Trying to build HEAD as a native compiler (not cross-compiler). Build options:
BuildFlavour = quick
stage=1
INTEGER_LIBRARY = integer-simple
Stage1Only = YES
DYNAMIC_BY_DEFAULT = NO
I'm trying to get an integer-simple based build going so that I can test a bug I'm having with that. I'm on Ubuntu 12.10 32bit
```
"inplace/bin/ghc-cabal" check libraries/haskell2010
"inplace/bin/ghc-cabal" configure libraries/haskell2010 dist-install "" --with-ghc="/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-stage1" --with-ghc-pkg="/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-pkg" --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --enable-shared --with-hscolour="/usr/bin/HsColour" --configure-option=CFLAGS=" -U__i686 -fno-stack-protector " --configure-option=LDFLAGS=" -Wl,--hash-size=31 -Wl,--reduce-memory-overheads " --configure-option=CPPFLAGS=" " --with-gcc="/usr/bin/gcc" --with-ld="/usr/bin/ld" --configure-option=--with-cc="/usr/bin/gcc" --with-ar="/usr/bin/ar" --with-ranlib="true" --with-alex="/usr/bin/alex" --with-happy="/usr/bin/happy"
Configuring haskell2010-1.1.1.0...
"/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-pkg" update --force libraries/haskell2010/dist-install/inplace-pkg-config
Reading package info from "libraries/haskell2010/dist-install/inplace-pkg-config" ... done.
haskell2010-1.1.1.0: Warning: haddock-interfaces: /home/singpolyma/src/ghc-linux-i486-integer-simple/libraries/haskell2010/dist-install/doc/html/haskell2010/haskell2010.haddock doesn't exist or isn't a file
haskell2010-1.1.1.0: cannot find any of ["Data/Array.hi","Data/Array.p_hi","Data/Array.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/Char.hi","Data/Char.p_hi","Data/Char.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/Complex.hi","Data/Complex.p_hi","Data/Complex.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["System/IO.hi","System/IO.p_hi","System/IO.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["System/IO/Error.hi","System/IO/Error.p_hi","System/IO/Error.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/Ix.hi","Data/Ix.p_hi","Data/Ix.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/List.hi","Data/List.p_hi","Data/List.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/Maybe.hi","Data/Maybe.p_hi","Data/Maybe.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Control/Monad.hi","Control/Monad.p_hi","Control/Monad.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/Ratio.hi","Data/Ratio.p_hi","Data/Ratio.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["System/Environment.hi","System/Environment.p_hi","System/Environment.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["System/Exit.hi","System/Exit.p_hi","System/Exit.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Numeric.hi","Numeric.p_hi","Numeric.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Prelude.hi","Prelude.p_hi","Prelude.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/Int.hi","Data/Int.p_hi","Data/Int.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/Word.hi","Data/Word.p_hi","Data/Word.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Data/Bits.hi","Data/Bits.p_hi","Data/Bits.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign.hi","Foreign.p_hi","Foreign.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/Ptr.hi","Foreign/Ptr.p_hi","Foreign/Ptr.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/ForeignPtr.hi","Foreign/ForeignPtr.p_hi","Foreign/ForeignPtr.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/StablePtr.hi","Foreign/StablePtr.p_hi","Foreign/StablePtr.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/Storable.hi","Foreign/Storable.p_hi","Foreign/Storable.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/C.hi","Foreign/C.p_hi","Foreign/C.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/C/Error.hi","Foreign/C/Error.p_hi","Foreign/C/Error.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/C/String.hi","Foreign/C/String.p_hi","Foreign/C/String.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/C/Types.hi","Foreign/C/Types.p_hi","Foreign/C/Types.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/Marshal.hi","Foreign/Marshal.p_hi","Foreign/Marshal.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/Marshal/Alloc.hi","Foreign/Marshal/Alloc.p_hi","Foreign/Marshal/Alloc.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/Marshal/Array.hi","Foreign/Marshal/Array.p_hi","Foreign/Marshal/Array.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/Marshal/Error.hi","Foreign/Marshal/Error.p_hi","Foreign/Marshal/Error.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["Foreign/Marshal/Utils.hi","Foreign/Marshal/Utils.p_hi","Foreign/Marshal/Utils.dyn_hi"] (ignoring)
haskell2010-1.1.1.0: cannot find any of ["libHShaskell2010-1.1.1.0.a","libHShaskell2010-1.1.1.0.p_a","libHShaskell2010-1.1.1.0-ghc7.7.20130615.so","libHShaskell2010-1.1.1.0-ghc7.7.20130615.dylib","HShaskell2010-1.1.1.0-ghc7.7.20130615.dll"] on library path (ignoring)
"inplace/bin/ghc-cabal" check utils/hsc2hs
"inplace/bin/ghc-cabal" configure utils/hsc2hs dist-install "" --with-ghc="/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-stage1" --with-ghc-pkg="/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-pkg" --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --with-hscolour="/usr/bin/HsColour" --configure-option=CFLAGS=" -U__i686 -fno-stack-protector " --configure-option=LDFLAGS=" -Wl,--hash-size=31 -Wl,--reduce-memory-overheads " --configure-option=CPPFLAGS=" " --with-gcc="/usr/bin/gcc" --with-ld="/usr/bin/ld" --configure-option=--with-cc="/usr/bin/gcc" --with-ar="/usr/bin/ar" --with-ranlib="true" --with-alex="/usr/bin/alex" --with-happy="/usr/bin/happy"
Configuring hsc2hs-0.67...
"inplace/bin/ghc-cabal" check utils/ghctags
A 'license-file' is not specified.
"inplace/bin/ghc-cabal" configure utils/ghctags dist-install "" --with-ghc="/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-stage1" --with-ghc-pkg="/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-pkg" --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --with-hscolour="/usr/bin/HsColour" --configure-option=CFLAGS=" -U__i686 -fno-stack-protector " --configure-option=LDFLAGS=" -Wl,--hash-size=31 -Wl,--reduce-memory-overheads " --configure-option=CPPFLAGS=" " --with-gcc="/usr/bin/gcc" --with-ld="/usr/bin/ld" --configure-option=--with-cc="/usr/bin/gcc" --with-ar="/usr/bin/ar" --with-ranlib="true" --with-alex="/usr/bin/alex" --with-happy="/usr/bin/happy"
Configuring ghctags-0.1...
ghc-cabal: At least the following dependencies are missing:
ghc -any
make[1]: *** [utils/ghctags/dist-install/package-data.mk] Error 1
make: *** [all] Error 2
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC Build Error","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Trying to build HEAD as a native compiler (not cross-compiler). Build options:\r\n\r\nBuildFlavour = quick\r\nstage=1\r\nINTEGER_LIBRARY = integer-simple\r\nStage1Only = YES\r\nDYNAMIC_BY_DEFAULT = NO\r\n\r\nI'm trying to get an integer-simple based build going so that I can test a bug I'm having with that. I'm on Ubuntu 12.10 32bit\r\n\r\n{{{\r\n\"inplace/bin/ghc-cabal\" check libraries/haskell2010\r\n\"inplace/bin/ghc-cabal\" configure libraries/haskell2010 dist-install \"\" --with-ghc=\"/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-stage1\" --with-ghc-pkg=\"/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-pkg\" --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --enable-shared --with-hscolour=\"/usr/bin/HsColour\" --configure-option=CFLAGS=\" -U__i686 -fno-stack-protector \" --configure-option=LDFLAGS=\" -Wl,--hash-size=31 -Wl,--reduce-memory-overheads \" --configure-option=CPPFLAGS=\" \" --with-gcc=\"/usr/bin/gcc\" --with-ld=\"/usr/bin/ld\" --configure-option=--with-cc=\"/usr/bin/gcc\" --with-ar=\"/usr/bin/ar\" --with-ranlib=\"true\" --with-alex=\"/usr/bin/alex\" --with-happy=\"/usr/bin/happy\"\r\nConfiguring haskell2010-1.1.1.0...\r\n\"/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-pkg\" update --force libraries/haskell2010/dist-install/inplace-pkg-config\r\nReading package info from \"libraries/haskell2010/dist-install/inplace-pkg-config\" ... done.\r\nhaskell2010-1.1.1.0: Warning: haddock-interfaces: /home/singpolyma/src/ghc-linux-i486-integer-simple/libraries/haskell2010/dist-install/doc/html/haskell2010/haskell2010.haddock doesn't exist or isn't a file\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Array.hi\",\"Data/Array.p_hi\",\"Data/Array.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Char.hi\",\"Data/Char.p_hi\",\"Data/Char.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Complex.hi\",\"Data/Complex.p_hi\",\"Data/Complex.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"System/IO.hi\",\"System/IO.p_hi\",\"System/IO.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"System/IO/Error.hi\",\"System/IO/Error.p_hi\",\"System/IO/Error.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Ix.hi\",\"Data/Ix.p_hi\",\"Data/Ix.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/List.hi\",\"Data/List.p_hi\",\"Data/List.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Maybe.hi\",\"Data/Maybe.p_hi\",\"Data/Maybe.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Control/Monad.hi\",\"Control/Monad.p_hi\",\"Control/Monad.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Ratio.hi\",\"Data/Ratio.p_hi\",\"Data/Ratio.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"System/Environment.hi\",\"System/Environment.p_hi\",\"System/Environment.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"System/Exit.hi\",\"System/Exit.p_hi\",\"System/Exit.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Numeric.hi\",\"Numeric.p_hi\",\"Numeric.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Prelude.hi\",\"Prelude.p_hi\",\"Prelude.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Int.hi\",\"Data/Int.p_hi\",\"Data/Int.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Word.hi\",\"Data/Word.p_hi\",\"Data/Word.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Data/Bits.hi\",\"Data/Bits.p_hi\",\"Data/Bits.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign.hi\",\"Foreign.p_hi\",\"Foreign.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/Ptr.hi\",\"Foreign/Ptr.p_hi\",\"Foreign/Ptr.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/ForeignPtr.hi\",\"Foreign/ForeignPtr.p_hi\",\"Foreign/ForeignPtr.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/StablePtr.hi\",\"Foreign/StablePtr.p_hi\",\"Foreign/StablePtr.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/Storable.hi\",\"Foreign/Storable.p_hi\",\"Foreign/Storable.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/C.hi\",\"Foreign/C.p_hi\",\"Foreign/C.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/C/Error.hi\",\"Foreign/C/Error.p_hi\",\"Foreign/C/Error.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/C/String.hi\",\"Foreign/C/String.p_hi\",\"Foreign/C/String.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/C/Types.hi\",\"Foreign/C/Types.p_hi\",\"Foreign/C/Types.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/Marshal.hi\",\"Foreign/Marshal.p_hi\",\"Foreign/Marshal.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/Marshal/Alloc.hi\",\"Foreign/Marshal/Alloc.p_hi\",\"Foreign/Marshal/Alloc.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/Marshal/Array.hi\",\"Foreign/Marshal/Array.p_hi\",\"Foreign/Marshal/Array.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/Marshal/Error.hi\",\"Foreign/Marshal/Error.p_hi\",\"Foreign/Marshal/Error.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"Foreign/Marshal/Utils.hi\",\"Foreign/Marshal/Utils.p_hi\",\"Foreign/Marshal/Utils.dyn_hi\"] (ignoring)\r\nhaskell2010-1.1.1.0: cannot find any of [\"libHShaskell2010-1.1.1.0.a\",\"libHShaskell2010-1.1.1.0.p_a\",\"libHShaskell2010-1.1.1.0-ghc7.7.20130615.so\",\"libHShaskell2010-1.1.1.0-ghc7.7.20130615.dylib\",\"HShaskell2010-1.1.1.0-ghc7.7.20130615.dll\"] on library path (ignoring)\r\n\"inplace/bin/ghc-cabal\" check utils/hsc2hs\r\n\"inplace/bin/ghc-cabal\" configure utils/hsc2hs dist-install \"\" --with-ghc=\"/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-stage1\" --with-ghc-pkg=\"/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-pkg\" --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --with-hscolour=\"/usr/bin/HsColour\" --configure-option=CFLAGS=\" -U__i686 -fno-stack-protector \" --configure-option=LDFLAGS=\" -Wl,--hash-size=31 -Wl,--reduce-memory-overheads \" --configure-option=CPPFLAGS=\" \" --with-gcc=\"/usr/bin/gcc\" --with-ld=\"/usr/bin/ld\" --configure-option=--with-cc=\"/usr/bin/gcc\" --with-ar=\"/usr/bin/ar\" --with-ranlib=\"true\" --with-alex=\"/usr/bin/alex\" --with-happy=\"/usr/bin/happy\"\r\nConfiguring hsc2hs-0.67...\r\n\"inplace/bin/ghc-cabal\" check utils/ghctags\r\nA 'license-file' is not specified.\r\n\"inplace/bin/ghc-cabal\" configure utils/ghctags dist-install \"\" --with-ghc=\"/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-stage1\" --with-ghc-pkg=\"/home/singpolyma/src/ghc-linux-i486-integer-simple/inplace/bin/ghc-pkg\" --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --with-hscolour=\"/usr/bin/HsColour\" --configure-option=CFLAGS=\" -U__i686 -fno-stack-protector \" --configure-option=LDFLAGS=\" -Wl,--hash-size=31 -Wl,--reduce-memory-overheads \" --configure-option=CPPFLAGS=\" \" --with-gcc=\"/usr/bin/gcc\" --with-ld=\"/usr/bin/ld\" --configure-option=--with-cc=\"/usr/bin/gcc\" --with-ar=\"/usr/bin/ar\" --with-ranlib=\"true\" --with-alex=\"/usr/bin/alex\" --with-happy=\"/usr/bin/happy\"\r\nConfiguring ghctags-0.1...\r\nghc-cabal: At least the following dependencies are missing:\r\nghc -any\r\nmake[1]: *** [utils/ghctags/dist-install/package-data.mk] Error 1\r\nmake: *** [all] Error 2\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/7490ghc-stage1 panic when building a cross-compiler or cross-building a compiler2019-07-07T18:49:31Zsingpolymaghc-stage1 panic when building a cross-compiler or cross-building a compiler```
"inplace/bin/ghc-stage1" -static -H64m -O0 -fasm -package-name integer-simple-0.1.1.0 -hide-all-packages -i -ilibraries/integer-simple/. -ilibraries/integer-simple/dist-install/build -ilibraries/integer-simple/dist-install/build/...```
"inplace/bin/ghc-stage1" -static -H64m -O0 -fasm -package-name integer-simple-0.1.1.0 -hide-all-packages -i -ilibraries/integer-simple/. -ilibraries/integer-simple/dist-install/build -ilibraries/integer-simple/dist-install/build/autogen -Ilibraries/integer-simple/dist-install/build -Ilibraries/integer-simple/dist-install/build/autogen -Ilibraries/integer-simple/. -optP-include -optPlibraries/integer-simple/dist-install/build/autogen/cabal_macros.h -package ghc-prim-0.3.1.0 -package-name integer-simple -Wall -XHaskell98 -XCPP -XMagicHash -XBangPatterns -XUnboxedTuples -XForeignFunctionInterface -XUnliftedFFITypes -XNoImplicitPrelude -O -fasm -no-user-package-db -rtsopts -odir libraries/integer-simple/dist-install/build -hidir libraries/integer-simple/dist-install/build -stubdir libraries/integer-simple/dist-install/build -hisuf hi -osuf o -hcsuf hc -c libraries/integer-simple/./GHC/Integer/Type.hs -o libraries/integer-simple/dist-install/build/GHC/Integer/Type.o
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 7.7.20121205 for i386-unknown-nto-qnx):
expectJust initTcInteractive
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
make[1]: *** [libraries/integer-simple/dist-install/build/GHC/Integer/Type.o] Error 1
make: *** [all] Error 2
```7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/7452[GNU gold] ld: error: cannot find [...]/Types__1.o2019-07-07T18:49:40Zmrothe[GNU gold] ld: error: cannot find [...]/Types__1.o`/usr/bin/ld` is gold linker and I am trying to compile GHC 7.6.1 using it. I grabbed GHC 7.6.1 from haskell.org/ghc and edited `settings`; i.e. removing `--hash-size=31` and `--reduce-memory-overheads`.
While running `make` the linker ...`/usr/bin/ld` is gold linker and I am trying to compile GHC 7.6.1 using it. I grabbed GHC 7.6.1 from haskell.org/ghc and edited `settings`; i.e. removing `--hash-size=31` and `--reduce-memory-overheads`.
While running `make` the linker cannot find some object files:
```
$ make
===--- building phase 0
make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for `phase_0_builds'.
===--- building phase 1
make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for `phase_1_builds'.
===--- building final phase
make -r --no-print-directory -f ghc.mk phase=final all
/usr/bin/xsltproc docs/man/flags.xsl docs/man/flags.xml > docs/man/ghc.1
HC [stage 0] utils/hp2ps/dist/build/tmp/hp2ps
Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.
Call hs_init_ghc() from your main() function to set these options.
"cp" -p utils/hp2ps/dist/build/tmp/hp2ps inplace/bin/hp2ps
HC [stage 0] utils/genapply/dist/build/tmp/genapply
"cp" -p utils/genapply/dist/build/tmp/genapply inplace/bin/genapply
HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Types.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__1.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__2.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__3.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__4.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__5.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__6.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__7.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__8.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__9.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__10.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__11.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__12.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__13.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__14.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__15.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__16.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__17.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__18.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__19.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__20.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__21.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__22.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__23.o
collect2: error: ld returned 1 exit status
make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Types.o] Error 1
make: *** [all] Error 2
```
All object files that cannot be found are present and switching `/usr/bin/ld` to the bfd linker solves the problem.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"[GNU gold] ld: error: cannot find [...]/Types__1.o","status":"New","operating_system":"","component":"Build System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"`/usr/bin/ld` is gold linker and I am trying to compile GHC 7.6.1 using it. I grabbed GHC 7.6.1 from haskell.org/ghc and edited `settings`; i.e. removing `--hash-size=31` and `--reduce-memory-overheads`.\r\n\r\nWhile running `make` the linker cannot find some object files:\r\n\r\n{{{\r\n$ make\r\n===--- building phase 0\r\nmake -r --no-print-directory -f ghc.mk phase=0 phase_0_builds\r\nmake[1]: Nothing to be done for `phase_0_builds'.\r\n===--- building phase 1\r\nmake -r --no-print-directory -f ghc.mk phase=1 phase_1_builds\r\nmake[1]: Nothing to be done for `phase_1_builds'.\r\n===--- building final phase\r\nmake -r --no-print-directory -f ghc.mk phase=final all\r\n/usr/bin/xsltproc docs/man/flags.xsl docs/man/flags.xml > docs/man/ghc.1\r\n HC [stage 0] utils/hp2ps/dist/build/tmp/hp2ps\r\nWarning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.\r\n Call hs_init_ghc() from your main() function to set these options.\r\n\"cp\" -p utils/hp2ps/dist/build/tmp/hp2ps inplace/bin/hp2ps\r\n HC [stage 0] utils/genapply/dist/build/tmp/genapply\r\n\"cp\" -p utils/genapply/dist/build/tmp/genapply inplace/bin/genapply\r\n HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Types.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__1.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__2.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__3.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__4.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__5.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__6.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__7.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__8.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__9.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__10.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__11.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__12.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__13.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__14.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__15.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__16.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__17.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__18.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__19.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__20.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__21.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__22.o\r\n/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__23.o\r\ncollect2: error: ld returned 1 exit status\r\nmake[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Types.o] Error 1\r\nmake: *** [all] Error 2\r\n}}}\r\n\r\nAll object files that cannot be found are present and switching `/usr/bin/ld` to the bfd linker solves the problem.","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/701132bit GHC 7.4.2 cannot compile integer-gmp on OS X 10.82019-07-07T18:51:48ZManuel M T Chakravarty32bit GHC 7.4.2 cannot compile integer-gmp on OS X 10.8If I use the 32bit version of GHC 7.4.2 (OS X installer from the GHC downloads page) on OS X 10.8 DP4 with Xcode 4.5 DP, the compilation of package integer-gmp (from the Git repo) fails. Specifically, the GMP files seem to be compiled fo...If I use the 32bit version of GHC 7.4.2 (OS X installer from the GHC downloads page) on OS X 10.8 DP4 with Xcode 4.5 DP, the compilation of package integer-gmp (from the Git repo) fails. Specifically, the GMP files seem to be compiled for the wrong architecture and hence the linker complains — log file attached.
This problem may well also present on earlier version of OS X as well. (I haven't used the 32bit version for a while.)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 7.5 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries (other) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"32bit GHC 7.4.2 cannot compile integer-gmp on OS X 10.8","status":"New","operating_system":"","component":"libraries (other)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.5","keywords":["Lion","Mountain"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"If I use the 32bit version of GHC 7.4.2 (OS X installer from the GHC downloads page) on OS X 10.8 DP4 with Xcode 4.5 DP, the compilation of package integer-gmp (from the Git repo) fails. Specifically, the GMP files seem to be compiled for the wrong architecture and hence the linker complains — log file attached.\r\n\r\nThis problem may well also present on earlier version of OS X as well. (I haven't used the 32bit version for a while.)","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/5190TinyCoreLinux extension2019-07-07T18:56:29Zjosemaria.alkalaTinyCoreLinux extensionI am trying to create a GHC package for TinyCoreLinux http://www.tinycorelinux.com (this is a 10Mbytes linux distribution)
I have downloaded the general binary:
http://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2
Whe...I am trying to create a GHC package for TinyCoreLinux http://www.tinycorelinux.com (this is a 10Mbytes linux distribution)
I have downloaded the general binary:
http://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2
When I execute: ./configure, I get:
checking for path to top of build tree... ghc-pwd: mkTextEncoding: invalid argument (Invalid argument)
configure: error: cannot determine current directory
As a disclaimer, I am not a developer!
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 7.0.3 |
| Type | Bug |
| TypeOfFailure | BuildingGhcFailed |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"TinyCoreLinux extension","status":"New","operating_system":"","component":"Build System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.0.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I am trying to create a GHC package for TinyCoreLinux http://www.tinycorelinux.com (this is a 10Mbytes linux distribution)\r\n\r\nI have downloaded the general binary:\r\nhttp://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2\r\n\r\nWhen I execute: ./configure, I get:\r\nchecking for path to top of build tree... ghc-pwd: mkTextEncoding: invalid argument (Invalid argument)\r\nconfigure: error: cannot determine current directory\r\n\r\nAs a disclaimer, I am not a developer!","type_of_failure":"BuildingGhcFailed","blocking":[]} -->7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/4366in-tree GMP build problem with shared libraries2020-02-07T13:07:19ZSimon Marlowin-tree GMP build problem with shared librariesReported by Vivian McPhail \<haskell.vivian.mcphail\@gmail.com\> on glasgow-haskell-users:
```
Trying to build rc1 from source
linux x86_64
BuildFlavour = perf
It seems that the -fPIC flag is set, but an error still occurs (
/usr/bin/...Reported by Vivian McPhail \<haskell.vivian.mcphail\@gmail.com\> on glasgow-haskell-users:
```
Trying to build rc1 from source
linux x86_64
BuildFlavour = perf
It seems that the -fPIC flag is set, but an error still occurs (
/usr/bin/ld: libraries/integer-gmp/gmp/objs/abs.o: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
)
"inplace/bin/ghc-stage1" -fPIC -dynamic -O -H64m -package-name base-4.3.0.0 -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build -ilibraries/base/dist-install/build/autogen -Ilibraries/base/dist-install/build -Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include -optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package ghc-prim-0.2.0.0 -package integer-gmp-0.2.0.2 -package rts-1.0 -package-name base -XMagicHash -XExistentialQuantification -XRank2Types -XScopedTypeVariables -XUnboxedTuples -XForeignFunctionInterface -XUnliftedFFITypes -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -XFlexibleInstances -XStandaloneDeriving -XPatternGuards -XEmptyDataDecls -XNoImplicitPrelude -XCPP -no-user-package-conf -rtsopts -O2 -XGenerics -fno-warn-deprecated-flags -odir libraries/base/dist-install/build -hidir libraries/base/dist-install/build -stubdir libraries/base/dist-install/build -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -c libraries/base/./Data/Typeable.hs-boot -o libraries/base/dist-install/build/Data/Typeable.dyn_o-boot
/usr/bin/ld: libraries/integer-gmp/gmp/objs/abs.o: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
libraries/integer-gmp/gmp/objs/abs.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libraries/integer-gmp/dist-install/build/libHSinteger-gmp-0.2.0.2-ghc7.0.0.20100924.so] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.13 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"in-tree GMP build problem with shared libraries","status":"New","operating_system":"","component":"Build System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.13","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Reported by Vivian McPhail <haskell.vivian.mcphail@gmail.com> on glasgow-haskell-users:\r\n\r\n{{{\r\nTrying to build rc1 from source\r\n\r\nlinux x86_64\r\nBuildFlavour = perf\r\n\r\nIt seems that the -fPIC flag is set, but an error still occurs (\r\n/usr/bin/ld: libraries/integer-gmp/gmp/objs/abs.o: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC\r\n)\r\n\r\n\"inplace/bin/ghc-stage1\" -fPIC -dynamic -O -H64m -package-name base-4.3.0.0 -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build -ilibraries/base/dist-install/build/autogen -Ilibraries/base/dist-install/build -Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include -optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package ghc-prim-0.2.0.0 -package integer-gmp-0.2.0.2 -package rts-1.0 -package-name base -XMagicHash -XExistentialQuantification -XRank2Types -XScopedTypeVariables -XUnboxedTuples -XForeignFunctionInterface -XUnliftedFFITypes -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -XFlexibleInstances -XStandaloneDeriving -XPatternGuards -XEmptyDataDecls -XNoImplicitPrelude -XCPP -no-user-package-conf -rtsopts -O2 -XGenerics -fno-warn-deprecated-flags -odir libraries/base/dist-install/build -hidir libraries/base/dist-install/build -stubdir libraries/base/dist-install/build -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -c libraries/base/./Data/Typeable.hs-boot -o libraries/base/dist-install/build/Data/Typeable.dyn_o-boot\r\n/usr/bin/ld: libraries/integer-gmp/gmp/objs/abs.o: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC\r\nlibraries/integer-gmp/gmp/objs/abs.o: could not read symbols: Bad value\r\ncollect2: ld returned 1 exit status\r\nmake[1]: *** [libraries/integer-gmp/dist-install/build/libHSinteger-gmp-0.2.0.2-ghc7.0.0.20100924.so] Error 1\r\nmake[1]: *** Waiting for unfinished jobs....\r\nmake: *** [all] Error 2\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/3771haddock: internal error: evacuate: strange closure type 192692019-07-07T19:02:15Zdbuenohaddock: internal error: evacuate: strange closure type 19269Here are the last few lines of `make` output
```
"rm" -f libraries/unix/dist-install/build/libHSunix-2.4.0.0_p.a
(echo libraries/unix/dist-install/build/cbits/HsUnix.p_o libraries/unix/dist-install/build/cbits/execvpe.p_o libraries/un...Here are the last few lines of `make` output
```
"rm" -f libraries/unix/dist-install/build/libHSunix-2.4.0.0_p.a
(echo libraries/unix/dist-install/build/cbits/HsUnix.p_o libraries/unix/dist-install/build/cbits/execvpe.p_o libraries/unix/dist-install/build/cbits/dirUtils.p_o `/usr/bin/find libraries/unix/dist-install/build -name "*_stub.p_o" -print`; /usr/bin/find libraries/unix/dist-install/build/System/Posix_p_o_split libraries/unix/dist-install/build/System/Posix/DynamicLinker/Module_p_o_split libraries/unix/dist-install/build/System/Posix/DynamicLinker/Prim_p_o_split libraries/unix/dist-install/build/System/Posix/Directory_p_o_split libraries/unix/dist-install/build/System/Posix/DynamicLinker_p_o_split libraries/unix/dist-install/build/System/Posix/Env_p_o_split libraries/unix/dist-install/build/System/Posix/Error_p_o_split libraries/unix/dist-install/build/System/Posix/Files_p_o_split libraries/unix/dist-install/build/System/Posix/IO_p_o_split libraries/unix/dist-install/build/System/Posix/Process_p_o_split libraries/unix/dist-install/build/System/Posix/Process/Internals_p_o_split libraries/unix/dist-install/build/System/Posix/Resource_p_o_split libraries/unix/dist-install/build/System/Posix/Temp_p_o_split libraries/unix/dist-install/build/System/Posix/Terminal_p_o_split libraries/unix/dist-install/build/System/Posix/Time_p_o_split libraries/unix/dist-install/build/System/Posix/Unistd_p_o_split libraries/unix/dist-install/build/System/Posix/User_p_o_split libraries/unix/dist-install/build/System/Posix/Signals_p_o_split libraries/unix/dist-install/build/System/Posix/Signals/Exts_p_o_split libraries/unix/dist-install/build/System/Posix/Semaphore_p_o_split libraries/unix/dist-install/build/System/Posix/SharedMem_p_o_split -name '*.p_o' -print) | "xargs" "/usr/bin/ar" clqs libraries/unix/dist-install/build/libHSunix-2.4.0.0_p.a
"inplace/bin/mkdirhier" libraries/unix/dist-install/doc/html/unix/
"inplace/bin/ghc-cabal" haddock dist-install libraries/unix --with-haddock=/Users/dbueno/Downloads/ghc-6.12.1/inplace/bin/haddock --with-ghc=/Users/dbueno/Downloads/ghc-6.12.1/inplace/bin/ghc-stage2
Running Haddock for unix-2.4.0.0...
Preprocessing library unix-2.4.0.0...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: ffi-1.0, rts-1.0
haddock: internal error: evacuate: strange closure type 19269
(GHC version 6.12.1 for powerpc_apple_darwin)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
make[1]: *** [libraries/unix/dist-install/doc/html/unix/unix.haddock] Error 6
make: *** [all] Error 2
```
I did the following to build:
```
./configure --prefix=/usr/local/ghc-6.12.4
make
```
I'm on `Darwin power-mac-g5.local 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:54:29 PDT 2009; root:xnu-1228.12.14~1/RELEASE_PPC Power Macintosh`.
What other information do you need?
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.12.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | powerpc64 |
</details>
<!-- {"blocked_by":[],"summary":"haddock: internal error: evacuate: strange closure type 19269","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1","keywords":[],"differentials":[],"test_case":"","architecture":"powerpc64","cc":[""],"type":"Bug","description":"Here are the last few lines of `make` output\r\n{{{\r\n\"rm\" -f libraries/unix/dist-install/build/libHSunix-2.4.0.0_p.a\r\n(echo libraries/unix/dist-install/build/cbits/HsUnix.p_o libraries/unix/dist-install/build/cbits/execvpe.p_o libraries/unix/dist-install/build/cbits/dirUtils.p_o `/usr/bin/find libraries/unix/dist-install/build -name \"*_stub.p_o\" -print`; /usr/bin/find libraries/unix/dist-install/build/System/Posix_p_o_split libraries/unix/dist-install/build/System/Posix/DynamicLinker/Module_p_o_split libraries/unix/dist-install/build/System/Posix/DynamicLinker/Prim_p_o_split libraries/unix/dist-install/build/System/Posix/Directory_p_o_split libraries/unix/dist-install/build/System/Posix/DynamicLinker_p_o_split libraries/unix/dist-install/build/System/Posix/Env_p_o_split libraries/unix/dist-install/build/System/Posix/Error_p_o_split libraries/unix/dist-install/build/System/Posix/Files_p_o_split libraries/unix/dist-install/build/System/Posix/IO_p_o_split libraries/unix/dist-install/build/System/Posix/Process_p_o_split libraries/unix/dist-install/build/System/Posix/Process/Internals_p_o_split libraries/unix/dist-install/build/System/Posix/Resource_p_o_split libraries/unix/dist-install/build/System/Posix/Temp_p_o_split libraries/unix/dist-install/build/System/Posix/Terminal_p_o_split libraries/unix/dist-install/build/System/Posix/Time_p_o_split libraries/unix/dist-install/build/System/Posix/Unistd_p_o_split libraries/unix/dist-install/build/System/Posix/User_p_o_split libraries/unix/dist-install/build/System/Posix/Signals_p_o_split libraries/unix/dist-install/build/System/Posix/Signals/Exts_p_o_split libraries/unix/dist-install/build/System/Posix/Semaphore_p_o_split libraries/unix/dist-install/build/System/Posix/SharedMem_p_o_split -name '*.p_o' -print) | \"xargs\" \"/usr/bin/ar\" clqs libraries/unix/dist-install/build/libHSunix-2.4.0.0_p.a\r\n\"inplace/bin/mkdirhier\" libraries/unix/dist-install/doc/html/unix/\r\n\"inplace/bin/ghc-cabal\" haddock dist-install libraries/unix --with-haddock=/Users/dbueno/Downloads/ghc-6.12.1/inplace/bin/haddock --with-ghc=/Users/dbueno/Downloads/ghc-6.12.1/inplace/bin/ghc-stage2 \r\nRunning Haddock for unix-2.4.0.0...\r\nPreprocessing library unix-2.4.0.0...\r\nWarning: The documentation for the following packages are not installed. No\r\nlinks will be generated to these packages: ffi-1.0, rts-1.0\r\nhaddock: internal error: evacuate: strange closure type 19269\r\n (GHC version 6.12.1 for powerpc_apple_darwin)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\nmake[1]: *** [libraries/unix/dist-install/doc/html/unix/unix.haddock] Error 6\r\nmake: *** [all] Error 2\r\n}}}\r\nI did the following to build:\r\n{{{\r\n./configure --prefix=/usr/local/ghc-6.12.4\r\nmake\r\n}}}\r\n\r\nI'm on `Darwin power-mac-g5.local 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:54:29 PDT 2009; root:xnu-1228.12.14~1/RELEASE_PPC Power Macintosh`.\r\n\r\nWhat other information do you need?","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/3509libffi.so not found on Mac OS X (10.5.8)2019-07-07T19:03:34Zmwottonlibffi.so not found on Mac OS X (10.5.8)building with dynamic libraries on Mac OS X dies with an error about libffi.so
To reproduce:
```
add a build.mk with "GhcLibWays = v dyn"
sh boot && ./configure --enable-shared && make
```
If I copy one of the libffi\*dylib files tha...building with dynamic libraries on Mac OS X dies with an error about libffi.so
To reproduce:
```
add a build.mk with "GhcLibWays = v dyn"
sh boot && ./configure --enable-shared && make
```
If I copy one of the libffi\*dylib files that does appear to have been built correctly to libffi.so, the build proceeds but then loops in the build process.
partial trace:
```
(cd .libs && rm -f libffi.5.dylib && cp -p libffi.5.0.9.dylib libffi.5.dylib)
(cd .libs && rm -f libffi.dylib && cp -p libffi.5.0.9.dylib libffi.dylib)
ar cru .libs/libffi.a src/debug.o src/prep_cif.o src/types.o src/raw_api.o src/java_raw_api.o src/closures.o src/x86/ffi.o src/x86/darwin.o src/x86/ffi64.o src/x86/darwin64.o
"inplace/bin/mkdirhier" inplace/lib/
"cp" -p utils/hsc2hs/dist/build/tmp/hsc2hs inplace/lib/hsc2hs
ranlib: file: .libs/libffi.a(ffi64.o) has no symbols
ranlib: file: .libs/libffi.a(darwin64.o) has no symbolstouch inplace/lib/hsc2hs
ranlib .libs/libffi.a
ranlib: file: .libs/libffi.a(ffi64.o) has no symbols
ranlib: file: .libs/libffi.a(darwin64.o) has no symbols
creating libffi.la
(cd .libs && rm -f libffi.la && cp -p ../libffi.la libffi.la)
/bin/sh ./libtool --tag=CC --mode=link gcc -Wall -g -fexceptions -w -w -o libffi_convenience.la src/debug.lo src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo src/x86/ffi.lo src/x86/darwin.lo src/x86/ffi64.lo src/x86/darwin64.lo
ar cru .libs/libffi_convenience.a src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/darwin.o src/x86/.libs/ffi64.o src/x86/.libs/darwin64.o
ranlib: file: .libs/libffi_convenience.a(ffi64.o) has no symbols
ranlib: file: .libs/libffi_convenience.a(darwin64.o) has no symbols
ranlib .libs/libffi_convenience.a
ranlib: file: .libs/libffi_convenience.a(ffi64.o) has no symbols
ranlib: file: .libs/libffi_convenience.a(darwin64.o) has no symbols
creating libffi_convenience.la
(cd .libs && rm -f libffi_convenience.la && cp -p ../libffi_convenience.la libffi_convenience.la)
make[4]: Leaving directory `/Users/mwotton/projects/ghc/libffi/build'
make[3]: Leaving directory `/Users/mwotton/projects/ghc/libffi/build'
cp .libs/libffi.5.0.9.dylib /Users/mwotton/projects/ghc/libffi/libffi.5.0.9.dylib
(cd /Users/mwotton/projects/ghc/libffi && { cp -p -f libffi.5.0.9.dylib libffi.5.dylib || { rm -f libffi.5.dylib && cp -p libffi.5.0.9.dylib libffi.5.dylib; }; })
(cd /Users/mwotton/projects/ghc/libffi && { cp -p -f libffi.5.0.9.dylib libffi.dylib || { rm -f libffi.dylib && cp -p libffi.5.0.9.dylib libffi.dylib; }; })
cp .libs/libffi.lai /Users/mwotton/projects/ghc/libffi/libffi.la
cp .libs/libffi.a /Users/mwotton/projects/ghc/libffi/libffi.a
chmod 644 /Users/mwotton/projects/ghc/libffi/libffi.a
ranlib /Users/mwotton/projects/ghc/libffi/libffi.a
ranlib: file: /Users/mwotton/projects/ghc/libffi/libffi.a(ffi64.o) has no symbols
ranlib: file: /Users/mwotton/projects/ghc/libffi/libffi.a(darwin64.o) has no symbols
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
touch libffi/stamp.ffi.build-shared
"cp" libffi/libffi.a libffi/libHSffi.a
"cp" libffi/libffi.so libffi/libHSffi-ghc6.11.20090913.dylib
"cp" libffi/libffi.a libffi/libHSffi_p.a
cp: libffi/libffi.so: No such file or directory
make[1]: *** [libffi/libHSffi-ghc6.11.20090913.dylib] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
nice make -j 2 145.90s user 70.38s system 78% cpu 4:37.08 total
```7.10.1