bscarlet / llvm-general

Rich LLVM bindings for Haskell (with transfer of LLVM IR to and from C++, detailed compilation pass control, etc.)
http://hackage.haskell.org/package/llvm-general
132 stars 38 forks source link

‘readsPrec1’ is not a (visible) method of class ‘Read1’ #163

Closed robstewart57 closed 8 years ago

robstewart57 commented 8 years ago

Hi,

I'm using GHC 7.10. When running cabal install I get the error:

src/Control/Monad/Exceptable.hs:153:61:
    ‘readsPrec1’ is not a (visible) method of class ‘Read1’

What should I do to solve this issue?

The full error message is:

Building llvm-general-3.5.1.0...
Failed to install llvm-general-3.5.1.0
Build log ( /home/rob/.cabal/logs/llvm-general-3.5.1.0.log ):
[1 of 1] Compiling Main             ( /tmp/cabal-tmp-4368/llvm-general-3.5.1.0/dist/setup/setup.hs, /tmp/cabal-tmp-4368/llvm-general-3.5.1.0/dist/setup/Main.o )
Linking /tmp/cabal-tmp-4368/llvm-general-3.5.1.0/dist/setup/setup ...
Configuring llvm-general-3.5.1.0...
Building llvm-general-3.5.1.0...
Preprocessing library llvm-general-3.5.1.0...
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
[ 1 of 93] Compiling LLVM.General.Internal.FFI.ByteRangeCallback ( src/LLVM/General/Internal/FFI/ByteRangeCallback.hs, dist/build/LLVM/General/Internal/FFI/ByteRangeCallback.o )
[ 2 of 93] Compiling LLVM.General.Internal.FFI.Transforms ( src/LLVM/General/Internal/FFI/Transforms.hs, dist/build/LLVM/General/Internal/FFI/Transforms.o )
[ 3 of 93] Compiling LLVM.General.Internal.Inject ( src/LLVM/General/Internal/Inject.hs, dist/build/LLVM/General/Internal/Inject.o )
[ 4 of 93] Compiling LLVM.General.Internal.FFI.Context ( src/LLVM/General/Internal/FFI/Context.hs, dist/build/LLVM/General/Internal/FFI/Context.o )
[ 5 of 93] Compiling LLVM.General.Internal.FFI.CommandLine ( src/LLVM/General/Internal/FFI/CommandLine.hs, dist/build/LLVM/General/Internal/FFI/CommandLine.o )
[ 6 of 93] Compiling LLVM.General.Internal.FFI.Iterate ( src/LLVM/General/Internal/FFI/Iterate.hs, dist/build/LLVM/General/Internal/FFI/Iterate.o )
[ 7 of 93] Compiling LLVM.General.Internal.FFI.PtrHierarchy ( src/LLVM/General/Internal/FFI/PtrHierarchy.hs, dist/build/LLVM/General/Internal/FFI/PtrHierarchy.o )
[ 8 of 93] Compiling LLVM.General.Internal.FFI.BasicBlock ( src/LLVM/General/Internal/FFI/BasicBlock.hs, dist/build/LLVM/General/Internal/FFI/BasicBlock.o )
[ 9 of 93] Compiling LLVM.General.Internal.FFI.User ( src/LLVM/General/Internal/FFI/User.hs, dist/build/LLVM/General/Internal/FFI/User.o )
[10 of 93] Compiling LLVM.General.Internal.FFI.GlobalAlias ( src/LLVM/General/Internal/FFI/GlobalAlias.hs, dist/build/LLVM/General/Internal/FFI/GlobalAlias.o )
[11 of 93] Compiling LLVM.General.Internal.FFI.LLVMCTypes ( dist/build/LLVM/General/Internal/FFI/LLVMCTypes.hs, dist/build/LLVM/General/Internal/FFI/LLVMCTypes.o )
[12 of 93] Compiling LLVM.General.Internal.FFI.Attribute ( src/LLVM/General/Internal/FFI/Attribute.hs, dist/build/LLVM/General/Internal/FFI/Attribute.o )
[13 of 93] Compiling LLVM.General.Internal.FFI.GlobalValue ( src/LLVM/General/Internal/FFI/GlobalValue.hs, dist/build/LLVM/General/Internal/FFI/GlobalValue.o )
[14 of 93] Compiling LLVM.General.Internal.FFI.Instruction ( src/LLVM/General/Internal/FFI/Instruction.hs, dist/build/LLVM/General/Internal/FFI/Instruction.o )
[15 of 93] Compiling LLVM.General.Internal.FFI.Type ( src/LLVM/General/Internal/FFI/Type.hs, dist/build/LLVM/General/Internal/FFI/Type.o )
[16 of 93] Compiling LLVM.General.Internal.FFI.Value ( src/LLVM/General/Internal/FFI/Value.hs, dist/build/LLVM/General/Internal/FFI/Value.o )
[17 of 93] Compiling LLVM.General.Internal.FFI.BinaryOperator ( src/LLVM/General/Internal/FFI/BinaryOperator.hs, dist/build/LLVM/General/Internal/FFI/BinaryOperator.o )
[18 of 93] Compiling LLVM.General.Internal.FFI.DataLayout ( src/LLVM/General/Internal/FFI/DataLayout.hs, dist/build/LLVM/General/Internal/FFI/DataLayout.o )
[19 of 93] Compiling LLVM.General.Internal.FFI.SMDiagnostic ( src/LLVM/General/Internal/FFI/SMDiagnostic.hs, dist/build/LLVM/General/Internal/FFI/SMDiagnostic.o )
[20 of 93] Compiling LLVM.General.Internal.FFI.Module ( src/LLVM/General/Internal/FFI/Module.hs, dist/build/LLVM/General/Internal/FFI/Module.o )
[21 of 93] Compiling LLVM.General.Internal.FFI.ExecutionEngine ( src/LLVM/General/Internal/FFI/ExecutionEngine.hs, dist/build/LLVM/General/Internal/FFI/ExecutionEngine.o )
[22 of 93] Compiling LLVM.General.Internal.FFI.Function ( src/LLVM/General/Internal/FFI/Function.hs, dist/build/LLVM/General/Internal/FFI/Function.o )
[23 of 93] Compiling LLVM.General.Internal.FFI.InlineAssembly ( src/LLVM/General/Internal/FFI/InlineAssembly.hs, dist/build/LLVM/General/Internal/FFI/InlineAssembly.o )
[24 of 93] Compiling LLVM.General.Internal.FFI.InstructionDefs ( dist/build/LLVM/General/Internal/FFI/InstructionDefs.hs, dist/build/LLVM/General/Internal/FFI/InstructionDefs.o )
[25 of 93] Compiling LLVM.General.Internal.InstructionDefs ( src/LLVM/General/Internal/InstructionDefs.hs, dist/build/LLVM/General/Internal/InstructionDefs.o )
[26 of 93] Compiling LLVM.General.Internal.FFI.MemoryBuffer ( src/LLVM/General/Internal/FFI/MemoryBuffer.hs, dist/build/LLVM/General/Internal/FFI/MemoryBuffer.o )
[27 of 93] Compiling LLVM.General.Internal.FFI.Metadata ( src/LLVM/General/Internal/FFI/Metadata.hs, dist/build/LLVM/General/Internal/FFI/Metadata.o )
[28 of 93] Compiling LLVM.General.Internal.FFI.GlobalVariable ( src/LLVM/General/Internal/FFI/GlobalVariable.hs, dist/build/LLVM/General/Internal/FFI/GlobalVariable.o )
[29 of 93] Compiling LLVM.General.Internal.FFI.RawOStream ( src/LLVM/General/Internal/FFI/RawOStream.hs, dist/build/LLVM/General/Internal/FFI/RawOStream.o )
[30 of 93] Compiling LLVM.General.Internal.FFI.Assembly ( src/LLVM/General/Internal/FFI/Assembly.hs, dist/build/LLVM/General/Internal/FFI/Assembly.o )
[31 of 93] Compiling LLVM.General.Internal.FFI.Bitcode ( src/LLVM/General/Internal/FFI/Bitcode.hs, dist/build/LLVM/General/Internal/FFI/Bitcode.o )
[32 of 93] Compiling LLVM.General.Internal.FFI.Target ( src/LLVM/General/Internal/FFI/Target.hs, dist/build/LLVM/General/Internal/FFI/Target.o )
[33 of 93] Compiling LLVM.General.Internal.FFI.Threading ( src/LLVM/General/Internal/FFI/Threading.hs, dist/build/LLVM/General/Internal/FFI/Threading.o )
[34 of 93] Compiling LLVM.General.Internal.FFI.Cleanup ( src/LLVM/General/Internal/FFI/Cleanup.hs, dist/build/LLVM/General/Internal/FFI/Cleanup.o )
[35 of 93] Compiling LLVM.General.Internal.FFI.Constant ( src/LLVM/General/Internal/FFI/Constant.hs, dist/build/LLVM/General/Internal/FFI/Constant.o )
[36 of 93] Compiling LLVM.General.Internal.FFI.Builder ( src/LLVM/General/Internal/FFI/Builder.hs, dist/build/LLVM/General/Internal/FFI/Builder.o )
[37 of 93] Compiling LLVM.General.Internal.FFI.Analysis ( src/LLVM/General/Internal/FFI/Analysis.hs, dist/build/LLVM/General/Internal/FFI/Analysis.o )
[38 of 93] Compiling Control.Monad.Exceptable ( src/Control/Monad/Exceptable.hs, dist/build/Control/Monad/Exceptable.o )

src/Control/Monad/Exceptable.hs:153:61:
    ‘readsPrec1’ is not a (visible) method of class ‘Read1’

I have LLVM 3.5 installed:

clang -v
clang version 3.5.0 (tags/RELEASE_350/final)
Target: i386-redhat-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-redhat-linux/5.1.1
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/5.1.1
Selected GCC installation: /usr/bin/../lib/gcc/i686-redhat-linux/5.1.1
Candidate multilib: .;@m32
Selected multilib: .;@m32
bscarlet commented 8 years ago

That's a consequence of a breaking change in the transformers package, introduced in transformers-0.5.0.0. The latest llvm-general adds the constraint transformers < 0.5 to express its dependency on the older API.

robstewart57 commented 8 years ago

Ah excellent, then I'll change my projects to rely on llvm-general > 3.5.1.2.