Skip to content

Bindgen failing only in a Github pipeline #2855

Answered by KnorrFG
KnorrFG asked this question in Q&A
Discussion options

You must be logged in to vote

I did what you proposed, but since the order was random, the dumps were hard to compare. So I sorted the headers before adding them via the header method. This made the problem go away, in all places, without include guards.

My untested assumption is the following: if you add a file via header, the #pragma once is ignored. If you have two files, a.h and b.h, where b.h includes a.h, and you add b.h first, then clang/bindgen will process the contents of a.h indirectly first, and then a second time, when it is a.h's turn. If it's the other way around, the include guard works, when a.h is encountered indirectly while processing b.h. This also makes sense because the header list is generated f…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@pvdrz
Comment options

@KnorrFG
Comment options

@pvdrz
Comment options

@KnorrFG
Comment options

Answer selected by KnorrFG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants