Skip to content

Lexical error ! The character '#' does not fit here #268

Closed
@romanofski

Description

@romanofski

I've run into this problem while packaging https://github.com/purebred-mua/hs-notmuch for Fedora 34 and beyond. The build failed with:

+ LANG=C.utf8
+ ./Setup build
Preprocessing library for notmuch-0.3.0.0..
c2hs: C header contains errors:
dist/build/Notmuch/Binding.i:1: (column 1) [ERROR]  >>> Lexical error !
  The character '#' does not fit here.
error: Bad exit status from /var/tmp/rpm-tmp.HyB7BW (%build)
    Bad exit status from /var/tmp/rpm-tmp.HyB7BW (%build)

A preliminary search showed, that it might be LANG related, however setting it to C doesn't change the error we're running into. I'm attaching the generated Binding.i.txt. It doesn't look odd to me, however I'm new to it all so I don't spot what is wrong with it if it's something obvious to the experienced.

Logs for the working Fedora 33 build: Dependencies, Build log, other logs

Logs for the failing Fedora 34 build: Dependencies, Build log, other logs

The logs for the c2hs build are accessible here: https://copr.fedorainfracloud.org/coprs/romanofski/purebred/build/2091487/ in case that matters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions