#7834 closed bug (fixed)

dyn way and INTEGER_LIBRARY=integer-simple

Reported by: heisenbug Owned by: igloo
Priority: high Milestone: 7.8.1
Component: Compiler Version: 7.7
Keywords: Cc: pho@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

a standard bootstrap with

perl boot
./configure
make INTEGER_LIBRARY=integer-simple

causes some problems:

  1. there is a panic (at least when -j4) "fromJust..." (which strangely disappears on the second attempt)
  2. __word_encode{Float|Double} is not found by the linker. There are __int_encode{Float|Double} symbols available, though, and changing the source helps for linking, but not for correctness, obviously.

I'll add specific details (if not trivially reproducible) as soon as I am back at my dev machine.

The bottom line is that since GHC HEAD now builds the 'dyn' way by default, this kind of bootstrap always fails. Normally not a problem on desktop linux, but in combination with a gmp-less embedded linux and cross-compiling it becomes annoying.

Change History (4)

comment:1 Changed 23 months ago by heisenbug

This is the panic:

ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.7.20130412 for powerpc-montavista-linux):
        expectJust initTcInteractive

It happens (presumably) just after the .hi file is written:

$ rm libraries/integer-simple/dist-install/build/GHC/Integer/Type.hi
$ rm libraries/integer-simple/dist-install/build/GHC/Integer/Type.o
$ make libraries/integer-simple/dist-install/build/GHC/Integer/Type.o stage=1 V=0

--->

===--- building final phase
make -r --no-print-directory -f ghc.mk phase=final libraries/integer-simple/dist-install/build/GHC/Integer/Type.o
utils/ghc-pkg/ghc.mk:46: warning: overriding commands for target `install_utils/ghc-pkg_dist_wrapper'
utils/ghc-pkg/ghc.mk:37: warning: ignoring old commands for target `install_utils/ghc-pkg_dist_wrapper'
  HC [stage 1] libraries/integer-simple/dist-install/build/GHC/Integer/Type.o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.7.20130412 for powerpc-montavista-linux):
        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: *** [libraries/integer-simple/dist-install/build/GHC/Integer/Type.o] Error 2

Looking at the build products, only one of them is present:

$ ls -l libraries/integer-simple/dist-install/build/GHC/Integer/Type.o libraries/integer-simple/dist-install/build/GHC/Integer/Type.hi
ls: libraries/integer-simple/dist-install/build/GHC/Integer/Type.o: No such file or directory
-rw-r--r-- 1 ggreif rts 16699 Apr 15 12:27 libraries/integer-simple/dist-install/build/GHC/Integer/Type.hi

Second attempt is successful:

$ make libraries/integer-simple/dist-install/build/GHC/Integer/Type.o stage=1 V=0

--->

===--- building final phase
make -r --no-print-directory -f ghc.mk phase=final libraries/integer-simple/dist-install/build/GHC/Integer/Type.o
utils/ghc-pkg/ghc.mk:46: warning: overriding commands for target `install_utils/ghc-pkg_dist_wrapper'
utils/ghc-pkg/ghc.mk:37: warning: ignoring old commands for target `install_utils/ghc-pkg_dist_wrapper'
"inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -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 -O1 -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  -dynamic-too -c libraries/integer-simple/./GHC/Integer/Type.hs -o libraries/integer-simple/dist-install/build/GHC/Integer/Type.o -dyno libraries/integer-simple/dist-install/build/GHC/Integer/Type.dyn_o

comment:2 Changed 23 months ago by PHO

  • Cc pho@… added

comment:3 Changed 23 months ago by igloo

  • difficulty set to Unknown
  • Milestone set to 7.8.1
  • Owner set to igloo
  • Priority changed from normal to high

comment:4 Changed 22 months ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the report. Now fixed.

Note: See TracTickets for help on using tickets.