Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building the demo segfaults #168

Closed
Volker-Weissmann opened this issue Jan 5, 2021 · 7 comments
Closed

building the demo segfaults #168

Volker-Weissmann opened this issue Jan 5, 2021 · 7 comments

Comments

@Volker-Weissmann
Copy link

Hello,

I initially reported this bug in the rustc repository, but since someone noted, that this bug has to do with the way you load llvm it might be a bug in autocxx, so I decided to tell you of the existance of this bug:

rust-lang/rust#80725

@adetaylor
Copy link
Collaborator

Thanks very much indeed for reporting this and doing the legwork.

Although autocxx doesn't itself use llvm, it does (boldly) attempt to use bindgen from within a procedural macro, and that seems unwise for a variety of reasons.

#51 is the plan to move away from that model. I will expedite! I may decided to close this as a duplicate of #51 but I'll keep it open for now.

@Volker-Weissmann
Copy link
Author

Volker-Weissmann commented Jan 5, 2021

Thank you for writing that patch.
Do you know of any Duct-Tape hotfix I can use to try out autocxx? Because I wrote a 2000 lines patch for bindgen and if autocxx does some things I suspect it does, then this patch is useless because autocxx already has the features my patch would add.

@adetaylor
Copy link
Collaborator

I have not run into the llvm conflicts which you've seen, so it might be that you can use a slightly earlier version of rustc and maybe it will work?

But in any case - I'll aim to get #51 landed this week. No promises!

There's lots which is incomplete about autocxx - it's still early days - so your patch may still be useful. Also, see #124 for some of the ways in which bindgen doesn't quite do what we need.

@adetaylor
Copy link
Collaborator

WIP towards fixing this here - #171 - but it probably doesn't fix this issue yet, as it's likely that the procedural macro still links to llvm. Cargo cfg shenanigans will be used to avoid that. Also, the code is junk for now and will involve lots of cleanups and rebasing before I merge.

@Volker-Weissmann
Copy link
Author

In ed7a5a2 , cargo run in the demo folder works on my machine.

@adetaylor
Copy link
Collaborator

Ah good, thanks for letting me know.

@adetaylor
Copy link
Collaborator

Fixed by #171. I still need to do a little bit of cleanup, e.g. #173. In general this has been quite a big change so I anticipate quite a bit of tinkering ahead, but the macro should no longer do anything complex at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants