[haskell-llvm] [Haskell-cafe] Hackage have ghc 7.0 false positives builds

Maciej Piechotka uzytkownik2 at gmail.com
Tue Dec 7 15:24:51 EST 2010


On Tue, 2010-12-07 at 21:01 +0100, Henning Thielemann wrote:
> On Sun, 5 Dec 2010, Maciej Piechotka wrote:
> 
> > Hackage seems to hae false positive builds. For example llvm is reported
> > to have been built with ghc despite problems with cabal (type errors and
> > after quick'n'dirty fix it has errors).
> 
> What are the problems? The recent llvm version only works with LLVM-2.8. 

% llvm-config --version
2.8

> Since the LLVM API changes in each release, it is not (easily) possible to 
> make it work together with different LLVM versions. (Annoyingly there are 
> also new LLVM bugs on a regular basis and then sticking to a working LLVM 
> version also means sticking to a specific Haskell-llvm version.)

To begin with there is type-checking error when compiling with cabal
1.10 shipped with ghc:

/var/tmp/paludis/dev-haskell-llvm-0.9.0.1/work/llvm-0.9.0.1/Setup.hs:102:70:
    Couldn't match expected type `[PackageDB]'
                with actual type `PackageDB'
    Expected type: PackageDBStack
      Actual type: PackageDB
    In the sixth argument of `registerPackage', namely `packageDb'
    In the expression:
      registerPackage
        verbosity installedPkgInfo pkg lbi inplace packageDb

Also there are some problems with installing but it may be due to
ebuild/eclass/cabal rather then llvm (after changing packageDb to
[packageDb]):

 * Using cabal-1.10.0.0.
[1 of 1] Compiling Main
( /var/tmp/paludis/dev-haskell-llvm-0.9.0.1/work/llvm-0.9.0.1/Setup.hs, /var/tmp/paludis/dev-haskell-llvm-0.9.0.1/work/llvm-0.9.0.1/Setup.o )
Linking setup ...
Configuring llvm-0.9.0.1...
Dependency base >=3 && <5: using base-4.3.0.0
Dependency bytestring >=0.9: using bytestring-0.9.1.8
Dependency directory -any: using directory-1.1.0.0
Dependency mtl -any: using mtl-1.1.1.0
Dependency process -any: using process-1.0.1.4
Dependency type-level -any: using type-level-0.2.4
Using Cabal-1.10.0.0 compiled by ghc-7.0
Using compiler: ghc-7.0.1
Using install prefix: /usr
Binaries installed in: /usr/bin
Libraries installed in: /usr/lib64/llvm-0.9.0.1/ghc-7.0.1
Private binaries installed in: /usr/libexec
Data files installed in: /usr/share/llvm-0.9.0.1/ghc-7.0.1
Documentation installed in: /usr/share/doc/llvm-0.9.0.1
Using alex version 2.3.4 found on system at: /usr/bin/alex
Using ar found on system at: /usr/bin/ar
Using c2hs version 0.16.2 found on system at: /usr/bin/c2hs
Using cpphs version 1.11 found on system at: /usr/bin/cpphs
No ffihugs found
Using gcc version 4.5.1 found on system at: /usr/bin/gcc
Using ghc version 7.0.1 given by user at: /usr/bin/ghc
Using ghc-pkg version 7.0.1 given by user at: /usr/bin/ghc-pkg
No greencard found
Using haddock version 2.8.0 given by user at: /usr/bin/haddock
Using happy version 1.18.6 found on system at: /usr/bin/happy
No hmake found
Using hsc2hs version 0.67 found on system at: /usr/bin/hsc2hs
Using hscolour version 1.17 found on system at: /usr/bin/HsColour
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.25 found on system at: /usr/bin/pkg-config
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
sh configure --with-compiler=/usr/bin/ghc --with-hc-pkg=/usr/bin/ghc-pkg
--prefix=/usr --libdir=/usr/lib64 --datadir=/usr/share/
configure: WARNING: unrecognized options: --with-hc-pkg
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for llvm-config-2.7... no
checking for llvm-config... /usr/bin/llvm-config
Target platform inferred as: x86_64-unknown-linux
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking llvm-c/Core.h usability... yes
checking llvm-c/Core.h presence... yes
checking for llvm-c/Core.h... yes
checking for LLVMModuleCreateWithName in -lLLVMCore... yes
configure: creating ./config.status
config.status: creating llvm.buildinfo
configure: WARNING: unrecognized options: --with-hc-pkg
Reading parameters from ./llvm.buildinfo
>>> Done src_configure
>>> Starting builtin_saveenv
>>> Done builtin_saveenv
>>> Completed ebuild phases loadenv configure saveenv
>>> Running ebuild phases loadenv compile saveenv as portage:portage...
>>> Starting builtin_loadenv
>>> Done builtin_loadenv
>>> Starting src_compile
Preprocessing library llvm-0.9.0.1...
In file included from /usr/lib64/ghc-7.0.1/template-hsc.h:4:0,
                 from dist/build/LLVM/FFI/Analysis_hsc_make.c:1:
