kelleyk / ppa-emacs

Packaging repository for my Emacs PPA

Home Page:https://launchpad.net/~kelleyk/+archive/ubuntu/emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide native compilation on Ubuntu Bionic

pataquets opened this issue · comments

Thanks for putting this information together and sharing it!

I've had to temporarily remove native compilation from the packages that had it due to #23. Once we figure that out, I'd be happy to look at enabling the feature for 18.04 LTS.

I'm not sure how I feel about adding a dependency on another PPA, though of course it might be possible to republish some packages.

Another option might be to build using GCC 8, which is available (along with a libgccjit package) even though it's not the default.

If you have some time to look at what we'd have to change in the packaging to build with a different version of GCC, please share what you discover here!

Also, I'm always shy about spending the limited time that I have to work on the PPA on older Ubuntu releases. If you're reading this and you'd also be interested in 18.04 LTS ("bionic") packages that have --with-native-compilation enabled, please leave a comment or reaction to let me know.

Thanks for putting this information together and sharing it!

Don't mention it, happy to help!

I've had to temporarily remove native compilation from the packages that had it due to #23. Once we figure that out, I'd be happy to look at enabling the feature for 18.04 LTS.

Fair enough, it is the most reasonable thing to do and I'm happy you did it this way.

I'm not sure how I feel about adding a dependency on another PPA, though of course it might be possible to republish some packages.

Sure. I understand it and it's a valid concern. It's up to you to policy that. My only feedback is that it might be acceptable if the PPA is regarded as very trustworthy and reliable. Other than that, I have no further opinion.
Another (albeit way more convoluted) approach would be to build libgccjit along emacs but I'm not sure how feasible it is or if even it's worth the effort, unless it also adds some value to other builds by means of having an always updated libgccjit lib along emacs, which might be interesting to get the most of it with new updates and enhancements (I can spin off an issue if you want to think on it).

Another option might be to build using GCC 8, which is available (along with a libgccjit package) even though it's not the default.

I guess this is an acceptable solution and the easiest. A good approach, indeed.

If you have some time to look at what we'd have to change in the packaging to build with a different version of GCC, please share what you discover here!

Also, I'm always shy about spending the limited time that I have to work on the PPA on older Ubuntu releases. If you're reading this and you'd also be interested in 18.04 LTS ("bionic") packages that have --with-native-compilation enabled, please leave a comment or reaction to let me know.

I've attempted to build 27.2 on #18, but failed due to lack of familiarity with the tools. It would help in getting more eyes/hands into it by having some docs. As of now, I don't know even where to start. I've done some very simple/easy packaging and used LP PPA auto-build service many years ago.

I would even suggest to have a local build environment all contained in a Dockerfile to improve reproduceability and allow a quick onboarding of new contributors, since the Dockerfile would effectively double as a step-by-step guide (at least, it would be for me). I might take a stab at it, if I could figure better how to do it. And I would gladly help with the Docker details, for sure.

It seems that you disabled native compilation for all series, not just Bionic. Is it possible to revert it back for the newer series (Jammy, Impish, etc) and keep it disabled just for Bionic?

I'm sorry if this was unclear. The packages for Bionic never had it enabled; the -kk1 and -kk2 packages are the same for that Ubuntu release. For the other Ubuntu releases, I tried releasing packages (-kk1) that had native compilation enabled, but had to disable it because of the issue described in #23 (which is what the -kk2 packages are).

The plan will probably be to re-enable it for releases other than Bionic once #23 is resolved, and then we can take a look at whether there's a reasonable way to extend that support to Bionic.

As a data point, I'm running 18.04/bionic and I used gcc-10 to build Emacs with native compilation.

I have the ubuntu-toolchain-r/test PPA in my sources, so that's likely how I installed gcc-10.

I currently have gcc-7 and gcc-10 available, so I believe the default for 18.04 is gcc-7, but IIRC I also tried and failed with gcc-8 along the way. However I note that https://emacs.stackexchange.com/a/59549 suggests differently (perhaps depending on the point release version, if Debian's differs to Ubuntu's?), so maybe it was my fault.

I can't recall whether I tested with gcc-9 or at that point went directly to 10.