Skip to content

ghc "panic! (the 'impossible' happened)" building vimus on NixOS

Hey there, I'm having trouble building vimus (https://github.com/vimus/vimus) on NixOS. The package builds fine locally for an x64 system, but is failing on i686 builds.

On the NixOS builder: http://hydra.nixos.org/build/17512103/nixlog/2

[nix-shell:/tmp/build-17512103/vimus-0.2.0]$ ./Setup clean && ./Setup configure --enable-shared --enable-library-vanilla --enable-executable-dynamic --enable-tests  --ghc-option=-optl=-Wl,-rpath=/nix/store/cgkfxxk1iz30fg0r3kf9dv2p550i5hn2-vimus-0.2.0/lib/ghc-7.8.3/vimus-0.2.0 --ghc-option=-j8 && ./Setup build
cleaning...
Configuring vimus-0.2.0...
Building vimus-0.2.0...
Preprocessing library vimus-0.2.0...
[ 1 of 39] Compiling Constant         ( dist/build/Constant.hs, dist/build/Constant.o )
[ 2 of 39] Compiling CursesUtil       ( ncursesw/src/CursesUtil.hs, dist/build/CursesUtil.o )
[ 3 of 39] Compiling Timer            ( src/Timer.hs, dist/build/Timer.o )
[ 4 of 39] Compiling UI.Curses.Type   ( dist/build/UI/Curses/Type.hs, dist/build/UI/Curses/Type.o )
[ 5 of 39] Compiling Misc             ( dist/build/Misc.hs, dist/build/Misc.o )

ncursesw/src/Misc.chs:7:1: Warning:
    The import of ‘Foreign.C.String’ is redundant
      except perhaps to import instances from ‘Foreign.C.String’
    To import instances alone, use: import Foreign.C.String()

ncursesw/src/Misc.chs:8:1: Warning:
    The import of ‘Foreign.Marshal.Alloc’ is redundant
      except perhaps to import instances from ‘Foreign.Marshal.Alloc’
    To import instances alone, use: import Foreign.Marshal.Alloc()

ncursesw/src/Misc.chs:9:1: Warning:
    The import of ‘Foreign.Storable’ is redundant
      except perhaps to import instances from ‘Foreign.Storable’
    To import instances alone, use: import Foreign.Storable()

ncursesw/src/Misc.chs:10:1: Warning:
    The import of ‘Foreign.ForeignPtr’ is redundant
      except perhaps to import instances from ‘Foreign.ForeignPtr’
    To import instances alone, use: import Foreign.ForeignPtr()

ncursesw/src/Misc.chs:12:1: Warning:
    The import of ‘Data.Char’ is redundant
      except perhaps to import instances from ‘Data.Char’
    To import instances alone, use: import Data.Char()

ncursesw/src/Misc.chs:29:1: Warning:
    Top-level binding with no type signature:
      cFromBool :: Bool -> Integer

ncursesw/src/Misc.chs:29:13: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Num a0) arising from a use of ‘fromBool’
    In the expression: fromBool
    In an equation for ‘cFromBool’: cFromBool = fromBool

ncursesw/src/Misc.chs:30:1: Warning:
    Top-level binding with no type signature:
      cToBool :: Integer -> Bool

ncursesw/src/Misc.chs:30:13: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Num a0)
        arising from a use of ‘toBool’ at ncursesw/src/Misc.chs:30:13-18
      (Eq a0)
        arising from a use of ‘toBool’ at ncursesw/src/Misc.chs:30:13-18
    In the expression: toBool
    In an equation for ‘cToBool’: cToBool = toBool

ncursesw/src/Misc.chs:42:1: Warning:
    Top-level binding with no type signature: fromAttr :: Attr -> CInt

ncursesw/src/Misc.chs:77:1: Warning:
    Top-level binding with no type signature:
      wcolor_set :: Window -> Int -> IO Status

ncursesw/src/Misc.chs:86:1: Warning:
    Top-level binding with no type signature:
      wattr_off :: Window -> [Attribute] -> IO Status

ncursesw/src/Misc.chs:90:1: Warning:
    Top-level binding with no type signature:
      wattr_on :: Window -> [Attribute] -> IO Status

ncursesw/src/Misc.chs:98:1: Warning:
    Top-level binding with no type signature:
      wchgat :: Window -> Int -> [Attribute] -> Int -> IO Status