/usr/lib64/ghc-7.0.1/include/HsFFI.h:29:0: warning:
"__STDC_LIMIT_MACROS" redefined
<command-line>:0:0: note: this is the location of the previous
definition
In file included from /usr/lib64/ghc-7.0.1/template-hsc.h:4:0,
                 from dist/build/LLVM/FFI/BitReader_hsc_make.c:1:
/usr/lib64/ghc-7.0.1/include/HsFFI.h:29:0: warning:
"__STDC_LIMIT_MACROS" redefined
<command-line>:0:0: note: this is the location of the previous
definition
In file included from /usr/lib64/ghc-7.0.1/template-hsc.h:4:0,
                 from dist/build/LLVM/FFI/BitWriter_hsc_make.c:1:
/usr/lib64/ghc-7.0.1/include/HsFFI.h:29:0: warning:
"__STDC_LIMIT_MACROS" redefined
<command-line>:0:0: note: this is the location of the previous
definition
In file included from /usr/lib64/ghc-7.0.1/template-hsc.h:4:0,
                 from dist/build/LLVM/FFI/Core_hsc_make.c:1:
/usr/lib64/ghc-7.0.1/include/HsFFI.h:29:0: warning:
"__STDC_LIMIT_MACROS" redefined
<command-line>:0:0: note: this is the location of the previous
definition
In file included from /usr/lib64/ghc-7.0.1/template-hsc.h:4:0,
                 from dist/build/LLVM/FFI/ExecutionEngine_hsc_make.c:1:
/usr/lib64/ghc-7.0.1/include/HsFFI.h:29:0: warning:
"__STDC_LIMIT_MACROS" redefined
<command-line>:0:0: note: this is the location of the previous
definition
In file included from /usr/lib64/ghc-7.0.1/template-hsc.h:4:0,
                 from dist/build/LLVM/FFI/Target_hsc_make.c:1:
/usr/lib64/ghc-7.0.1/include/HsFFI.h:29:0: warning:
"__STDC_LIMIT_MACROS" redefined
<command-line>:0:0: note: this is the location of the previous
definition
In file included from /usr/lib64/ghc-7.0.1/template-hsc.h:4:0,
                 from dist/build/LLVM/FFI/Transforms/IPO_hsc_make.c:1:
/usr/lib64/ghc-7.0.1/include/HsFFI.h:29:0: warning:
"__STDC_LIMIT_MACROS" redefined
<command-line>:0:0: note: this is the location of the previous
definition
In file included from /usr/lib64/ghc-7.0.1/template-hsc.h:4:0,
                 from
