Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,866
    • Issues 4,866
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #15718
Closed
Open
Created Oct 08, 2018 by gwright@antiope.com@trac-gwright

Build panic on ghc-8.6.1 under FreeBSD when using -fllvm

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.

Trac metadata
Trac field Value
Version 8.6.1
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
Assignee
Assign to
Time tracking