ncursesw/src/Misc.chs:103:1: Warning:
    Top-level binding with no type signature:
      mvwchgat :: Window
                  -> Int -> Int -> Int -> [Attribute] -> Int -> IO Status
[ 6 of 39] Compiling CursesInput      ( dist/build/CursesInput.hs, dist/build/CursesInput.o )
[ 7 of 39] Compiling Instances        ( src/Instances.hs, dist/build/Instances.o )
[ 8 of 39] Compiling Data.List.Pointed ( src/Data/List/Pointed.hs, dist/build/Data/List/Pointed.o )
[ 9 of 39] Compiling Data.List.Zipper ( src/Data/List/Zipper.hs, dist/build/Data/List/Zipper.o )
[10 of 39] Compiling UI.Curses.Key    ( dist/build/UI/Curses/Key.hs, dist/build/UI/Curses/Key.o )
[11 of 39] Compiling Vimus.Tab        ( src/Vimus/Tab.hs, dist/build/Vimus/Tab.o )
[12 of 39] Compiling Vimus.Command.Parser ( src/Vimus/Command/Parser.hs, dist/build/Vimus/Command/Parser.o )
[13 of 39] Compiling Vimus.Key        ( src/Vimus/Key.hs, dist/build/Vimus/Key.o )
[14 of 39] Compiling Paths_vimus      ( dist/build/autogen/Paths_vimus.hs, dist/build/Paths_vimus.o )
[15 of 39] Compiling Vimus.Song       ( src/Vimus/Song.hs, dist/build/Vimus/Song.o )
[16 of 39] Compiling Vimus.Song.Format ( src/Vimus/Song/Format.hs, dist/build/Vimus/Song/Format.o )
[17 of 39] Compiling Vimus.Queue      ( src/Vimus/Queue.hs, dist/build/Vimus/Queue.o )
[18 of 39] Compiling Vimus.Util       ( src/Vimus/Util.hs, dist/build/Vimus/Util.o )
[19 of 39] Compiling Option           ( src/Option.hs, dist/build/Option.o )
[20 of 39] Compiling PlaybackState    ( src/PlaybackState.hs, dist/build/PlaybackState.o )
[21 of 39] Compiling Curses           ( dist/build/Curses.hs, dist/build/Curses.o )

ncursesw/src/Curses.chs:73:1: Warning:
    The import of ‘Foreign.C.String’ is redundant
      except perhaps to import instances from ‘Foreign.C.String’
    To import instances alone, use: import Foreign.C.String()

ncursesw/src/Curses.chs:76:1: Warning:
    The import of ‘chr’ from module ‘Data.Char’ is redundant

ncursesw/src/Curses.chs:150:1: Warning:
    Defined but not used: ‘wnoutrefresh’

ncursesw/src/Curses.chs:151:1: Warning:
    Defined but not used: ‘doupdate’

ncursesw/src/Curses.chs:152:1: Warning:
    Defined but not used: ‘redrawwin’

ncursesw/src/Curses.chs:153:1: Warning:
    Defined but not used: ‘wredrawln’

ncursesw/src/Curses.chs:160:1: Warning:
    Defined but not used: ‘getparyx’

ncursesw/src/Curses.chs:207:1: Warning:
    Defined but not used: ‘cFromBool’

ncursesw/src/Curses.chs:207:1: Warning:
    Top-level binding with no type signature:
      cFromBool :: Bool -> Integer

ncursesw/src/Curses.chs:207:13: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Num a0) arising from a use of ‘fromBool’
    In the expression: fromBool
    In an equation for ‘cFromBool’: cFromBool = fromBool

ncursesw/src/Curses.chs:374:1: Warning:
    Defined but not used: ‘wnoutrefresh'_’

ncursesw/src/Curses.chs:377:1: Warning:
    Defined but not used: ‘doupdate'_’

ncursesw/src/Curses.chs:380:1: Warning:
    Defined but not used: ‘redrawwin'_’

ncursesw/src/Curses.chs:383:1: Warning:
    Defined but not used: ‘wredrawln'_’

ncursesw/src/Curses.chs:389:1: Warning:
    Defined but not used: ‘getparyx'_’