dist/build/LLVM/FFI/Transforms/Scalar_hsc_make.c:1:
/usr/lib64/ghc-7.0.1/include/HsFFI.h:29:0: warning:
"__STDC_LIMIT_MACROS" redefined
<command-line>:0:0: note: this is the location of the previous
definition
Building llvm-0.9.0.1...
[ 1 of 40] Compiling LLVM.Target.XCore ( LLVM/Target/XCore.hs,
dist/build/LLVM/Target/XCore.o )
[ 2 of 40] Compiling LLVM.Target.SystemZ ( LLVM/Target/SystemZ.hs,
dist/build/LLVM/Target/SystemZ.o )
[ 3 of 40] Compiling LLVM.Target.Sparc ( LLVM/Target/Sparc.hs,
dist/build/LLVM/Target/Sparc.o )
[ 4 of 40] Compiling LLVM.Target.PowerPC ( LLVM/Target/PowerPC.hs,
dist/build/LLVM/Target/PowerPC.o )
[ 5 of 40] Compiling LLVM.Target.PIC16 ( LLVM/Target/PIC16.hs,
dist/build/LLVM/Target/PIC16.o )
[ 6 of 40] Compiling LLVM.Target.X86  ( LLVM/Target/X86.hs,
dist/build/LLVM/Target/X86.o )
[ 7 of 40] Compiling LLVM.Target.Mips ( LLVM/Target/Mips.hs,
dist/build/LLVM/Target/Mips.o )
[ 8 of 40] Compiling LLVM.Target.MSP430 ( LLVM/Target/MSP430.hs,
dist/build/LLVM/Target/MSP430.o )
[ 9 of 40] Compiling LLVM.Target.MSIL ( LLVM/Target/MSIL.hs,
dist/build/LLVM/Target/MSIL.o )
[10 of 40] Compiling LLVM.Target.CppBackend ( LLVM/Target/CppBackend.hs,
dist/build/LLVM/Target/CppBackend.o )
[11 of 40] Compiling LLVM.Target.CellSPU ( LLVM/Target/CellSPU.hs,
dist/build/LLVM/Target/CellSPU.o )
[12 of 40] Compiling LLVM.Target.CBackend ( LLVM/Target/CBackend.hs,
dist/build/LLVM/Target/CBackend.o )
[13 of 40] Compiling LLVM.Target.Blackfin ( LLVM/Target/Blackfin.hs,
dist/build/LLVM/Target/Blackfin.o )
[14 of 40] Compiling LLVM.Target.Alpha ( LLVM/Target/Alpha.hs,
dist/build/LLVM/Target/Alpha.o )
[15 of 40] Compiling LLVM.Target.ARM  ( LLVM/Target/ARM.hs,
dist/build/LLVM/Target/ARM.o )
[16 of 40] Compiling LLVM.Util.Foreign ( LLVM/Util/Foreign.hs,
dist/build/LLVM/Util/Foreign.o )
[17 of 40] Compiling LLVM.Target.Native ( LLVM/Target/Native.hs,
dist/build/LLVM/Target/Native.o )
[18 of 40] Compiling LLVM.FFI.Core    ( dist/build/LLVM/FFI/Core.hs,
dist/build/LLVM/FFI/Core.o )
[19 of 40] Compiling LLVM.FFI.Analysis
( dist/build/LLVM/FFI/Analysis.hs, dist/build/LLVM/FFI/Analysis.o )
[20 of 40] Compiling LLVM.FFI.BitReader
( dist/build/LLVM/FFI/BitReader.hs, dist/build/LLVM/FFI/BitReader.o )
[21 of 40] Compiling LLVM.FFI.BitWriter
( dist/build/LLVM/FFI/BitWriter.hs, dist/build/LLVM/FFI/BitWriter.o )
[22 of 40] Compiling LLVM.FFI.Target  ( dist/build/LLVM/FFI/Target.hs,
dist/build/LLVM/FFI/Target.o )
[23 of 40] Compiling LLVM.FFI.ExecutionEngine
( dist/build/LLVM/FFI/ExecutionEngine.hs,
dist/build/LLVM/FFI/ExecutionEngine.o )
[24 of 40] Compiling LLVM.FFI.Transforms.IPO
( dist/build/LLVM/FFI/Transforms/IPO.hs,
dist/build/LLVM/FFI/Transforms/IPO.o )
[25 of 40] Compiling LLVM.FFI.Transforms.Scalar
( dist/build/LLVM/FFI/Transforms/Scalar.hs,
dist/build/LLVM/FFI/Transforms/Scalar.o )
[26 of 40] Compiling LLVM.Core.Util   ( LLVM/Core/Util.hs,
dist/build/LLVM/Core/Util.o )
[27 of 40] Compiling LLVM.Core.CodeGenMonad ( LLVM/Core/CodeGenMonad.hs,
dist/build/LLVM/Core/CodeGenMonad.o )
[28 of 40] Compiling LLVM.Util.Optimize ( LLVM/Util/Optimize.hs,
dist/build/LLVM/Util/Optimize.o )
[29 of 40] Compiling LLVM.Core.Data   ( LLVM/Core/Data.hs,
dist/build/LLVM/Core/Data.o )
[30 of 40] Compiling LLVM.Core.Type   ( LLVM/Core/Type.hs,
dist/build/LLVM/Core/Type.o )
[31 of 40] Compiling LLVM.Core.CodeGen ( LLVM/Core/CodeGen.hs,
dist/build/LLVM/Core/CodeGen.o )
[32 of 40] Compiling LLVM.ExecutionEngine.Engine
( LLVM/ExecutionEngine/Engine.hs,
dist/build/LLVM/ExecutionEngine/Engine.o )
[33 of 40] Compiling LLVM.ExecutionEngine.Target
( LLVM/ExecutionEngine/Target.hs,
dist/build/LLVM/ExecutionEngine/Target.o )
[34 of 40] Compiling LLVM.Core.Vector ( LLVM/Core/Vector.hs,
dist/build/LLVM/Core/Vector.o )
[35 of 40] Compiling LLVM.Core.Instructions ( LLVM/Core/Instructions.hs,
dist/build/LLVM/Core/Instructions.o )
[36 of 40] Compiling LLVM.Core        ( LLVM/Core.hs,
dist/build/LLVM/Core.o )
[37 of 40] Compiling LLVM.ExecutionEngine ( LLVM/ExecutionEngine.hs,
dist/build/LLVM/ExecutionEngine.o )
[38 of 40] Compiling LLVM.Util.Loop   ( LLVM/Util/Loop.hs,
dist/build/LLVM/Util/Loop.o )
[39 of 40] Compiling LLVM.Util.Arithmetic ( LLVM/Util/Arithmetic.hs,
dist/build/LLVM/Util/Arithmetic.o )

