Skip to content

unhandled function attribute enum value: FunctionAttributeKind 26 #16

Closed

Description

@Gavazzi1

Hi,

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.

Thanks!

Activity

  1. deian commented on Feb 17, 2021

    @deian
    Member

    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

  2. Gavazzi1 commented on Feb 17, 2021

    @Gavazzi1
    Author

    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

  3. Gavazzi1 commented on Feb 20, 2021

    @Gavazzi1
    Author

    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

  4. Gavazzi1 commented on Mar 21, 2021

    @Gavazzi1
    Author

    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:

    1. In the extra-deps section, removed llvm-hs and llvm-hs-pure
    2. 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.

  5. shrebhan commented on Apr 15, 2022

    @shrebhan

    @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions