You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unhandled function attribute enum value: FunctionAttributeKind 26 #16
I'm trying to run Sys from the Docker image on a large code base I built using wllvm, but I'm getting this error when I run any of the checkers:
unhandled function attribute enum value: FunctionAttributeKind 26
CallStack (from HasCallStack):
error, called at src/LLVM/Internal/Attribute.hs:210:17 in llvm-hs-9.0.1-GdcY7lIsVQ6GWzw7sPUMKI:LLVM.Internal.Attribute
Not sure if this is a result of something I'm doing wrong or if llvm-hs is the problem. Any help would be greatly appreciated.
Nope, this is not on you. This is an llvm-hs problem. I hinted on how to go about this here #15 (comment). Happy to update llvm-hs dependency if you end up fixing the issue. If it's too much of a pain: if you can give me a .bc/.ll file I can take on both of these issues soon-ish
Having some trouble building llvm-hs from source but I'll keep trying some things. In the mean time here's a .bc file that's causing the error. Thanks again! failing bc file.zip
I got this fixed! It's the same problem as in this issue where llvm-hs doesn't support the NoFree attribute. The commit that fixed this hasn't been incorporated into latest version of llvm-hs in Hackage, so you have to build it from source
Sure thing! To build llvm-hs from source in the Docker image, I first cloned the llvm-hs repo into the image. Then, in the stack.yml file in Sys, I did two things:
In the extra-deps section, removed llvm-hs and llvm-hs-pure
In the packages section, added the paths to the llvm-hs and llvm-hs-pure directories in the llvm-hs repo
You can look at my fork of Sys to see how I did it. After that, you should be able to call stack build as usual.
@Gavazzi1@deian Hello! I am facing this issue while parsing a .ll file generated using gllvm, and I want to build llvm-hs from source, are there any steps for this using Cabal ? My project isn't a big project so it doesn't have a project file, I've done all the installation manually. I have cloned the llvm-hs repo, checked out to the llvm-9 branch (which has this fix - llvm-hs/llvm-hs#284) but not sure what to do after this, if someone could help me with the steps, it would be great
Activity
deian commentedon Feb 17, 2021
Nope, this is not on you. This is an llvm-hs problem. I hinted on how to go about this here #15 (comment). Happy to update llvm-hs dependency if you end up fixing the issue. If it's too much of a pain: if you can give me a .bc/.ll file I can take on both of these issues soon-ish
Gavazzi1 commentedon Feb 17, 2021
Having some trouble building llvm-hs from source but I'll keep trying some things. In the mean time here's a .bc file that's causing the error. Thanks again!
failing bc file.zip
Gavazzi1 commentedon Feb 20, 2021
I got this fixed! It's the same problem as in this issue where llvm-hs doesn't support the NoFree attribute. The commit that fixed this hasn't been incorporated into latest version of llvm-hs in Hackage, so you have to build it from source
Gavazzi1 commentedon Mar 21, 2021
Sure thing! To build llvm-hs from source in the Docker image, I first cloned the llvm-hs repo into the image. Then, in the stack.yml file in Sys, I did two things:
You can look at my fork of Sys to see how I did it. After that, you should be able to call
stack buildas usual.shrebhan commentedon Apr 15, 2022
@Gavazzi1 @deian Hello! I am facing this issue while parsing a .ll file generated using gllvm, and I want to build llvm-hs from source, are there any steps for this using Cabal ? My project isn't a big project so it doesn't have a project file, I've done all the installation manually. I have cloned the llvm-hs repo, checked out to the llvm-9 branch (which has this fix - llvm-hs/llvm-hs#284) but not sure what to do after this, if someone could help me with the steps, it would be great