Installing binary tarball fails on Linux

Simon Marlow marlowsd at gmail.com
Tue Feb 28 11:23:01 CET 2012


On 23/02/2012 21:24, Johan Tibell wrote:
> Hi,
>
> I tried to install the GHC 7.4.1 32-bit binary tarball today and ran
> into the error below. Are 32-bit GHC's not supported on 64-bit
> Linuxes?
>
> The error:
>
> Installing library in /usr/local/lib/ghc-7.4.1/ghc-prim-0.2.0.0
> ghc-cabal: Bad interface file: dist-install/build/GHC/Classes.hi
> magic number mismatch: old/corrupt interface file? (wanted 33214052, got
> 129742)

Is it possible you also had the 64-bit version installed?  To install 
the two side-by-side, you have to set the --prefix or --libdir so they 
don't clash.

Also, the 32-bit version won't work out of the box on a 64-bit Linux 
install without some -optc -m32 -opta -m32 -optl -m32.

Cheers,
	Simon



> Full log:
>
> $ tar jxf ghc-7.4.1-i386-unknown-linux.tar.bz2
>
> $ cd ghc-7.4.1/
> tibell at tibell:ghc-7.4.1$ ./configure --prefix=/usr/local
> checking for path to top of build tree... /tmp/ghc-7.4.1
> Build platform inferred as: i386-unknown-linux
> Host platform inferred as: i386-unknown-linux
> Target platform inferred as: i386-unknown-linux
> GHC build  : i386-unknown-linux
> GHC host   : i386-unknown-linux
> GHC target : i386-unknown-linux
> checking for perl... /usr/bin/perl
> checking if your perl works in shell scripts... yes
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether ln -s works... yes
> checking for gsed... sed
> checking for gcc... /usr/bin/gcc
> checking for gcc... /usr/bin/gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether /usr/bin/gcc accepts -g... yes
> checking for /usr/bin/gcc option to accept ISO C89... none needed
> checking version of gcc... 4.4.3
> checking how to run the C preprocessor... /usr/bin/gcc -E
> checking whether ld understands --hash-size=31...
> checking whether ld understands --reduce-memory-overheads...
> checking for extra options to pass gcc when compiling via C...  -fwrapv
> checking Setting up CFLAGS, LDFLAGS, IGNORE_LINKER_LD_FLAGS and CPPFLAGS... done
> checking Setting up CONF_CC_OPTS_STAGE0, CONF_GCC_LINKER_OPTS_STAGE0,
> CONF_LD_LINKER_OPTS_STAGE0 and CONF_CPP_OPTS_STAGE0... done
> checking Setting up CONF_CC_OPTS_STAGE1, CONF_GCC_LINKER_OPTS_STAGE1,
> CONF_LD_LINKER_OPTS_STAGE1 and CONF_CPP_OPTS_STAGE1... done
> checking Setting up CONF_CC_OPTS_STAGE2, CONF_GCC_LINKER_OPTS_STAGE2,
> CONF_LD_LINKER_OPTS_STAGE2 and CONF_CPP_OPTS_STAGE2... done
> checking for .subsections_via_symbols... no
> checking for GNU non-executable stack support... yes
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking size of void *... 8
> checking for ar... /usr/bin/ar
> checking whether /usr/bin/ar is GNU ar... yes
> checking for ar arguments... q
> checking whether ranlib is needed... no
> configure: creating ./config.status
> config.status: creating settings
> config.status: creating mk/config.mk
> config.status: creating mk/install.mk
> ****************************************************
> Configuration done, ready to 'make install'
> (see README and INSTALL files for more info.)
> ****************************************************
>
> $ sudo make install
> make -r --no-print-directory -f ghc.mk install BINDIST=YES NO_INCLUDE_DEPS=YES
> /usr/bin/install -c -m 755 -d "/usr/local/share/man"
> /usr/bin/install -c -m 755 -d "/usr/local/share/man/man1"
> /usr/bin/install -c -m 644  docs/man/ghc.1 "/usr/local/share/man/man1"
> "rm" -f driver/split/dist/ghc-split
> echo '#!/usr/bin/perl'>>
> driver/split/dist/ghc-split
> echo '$TARGETPLATFORM  = "i386-unknown-linux";'>>  driver/split/dist/ghc-split
> echo '$TABLES_NEXT_TO_CODE  = "YES";'>>  driver/split/dist/ghc-split
> cat driver/split/dist/ghc-split.prl
>          >>  driver/split/dist/ghc-split
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1"
> /usr/bin/install -c -m 755  driver/split/dist/ghc-split
> "/usr/local/lib/ghc-7.4.1"
> /usr/bin/install -c -m 755 -d "/usr/local/bin"
> "rm" -f                                 "/usr/local/bin/ghci-7.4.1"
> create () { touch "$1"&&  chmod 755 "$1" ; }&&  create
>                    "/usr/local/bin/ghci-7.4.1"
> echo '#!/bin/sh'>>  "/usr/local/bin/ghci-7.4.1"
> echo 'exec "/usr/local/bin/ghc-7.4.1" --interactive ${1+"$@"}'>>
> "/usr/local/bin/ghci-7.4.1"
> chmod +x                                 "/usr/local/bin/ghci-7.4.1"
> "rm" -f "/usr/local/bin/ghci"
> ln -s ghci-7.4.1 "/usr/local/bin/ghci"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1/include"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1/include/."&&
> /usr/bin/install -c -m 644  includes/./*.h
> "/usr/local/lib/ghc-7.4.1/include/./"&&    /usr/bin/install -c -m 755
> -d "/usr/local/lib/ghc-7.4.1/include/rts"&&  /usr/bin/install -c -m
> 644  includes/rts/*.h "/usr/local/lib/ghc-7.4.1/include/rts/"&&
> /usr/bin/install -c -m 755 -d
> "/usr/local/lib/ghc-7.4.1/include/rts/prof"&&  /usr/bin/install -c -m
> 644  includes/rts/prof/*.h
> "/usr/local/lib/ghc-7.4.1/include/rts/prof/"&&    /usr/bin/install -c
> -m 755 -d "/usr/local/lib/ghc-7.4.1/include/rts/storage"&&
> /usr/bin/install -c -m 644  includes/rts/storage/*.h
> "/usr/local/lib/ghc-7.4.1/include/rts/storage/"&&    /usr/bin/install
> -c -m 755 -d "/usr/local/lib/ghc-7.4.1/include/stg"&&
> /usr/bin/install -c -m 644  includes/stg/*.h
> "/usr/local/lib/ghc-7.4.1/include/stg/"&&   true
> /usr/bin/install -c -m 644  includes/ghcautoconf.h
> includes/ghcplatform.h
> includes/dist-ghcconstants/header/GHCConstants.h
> includes/dist-derivedconstants/header/DerivedConstants.h
> "/usr/local/lib/ghc-7.4.1/include/"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1/include"
> /usr/bin/install -c -m 644  rts/dist/build/ffi.h
> rts/dist/build/ffitarget.h "/usr/local/lib/ghc-7.4.1/include/"
> /usr/bin/install -c -m 755 -d "/usr/local/bin"
> "rm" -f
> "/usr/local/bin/haddock-ghc-7.4.1"
> create () { touch "$1"&&  chmod 755 "$1" ; }&&  create
>                            "/usr/local/bin/haddock-ghc-7.4.1"
> echo '#!/bin/sh'>>
> "/usr/local/bin/haddock-ghc-7.4.1"
> echo 'exedir="/usr/local/lib/ghc-7.4.1"'>>
> "/usr/local/bin/haddock-ghc-7.4.1"
> echo 'exeprog="haddock"'>>
> "/usr/local/bin/haddock-ghc-7.4.1"
> echo 'executablename="$exedir/$exeprog"'>>
> "/usr/local/bin/haddock-ghc-7.4.1"
> echo 'datadir="/usr/local/share"'>>
> "/usr/local/bin/haddock-ghc-7.4.1"
> echo 'bindir="/usr/local/bin"'>>
> "/usr/local/bin/haddock-ghc-7.4.1"
> echo 'topdir="/usr/local/lib/ghc-7.4.1"'
>>> "/usr/local/bin/haddock-ghc-7.4.1"
> cat utils/haddock/haddock.wrapper>>
> "/usr/local/bin/haddock-ghc-7.4.1"
> chmod +x
> "/usr/local/bin/haddock-ghc-7.4.1"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1/html/"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1/html/Classic.theme/"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1/html/Ocean.std-theme/"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1/latex/"
> /usr/bin/install -c -m 644  utils/haddock/html/frames.html
> "/usr/local/lib/ghc-7.4.1/html/"
> /usr/bin/install -c -m 644  utils/haddock/html/haddock-util.js
> "/usr/local/lib/ghc-7.4.1/html/"
> /usr/bin/install -c -m 644
> utils/haddock/html/Classic.theme/haskell_icon.gif
> "/usr/local/lib/ghc-7.4.1/html/Classic.theme/"
> /usr/bin/install -c -m 644  utils/haddock/html/Classic.theme/minus.gif
> "/usr/local/lib/ghc-7.4.1/html/Classic.theme/"
> /usr/bin/install -c -m 644  utils/haddock/html/Classic.theme/plus.gif
> "/usr/local/lib/ghc-7.4.1/html/Classic.theme/"
> /usr/bin/install -c -m 644
> utils/haddock/html/Classic.theme/xhaddock.css
> "/usr/local/lib/ghc-7.4.1/html/Classic.theme/"
> /usr/bin/install -c -m 644
> utils/haddock/html/Ocean.std-theme/hslogo-16.png
> "/usr/local/lib/ghc-7.4.1/html/Ocean.std-theme/"
> /usr/bin/install -c -m 644
> utils/haddock/html/Ocean.std-theme/minus.gif
> "/usr/local/lib/ghc-7.4.1/html/Ocean.std-theme/"
> /usr/bin/install -c -m 644
> utils/haddock/html/Ocean.std-theme/ocean.css
> "/usr/local/lib/ghc-7.4.1/html/Ocean.std-theme/"
> /usr/bin/install -c -m 644
> utils/haddock/html/Ocean.std-theme/plus.gif
> "/usr/local/lib/ghc-7.4.1/html/Ocean.std-theme/"
> /usr/bin/install -c -m 644
> utils/haddock/html/Ocean.std-theme/synopsis.png
> "/usr/local/lib/ghc-7.4.1/html/Ocean.std-theme/"
> /usr/bin/install -c -m 644  utils/haddock/latex/haddock.sty
> "/usr/local/lib/ghc-7.4.1/latex/"
> "rm" -f "/usr/local/bin/haddock"
> ln -s haddock-ghc-7.4.1 "/usr/local/bin/haddock"
> /usr/bin/install -c -m 755 -d "/usr/local/bin"
> "rm" -f                                         "/usr/local/bin/hsc2hs"
> create () { touch "$1"&&  chmod 755 "$1" ; }&&  create
>                            "/usr/local/bin/hsc2hs"
> echo '#!/bin/sh'>>
> "/usr/local/bin/hsc2hs"
> echo 'exedir="/usr/local/lib/ghc-7.4.1"'>>
> "/usr/local/bin/hsc2hs"
> echo 'exeprog="hsc2hs"'>>  "/usr/local/bin/hsc2hs"
> echo 'executablename="$exedir/$exeprog"'>>  "/usr/local/bin/hsc2hs"
> echo 'datadir="/usr/local/share"'>>
> "/usr/local/bin/hsc2hs"
> echo 'bindir="/usr/local/bin"'>>
> "/usr/local/bin/hsc2hs"
> echo 'topdir="/usr/local/lib/ghc-7.4.1"'
>>> "/usr/local/bin/hsc2hs"
> echo 'HSC2HS_EXTRA="--cflag=-fno-stack-protector "'>>  "/usr/local/bin/hsc2hs"
> cat utils/hsc2hs/hsc2hs.wrapper>>
> "/usr/local/bin/hsc2hs"
> chmod +x                                         "/usr/local/bin/hsc2hs"
> /usr/bin/install -c -m 644  utils/hsc2hs/template-hsc.h
> "/usr/local/lib/ghc-7.4.1"
> /usr/bin/install -c -m 755 -d "/usr/local/bin"
> "rm" -f                                         "/usr/local/bin/ghc-pkg-7.4.1"
> create () { touch "$1"&&  chmod 755 "$1" ; }&&  create
>                            "/usr/local/bin/ghc-pkg-7.4.1"
> echo '#!/bin/sh'>>
> "/usr/local/bin/ghc-pkg-7.4.1"
> echo 'exedir="/usr/local/lib/ghc-7.4.1"'>>
> "/usr/local/bin/ghc-pkg-7.4.1"
> echo 'exeprog="ghc-pkg"'>>
> "/usr/local/bin/ghc-pkg-7.4.1"
> echo 'executablename="$exedir/$exeprog"'>>
> "/usr/local/bin/ghc-pkg-7.4.1"
> echo 'datadir="/usr/local/share"'>>
> "/usr/local/bin/ghc-pkg-7.4.1"
> echo 'bindir="/usr/local/bin"'>>
> "/usr/local/bin/ghc-pkg-7.4.1"
> echo 'topdir="/usr/local/lib/ghc-7.4.1"'
>>> "/usr/local/bin/ghc-pkg-7.4.1"
> cat utils/ghc-pkg/ghc-pkg.wrapper>>
> "/usr/local/bin/ghc-pkg-7.4.1"
> chmod +x                                         "/usr/local/bin/ghc-pkg-7.4.1"
> /usr/bin/install -c -m 755 -d "/usr/local/bin"
> "rm" -f "/usr/local/bin/ghc-pkg"
> ln -s ghc-pkg-7.4.1 "/usr/local/bin/ghc-pkg"
> /usr/bin/install -c -m 755 -d "/usr/local/bin"
> "rm" -f                                         "/usr/local/bin/runghc"
> create () { touch "$1"&&  chmod 755 "$1" ; }&&  create
>                            "/usr/local/bin/runghc"
> echo '#!/bin/sh'>>
> "/usr/local/bin/runghc"
> echo 'exedir="/usr/local/lib/ghc-7.4.1"'>>
> "/usr/local/bin/runghc"
> echo 'exeprog="runghc"'>>  "/usr/local/bin/runghc"
> echo 'executablename="$exedir/$exeprog"'>>  "/usr/local/bin/runghc"
> echo 'datadir="/usr/local/share"'>>
> "/usr/local/bin/runghc"
> echo 'bindir="/usr/local/bin"'>>
> "/usr/local/bin/runghc"
> echo 'topdir="/usr/local/lib/ghc-7.4.1"'
>>> "/usr/local/bin/runghc"
> cat utils/runghc/runghc.wrapper>>
> "/usr/local/bin/runghc"
> chmod +x                                         "/usr/local/bin/runghc"
> "rm" -f "/usr/local/bin/runhaskell"
> ln -s runghc "/usr/local/bin/runhaskell"
> /usr/bin/install -c -m 755 -d "/usr/local/bin"
> "rm" -f                                         "/usr/local/bin/ghc-7.4.1"
> create () { touch "$1"&&  chmod 755 "$1" ; }&&  create
>                            "/usr/local/bin/ghc-7.4.1"
> echo '#!/bin/sh'>>
> "/usr/local/bin/ghc-7.4.1"
> echo 'exedir="/usr/local/lib/ghc-7.4.1"'>>
> "/usr/local/bin/ghc-7.4.1"
> echo 'exeprog="ghc-stage2"'>>
> "/usr/local/bin/ghc-7.4.1"
> echo 'executablename="$exedir/$exeprog"'>>  "/usr/local/bin/ghc-7.4.1"
> echo 'datadir="/usr/local/share"'>>
> "/usr/local/bin/ghc-7.4.1"
> echo 'bindir="/usr/local/bin"'>>
> "/usr/local/bin/ghc-7.4.1"
> echo 'topdir="/usr/local/lib/ghc-7.4.1"'
>>> "/usr/local/bin/ghc-7.4.1"
> echo 'executablename="$exedir/ghc"'>>  "/usr/local/bin/ghc-7.4.1"
> cat ghc/ghc.wrapper>>  "/usr/local/bin/ghc-7.4.1"
> chmod +x                                         "/usr/local/bin/ghc-7.4.1"
> "rm" -f "/usr/local/bin/ghc"
> ln -s ghc-7.4.1 "/usr/local/bin/ghc"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1"
> for i in driver/ghc-usage.txt driver/ghci-usage.txt
> rts/dist/build/libHSrts.a rts/dist/build/libHSrts_p.a
> rts/dist/build/libHSrts-ghc7.4.1.so rts/dist/build/libHSrts_l.a
> rts/dist/build/libHSrts_debug.a rts/dist/build/libHSrts_thr.a
> rts/dist/build/libHSrts_thr_debug.a rts/dist/build/libHSrts_thr_l.a
> rts/dist/build/libHSrts_thr_p.a
> rts/dist/build/libHSrts_debug-ghc7.4.1.so
> rts/dist/build/libHSrts_thr-ghc7.4.1.so
> rts/dist/build/libHSrts_thr_debug-ghc7.4.1.so rts/dist/build/libffi.so
> rts/dist/build/libffi.so.5 rts/dist/build/libffi.so.5.0.10  settings;
> do \
> 		case $i in \
> 		  *.a) \
> 		    /usr/bin/install -c -m 644  $i "/usr/local/lib/ghc-7.4.1"; \
> 		    true /usr/local/lib/ghc-7.4.1/`basename $i` ;; \
> 		  *.dll) \
> 		    /usr/bin/install -c -m 644 -s  $i "/usr/local/lib/ghc-7.4.1" ;; \
> 		  *.so) \
> 		    /usr/bin/install -c -m 755  $i "/usr/local/lib/ghc-7.4.1" ;; \
> 		  *.dylib) \
> 		    /usr/bin/install -c -m 755  $i "/usr/local/lib/ghc-7.4.1";; \
> 		  *) \
> 		    /usr/bin/install -c -m 644  $i "/usr/local/lib/ghc-7.4.1"; \
> 		esac; \
> 	done
> /usr/bin/gcc -E  -undef -traditional -P -DINSTALLING
> -DLIB_DIR='"/usr/local/lib/ghc-7.4.1"'
> -DINCLUDE_DIR='"/usr/local/lib/ghc-7.4.1/include"'
> -DPAPI_INCLUDE_DIR="" -DPAPI_LIB_DIR="" -x c -Iincludes
> rts/package.conf.in -o rts/package.conf.install.raw
> grep -v '^#pragma GCC' rts/package.conf.install.raw | sed -e 's/""//g'
> -e 's/:[ 	]*,/: /g'>rts/package.conf.install
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1"
> for i in utils/haddock/dist/build/tmp/haddock
> utils/hsc2hs/dist-install/build/tmp/hsc2hs
> utils/ghc-pkg/dist-install/build/tmp/ghc-pkg
> utils/runghc/dist-install/build/tmp/runghc
> ghc/stage2/build/tmp/ghc-stage2; do \
> 		/usr/bin/install -c -m 755  $i "/usr/local/lib/ghc-7.4.1"; \
> 	done
> "mv" "/usr/local/lib/ghc-7.4.1/ghc-stage2" "/usr/local/lib/ghc-7.4.1/ghc"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1"
> "rm" -rf "/usr/local/lib/ghc-7.4.1/package.conf.d"
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.4.1/package.conf.d"
> "/usr/local/lib/ghc-7.4.1/ghc-pkg" --force --global-conf
> "/usr/local/lib/ghc-7.4.1/package.conf.d" update
> rts/package.conf.install
> Reading package info from "rts/package.conf.install" ... done.
> "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal" install
> "/usr/local/lib/ghc-7.4.1/ghc" "/usr/local/lib/ghc-7.4.1/ghc-pkg"
> "strip" "/usr/local/lib/ghc-7.4.1" libraries/ghc-prim dist-install ''
> '/usr/local' '/usr/local/lib/ghc-7.4.1'
> '/usr/local/share/doc/ghc/html/libraries' NO
> Installing library in /usr/local/lib/ghc-7.4.1/ghc-prim-0.2.0.0
> ghc-cabal: Bad interface file: dist-install/build/GHC/Classes.hi
> magic number mismatch: old/corrupt interface file? (wanted 33214052, got
> 129742)
> make[1]: *** [install_packages] Error 1
> make: *** [install] Error 2
>
> -- Johan
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




More information about the Glasgow-haskell-users mailing list