typelead / eta

The Eta Programming Language, a dialect of Haskell on the JVM
https://eta-lang.org
BSD 3-Clause "New" or "Revised" License
2.61k stars 141 forks source link

hoogle: failed to build #961

Open pjrt opened 5 years ago

pjrt commented 5 years ago

Description

I tried to build hoogle (sha: fca9b98652540ac513af99cca0c103ac83444b5c) with etlas build. Got the following error:

Building library for mmap-0.5.9..
[1 of 1] Compiling System.IO.MMap  eta: panic! (the 'impossible' happened)
  (Eta version 0.8.6b5):
    tcCheckFIType: Unsupported calling convention.
  ccall unsafe "value HsMmap.h system_io_mmap_granularity"

Please report this as a Eta bug: http://github.com/typelead/eta/issues

etlas: Failed to build mmap-0.5.9 (which is required by exe:hoogle from
hoogle-5.0.17.6). See the build log above for details.

Steps to Reproduce

  1. Clone the hoogle repo
  2. run etlas build

Context

Your Environment

etlas version 1.5.0.0
compiled using version 2.1.0.0 of the etlas-cabal library 
$ uname -a
Linux <HOSTNAME> 5.0.6-arch1-1-ARCH #1 SMP PREEMPT Wed Apr 3 09:35:20 UTC 2019 x86_64 GNU/Linux
jneira commented 5 years ago

Hi, i am afraid that the mmap package has a lot of calls to c funtions and eta does not support them. Either the mmap package should be patched (see https://github.com/typelead/eta-hackage/tree/master) replacing c calls with java ones or hoogle itself should be patched replacing the calls to mmap package.

vmchale commented 5 years ago

perhaps the error message could be rewritten? If this is not an eta bug, the compiler need not report it as such

jneira commented 5 years ago

yeah, it could be a specific, more helpful error. But i would like to implicitly translate c imports to java ones, like ghcjs, so patching would be easier: https://github.com/typelead/eta/issues/966