[22 of 39] Compiling UI.Curses        ( ncursesw/src/UI/Curses.hs, dist/build/UI/Curses.o )
[23 of 39] Compiling Vimus.WindowLayout ( src/Vimus/WindowLayout.hs, dist/build/Vimus/WindowLayout.o )
[24 of 39] Compiling Vimus.Widget.Type ( src/Vimus/Widget/Type.hs, dist/build/Vimus/Widget/Type.o )
[25 of 39] Compiling Content          ( src/Content.hs, dist/build/Content.o )
[26 of 39] Compiling Vimus.Input      ( src/Vimus/Input.hs, dist/build/Vimus/Input.o )
[27 of 39] Compiling Vimus.Macro      ( src/Vimus/Macro.hs, dist/build/Vimus/Macro.o )
[28 of 39] Compiling Vimus.Render     ( src/Vimus/Render.hs, dist/build/Vimus/Render.o )
[29 of 39] Compiling Vimus.Ruler      ( src/Vimus/Ruler.hs, dist/build/Vimus/Ruler.o )
[30 of 39] Compiling Vimus.Type       ( src/Vimus/Type.hs, dist/build/Vimus/Type.o )
[31 of 39] Compiling Vimus.Command.Type ( src/Vimus/Command/Type.hs, dist/build/Vimus/Command/Type.o )
[32 of 39] Compiling Vimus.Command.Help ( src/Vimus/Command/Help.hs, dist/build/Vimus/Command/Help.o )
[33 of 39] Compiling Vimus.Command.Completion ( src/Vimus/Command/Completion.hs, dist/build/Vimus/Command/Completion.o )
[34 of 39] Compiling Vimus.Command.Core ( src/Vimus/Command/Core.hs, dist/build/Vimus/Command/Core.o )
[35 of 39] Compiling Vimus.Widget.ListWidget ( src/Vimus/Widget/ListWidget.hs, dist/build/Vimus/Widget/ListWidget.o )
[36 of 39] Compiling Vimus.Widget.TextWidget ( src/Vimus/Widget/TextWidget.hs, dist/build/Vimus/Widget/TextWidget.o )
[37 of 39] Compiling Vimus.Widget.HelpWidget ( src/Vimus/Widget/HelpWidget.hs, dist/build/Vimus/Widget/HelpWidget.o )
[38 of 39] Compiling Vimus.Command    ( src/Vimus/Command.hs, dist/build/Vimus/Command.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package containers-0.5.5.1 ... linking ... done.
Loading package text-1.2.0.0 ... linking ... done.
Loading package hashable-1.2.2.0 ... linking ... done.
Loading package scientific-0.3.3.2 ... linking ... done.
Loading package attoparsec-0.12.1.2 ... linking ... done.
Loading package setlocale-1.0.0.1 ... linking ... done.
Loading package utf8-string-0.3.8 ... linking ... done.
Loading package wcwidth-0.0.2 ... linking ... done.
Loading package pretty-1.1.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package unix-2.7.0.1 ... linking ... done.
Loading package directory-1.2.1.0 ... linking ... done.
Loading package process-1.2.0.0 ... linking ... done.
Loading package data-default-class-0.0.1 ... linking ... done.
Loading package data-default-instances-base-0.0.1 ... linking ... done.
Loading package data-default-instances-containers-0.0.1 ... linking ... done.
Loading package dlist-0.7.1 ... linking ... done.
Loading package data-default-instances-dlist-0.0.1 ... linking ... done.
Loading package data-default-instances-old-locale-0.0.1 ... linking ... done.
Loading package data-default-0.5.3 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.3.1 ... linking ... done.
Loading package network-2.6.0.2 ... linking ... done.
Loading package libmpd-0.9.0.1 ... linking ... done.

<no location info>:
    ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for i386-unknown-linux):
	Loading temp shared object failed: /tmp/ghc6364_1/ghc6364_192.so: undefined symbol: nm_getyx

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

[nix-shell:/tmp/build-17512103/vimus-0.2.0]$ nixos-version
14.11pre52840.c347f1c (Caterpillar)

[nix-shell:/tmp/build-17512103/vimus-0.2.0]$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3

[nix-shell:/tmp/build-17512103/vimus-0.2.0]$ uname -a
Linux ip-10-83-15-102.us-west-2.compute.internal 3.12.30 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux

Thanks for any help!

Trac metadata
Trac field Value
Version 7.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information