Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while building reopt #52

Closed
monkbai opened this issue Nov 12, 2020 · 1 comment
Closed

Error while building reopt #52

monkbai opened this issue Nov 12, 2020 · 1 comment

Comments

@monkbai
Copy link

monkbai commented Nov 12, 2020

Build errors:

Failed to build reopt-0.1.0.
Build log (
/home/lifter/.cabal/logs/ghc-8.6.3/reopt-0.1.0-4c93af2623a0806b496051257d405d45c4692164fbb8e447b413bab21182ef14.log
):
Configuring library for reopt-0.1.0..
Preprocessing library for reopt-0.1.0..
Building library for reopt-0.1.0..
[ 1 of 18] Compiling Reopt.Analysis.Domains.DiffEquations ( src/Reopt/Analysis/Domains/DiffEquations.hs, dist/build/Reopt/Analysis/Domains/DiffEquations.o )
[ 2 of 18] Compiling Reopt.CFG.FnRep  ( src/Reopt/CFG/FnRep.hs, dist/build/Reopt/CFG/FnRep.o )
[ 3 of 18] Compiling Reopt.CFG.FnRep.X86 ( src/Reopt/CFG/FnRep/X86.hs, dist/build/Reopt/CFG/FnRep/X86.o )
[ 4 of 18] Compiling Reopt.CFG.FunctionCheck ( src/Reopt/CFG/FunctionCheck.hs, dist/build/Reopt/CFG/FunctionCheck.o )
[ 5 of 18] Compiling Reopt.CFG.LLVM   ( src/Reopt/CFG/LLVM.hs, dist/build/Reopt/CFG/LLVM.o )

src/Reopt/CFG/LLVM.hs:493:29: error:
    Ambiguous occurrence ‘withArchConstraints’
    It could refer to either ‘Data.Macaw.X86.withArchConstraints’,
                             imported from ‘Data.Macaw.X86’ at src/Reopt/CFG/LLVM.hs:91:1-31
                             (and originally defined in ‘Data.Macaw.Architecture.Info’)
                          or ‘Reopt.CFG.LLVM.withArchConstraints’,
                             defined at src/Reopt/CFG/LLVM.hs:393:5
    |
493 | valueToLLVM ctx avmap val = withArchConstraints ctx $ do
    |                             ^^^^^^^^^^^^^^^^^^^

src/Reopt/CFG/LLVM.hs:684:5: error:
    Not in scope: data constructor ‘MkTuple’
    |
684 |     MkTuple fieldTypes fields -> do
    |     ^^^^^^^

src/Reopt/CFG/LLVM.hs:802:17: error:
    Ambiguous occurrence ‘archEndianness’
    It could refer to either ‘Data.Macaw.X86.archEndianness’,
                             imported from ‘Data.Macaw.X86’ at src/Reopt/CFG/LLVM.hs:91:1-31
                             (and originally defined in ‘Data.Macaw.Architecture.Info’)
                          or ‘Reopt.CFG.LLVM.archEndianness’,
                             defined at src/Reopt/CFG/LLVM.hs:355:5
    |
802 |   req <- asks $ archEndianness . archFns
    |                 ^^^^^^^^^^^^^^

src/Reopt/CFG/LLVM.hs:878:3: error:
    Ambiguous occurrence ‘withArchConstraints’
    It could refer to either ‘Data.Macaw.X86.withArchConstraints’,
                             imported from ‘Data.Macaw.X86’ at src/Reopt/CFG/LLVM.hs:91:1-31
                             (and originally defined in ‘Data.Macaw.Architecture.Info’)
                          or ‘Reopt.CFG.LLVM.withArchConstraints’,
                             defined at src/Reopt/CFG/LLVM.hs:393:5
    |
878 |   withArchConstraints ctx m
    |   ^^^^^^^^^^^^^^^^^^^

src/Reopt/CFG/LLVM.hs:1253:30: error:
    Ambiguous occurrence ‘withArchConstraints’
    It could refer to either ‘Data.Macaw.X86.withArchConstraints’,
                             imported from ‘Data.Macaw.X86’ at src/Reopt/CFG/LLVM.hs:91:1-31
                             (and originally defined in ‘Data.Macaw.Architecture.Info’)
                          or ‘Reopt.CFG.LLVM.withArchConstraints’,
                             defined at src/Reopt/CFG/LLVM.hs:393:5
     |
1253 |                            , withArchConstraints = \x -> x
     |                              ^^^^^^^^^^^^^^^^^^^
cabal: Failed to build reopt-0.1.0 (which is required by exe:reopt from
reopt-0.1.0 and exe:reopt-relink from reopt-0.1.0). See the build log above
for details.

GHC version:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.3
$ cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library

@joehendrix
Copy link
Contributor

Thanks for the bug report. Macaw-x86 added some additional exports that conflict with Reopt internals.

What is your interest in Reopt? I'd suggest trying out the jhx/new-relinker branch or using an older Macaw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants