zhangyz / llvm-slicing

Symbolic Program Slicing with LLVM
Apache License 2.0
74 stars 13 forks source link

Build errors #4

Open divya84 opened 8 years ago

divya84 commented 8 years ago

Hello,

When trying to do cabal install I get a series of errors of this form:

src/Data/LLVM/Types/Attributes.chs:86:10: No instance for (GHC.Generics.Generic SynchronizationScope) arising from a use of Control.DeepSeq.$gdmrnf' In the expression: Control.DeepSeq.$gdmrnf In an equation forrnf': rnf = Control.DeepSeq.$gdmrnf In the instance declaration for `NFData SynchronizationScope'

src/Data/LLVM/Types/Attributes.chs:105:10: No instance for (GHC.Generics.Generic AtomicOperation) arising from a use of Control.DeepSeq.$gdmrnf' In the expression: Control.DeepSeq.$gdmrnf In an equation forrnf': rnf = Control.DeepSeq.$gdmrnf In the instance declaration for `NFData AtomicOperation' ....

cabal: Error: some packages failed to install: llvm-analysis-0.3.0 depends on llvm-base-types-0.3.0 which failed to install. llvm-base-types-0.3.0 failed during the building phase. The exception was: ExitFailure 1 llvm-data-interop-0.3.0 depends on llvm-base-types-0.3.0 which failed to install. llvm-slicing-0.3.3 depends on llvm-base-types-0.3.0 which failed to install.''

I am not familiar with Haskell so I don't know what to make of these. Could you help? Thanks

zhangyz commented 8 years ago

It seems that the version of Haskell library deepseq installed in your computer does not meet (e.g. higher) the requirement for Haskell libray llvm-base-types. There are two solutions: 1) uninstall your higher version of deepseq, reinstall its lower one, and try them again; or 2) directly download our pre-built binary in the folder bin/. In addition, for more detailed install information about llvm-analysis, please see its website: http://hackage.haskell.org/package/llvm-analysis. I strongly recommend you to select Solution 2, since you are now a Haskell newbie. Thanks for your interest in our llvm-slicing.

divya84 commented 8 years ago

Hi, Thanks for your answer. I was able to get the binary working. Is there any way to relate the line numbers back to corresponding functions in the source (alternatively print the corresponding source line)?

zhangyz commented 8 years ago

llvm-slicing now does not support that function, since it just focuses on IR programs. BTW, you may try it by using text-search techniques in source files.

divya84 commented 8 years ago

Hi,

Thanks. We are trying to run the slicer on memcached(+libevent) for an academic project. The slicer seems to run for a few minutes and then the memory consumption skyrockets to 10 GB and the process gets killed. I was wondering what the reason might be. Have you run the slicer on large programs?

zhangyz commented 8 years ago

Sorry, I do not know the reason of that case in your computation environment. Everything runs smoothly on my side, with some large test programs as shown in the folder test/C, ranging up to 336,800 instructions in size.