LLVM/Util/Arithmetic.hs:17:1:
    Warning: The import of `Data.TypeLevel' is redundant
               except perhaps to import instances from `Data.TypeLevel'
             To import instances alone, use: import Data.TypeLevel[40 of
40] Compiling LLVM.Util.File   ( LLVM/Util/File.hs,
dist/build/LLVM/Util/File.o )
()
Registering llvm-0.9.0.1...
Running Haddock for llvm-0.9.0.1...
Preprocessing library llvm-0.9.0.1...
Running hscolour for llvm-0.9.0.1...
Warning: The documentation for the following packages are not installed.
No
links will be generated to these packages: ffi-1.0, rts-1.0
Warning: LLVM.Core: constOf is exported separately but will be
documented under IsConst. Consider exporting it together with its
parent(s) for code clarity.
Warning: LLVM.ExecutionEngine: unsafePurify is exported separately but
will be documented under Unsafe. Consider exporting it together with its
parent(s) for code clarity.
Warning: LLVM.FFI.Core: could not find link destinations for:
    LLVM.FFI.Core.TypeHandleRef LLVM.FFI.Core.CAttribute
Warning: LLVM.FFI.ExecutionEngine: could not find link destinations for:
    LLVM.FFI.ExecutionEngine.ExecutionEngineRef
Warning: LLVM.Core: could not find link destinations for:
    LLVM.Core.CodeGen.FA LLVM.Core.CodeGen.IsConstFields
LLVM.Core.Instructions.GetField LLVM.Core.Type.StructFields
Data.TypeLevel.Num.Sets.NatI Data.TypeLevel.Num.Sets.PosI
LLVM.Core.Type.PtrSize LLVM.Core.CodeGen.IsConstStruct
LLVM.Core.Vector.MkVector LLVM.Util.Arithmetic.LiftTuple
LLVM.Core.CodeGenMonad.CGFState LLVM.Util.Arithmetic.UncurryN
LLVM.Core.CodeGenMonad.CGMState
Warning: LLVM.ExecutionEngine: could not find link destinations for:
    LLVM.ExecutionEngine.Engine.EAState LLVM.ExecutionEngine.Target.Type
Warning: LLVM.Util.Arithmetic: could not find link destinations for:
    LLVM.Util.Arithmetic.UncurryN LLVM.Util.Arithmetic.LiftTuple
Documentation created: dist/doc/html/llvm/index.html
>>> Done src_compile
>>> Starting builtin_saveenv
>>> Done builtin_saveenv
>>> Completed ebuild phases loadenv compile saveenv
>>> Running ebuild phases loadenv install saveenv as root:root...
>>> Starting builtin_loadenv
>>> Done builtin_loadenv
>>> Starting src_install
Installing library in
/var/tmp/paludis/dev-haskell-llvm-0.9.0.1/image/usr/lib64/llvm-0.9.0.1/ghc-7.0.1
setup: Generate Reg File not supported
/var/tmp/paludis/dev-haskell-llvm-0.9.0.1/temp/loadsaveenv: line
3623: /var/tmp/paludis/dev-haskell-llvm-0.9.0.1/temp//llvm-0.9.0.1.conf:
No such file or directory

My point was rather that hackage should not show it as ghc-7.0-buildable
then llvm in specific.

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://projects.haskell.org/pipermail/haskell-llvm/attachments/20101207/36451019/attachment-0001.pgp 


More information about the Haskell-llvm mailing list