[GHC] #15718: Build panic on ghc-8.6.1 under FreeBSD when using -fllvm

GHC ghc-devs at haskell.org
Mon Oct 8 01:04:44 UTC 2018


#15718: Build panic on ghc-8.6.1 under FreeBSD when using -fllvm
-------------------------------------+-------------------------------------
           Reporter:  gwright        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.1
           Keywords:                 |  Operating System:  FreeBSD
       Architecture:  x86_64         |   Type of failure:  Compile-time
  (amd64)                            |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This looks like a straightforward oversight.   I am building my pure
 haskell LU solver under FreeBSD.  I use the -fllvm compiler option because
 I need extra numerical performance.

 When I build, I get (this is the output from GitLab CI, which is in turn
 running 'stack build')

 {{{
 Running with gitlab-runner 11.2.0 (35e8515d)
   on stacker.18clay.com a2111f63
 Using Shell executor...
 Running on stacker.18clay.com...
 Fetching changes...
 Removing .stack-work/
 HEAD is now at f8fe3b4 Use llvm60 on FreeBSD.
 From https://gitlab.18clay.com/software/luSolve
    f8fe3b4..c993a26  streamlined -> origin/streamlined
 Checking out c993a262 as streamlined...
 Skipping Git submodules setup
 $ stack build --pedantic
 luSolve-0.5: configure (lib)
 Configuring luSolve-0.5...
 luSolve-0.5: build (lib)
 Preprocessing library for luSolve-0.5..
 Building library for luSolve-0.5..
 [1 of 1] Compiling Numeric.LinearAlgebra.LUSolve (
 src/Numeric/LinearAlgebra/LUSolve.hs, .stack-
 work/dist/x86_64-freebsd/Cabal-2.4.0.1/build/Numeric/LinearAlgebra/LUSolve.o
 )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.6.1 for x86_64-portbld-freebsd):
         Failed to lookup the datalayout for x86_64-unknown-freebsd;
 available targets: ["i386-unknown-windows","i686-unknown-windows","x86_64
 -unknown-windows","arm-unknown-linux-gnueabihf","armv6-unknown-linux-
 gnueabihf","armv6l-unknown-linux-gnueabihf","armv7-unknown-linux-gnueabihf
 ","armv7a-unknown-linux-gnueabi","armv7l-unknown-linux-gnueabihf","aarch64
 -unknown-linux-gnu","aarch64-unknown-linux","i386-unknown-linux-gnu","i386
 -unknown-linux","x86_64-unknown-linux-gnu","x86_64-unknown-linux","armv7
 -unknown-linux-androideabi","aarch64-unknown-linux-android","powerpc64le-
 unknown-linux","amd64-portbld-freebsd","arm-unknown-nto-qnx-eabi","i386
 -apple-darwin","x86_64-apple-darwin","armv7-apple-ios","aarch64-apple-
 ios","i386-apple-ios","x86_64-apple-ios","aarch64-unknown-freebsd","armv6
 -unknown-freebsd-gnueabihf","armv7-unknown-freebsd-gnueabihf"]
 CallStack (from HasCallStack):
   error, called at compiler/llvmGen/LlvmCodeGen.hs:96:24 in
 ghc:LlvmCodeGen

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


 --  While building custom Setup.hs for package luSolve-0.5 using:
       /home/gitlab-runner/.stack/setup-exe-cache/x86_64-freebsd/Cabal-
 simple_mPHDZzAJ_2.4.0.1_ghc-8.6.1 --builddir=.stack-
 work/dist/x86_64-freebsd/Cabal-2.4.0.1 build lib:luSolve --ghc-options "
 -ddump-hi -ddump-to-file"
     Process exited with code: ExitFailure 1
 ERROR: Job failed: exit status 1
 }}}

 The bug seems simple.  The compiler is looking for the datalayout for
 x86_64-unknown-freebsd; but what is available is amd64-portbld-freebsd.
 Is this just a simple naming error?  The stack resolver was the cutting-
 edge nightly-2018-10-6; if it is a problem in their packaging rather than
 ghc itself I will file a report with them (though ghc did panic here, and
 as the breath ebbed from its ASTs and light faded from the code generator,
 it pleaded that a bug report be filed).

 I've attached the .cabal file in case it helps.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15718>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list