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

Refactor: use ORCv2 for compatibility with modern LLVM versions with EOS VM OC #578

Open
spoonincode opened this issue Feb 5, 2023 · 5 comments · Fixed by #855
Open

Comments

@spoonincode
Copy link
Member

EOS VM OC was implemented using LLVM's ORCv1 interface. This was actually already in deprecation at the time of EOSIO 2.0's release (circa LLVM 9). LLVM removed ORCv1 in version 12 meaning Leap cannot be compiled with LLVM 12+

So far this hasn't been too much of a problem: Ubuntu 22.04 and upcoming 23.04 ship with an optional llvm-11-dev package that works. Both Arch & even upcoming Fedora 38 still provide an llvm11 package. But the days of a legacy LLVM 11 package being provided by distros are numbered. Upcoming Debian 12 does not have an LLVM 11 package.

EOS VM OC needs to be refactored to support modern LLVM versions (such refactoring may not be limited to just ORC interface). ORCv2 was available in LLVM 7 I believe, so it's possible the implementation could be refactored to support all versions from 7 to 16. But we could opt to reduce the scope of the support if need be (Ubuntu 20.04 ships with LLVM 10 as the "default" LLVM).

@stephenpdeos
Copy link
Member

Expected to be a pressing issue when the next Ubuntu UTS is released.

@ScottBailey
Copy link

ScottBailey commented Mar 14, 2023

It looks like llvm-11-dev in unavailable in Ubuntu Lunar / 23.04.

Lunar's llvm-dev points to llvm-15-dev, additionally versions 13, 14, and 16 are also available.

@spoonincode
Copy link
Member Author

bummer, I guess they removed it since I originally put in the comment. (23.04 still not released)

@ScottBailey
Copy link

bummer, I guess they removed it since I originally put in the comment. (23.04 still not released)

Right. It could still change. And we could also just build and distribute llvm-11. But we will need to make this change eventually.

Debian Bookworm - also not released yet - is versions 13, 14, and 15. With llvm-dev pointing to 14.

However, the user can install llvm-11-dev by adding either bullseye to Debian or kinetic universe to Ubuntu. It feels a bit sub-optimal - the user has to fetch the additional repos on every apt update - but in practice it should work fine for anyone with a modern machine and decent network.

@spoonincode
Copy link
Member Author

Early versions of EOSIO required solely LLVM 4.0. Just that version. Nothing else. This was a terrible experience for building EOSIO. It got to the point it was hard to build LLVM 4.0 since it would error out on recent compilers unless you patched LLVM. I don't want to go back to those dark ages: we need to support a reasonable broad range.

@bhazzard bhazzard changed the title refactor EOS VM OC to use ORCv2 for compatibility with modern LLVM versions Refactor: use ORCv2 for compatibility with modern LLVM versions with EOS VM OC Sep 28, 2023
@spoonincode spoonincode transferred this issue from AntelopeIO/leap Aug 18, 2024
@spoonincode spoonincode added this to the Spring v1.1.0-rc1 milestone Aug 22, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Backlog Oct 2, 2024
@spoonincode spoonincode reopened this Oct 2, 2024
@github-project-automation github-project-automation bot moved this from Done to Todo in Team Backlog Oct 2, 2024
@spoonincode spoonincode self-assigned this Oct 21, 2024
@spoonincode spoonincode moved this from Todo to In Progress in Team Backlog Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

5 participants