all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Whatson <whatson@gmail.com>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: John Kehayias <john.kehayias@protonmail.com>,
	Tobias Geerinckx-Rice <me@tobias.gr>,
	"remco@remworks.net" <remco@remworks.net>,
	"55657@debbugs.gnu.org" <55657@debbugs.gnu.org>
Subject: bug#55657: libgccjit is unusable
Date: Fri, 5 Aug 2022 00:59:57 +0000	[thread overview]
Message-ID: <CAPE069cyYY-uVDC_rW6OfEOHnPO6ea08ckAtzs6sysoD6tvTpw@mail.gmail.com> (raw)
In-Reply-To: <e584cb2d93cb424e77b2d66a9450daee096d465c.camel@gmail.com>

On Thu, 4 Aug 2022 at 16:52, Liliana Marie Prikler
<liliana.prikler@gmail.com> wrote:
>
> > The solution used in the package-definition in my channel is to patch
> > `comp.el` to directly reference the necessary gcc/glibc paths instead
> > of relying on the environment.  This occurs in the
> > "patch-driver-options" step immediately after the "set-libgccjit-
> > path" step mentioned earlier.  This makes gcc-toolchain part of emacs
> > closure, without requiring it to be propagated into the profile.
> >
> > If I understand the problem correctly, that should suffice?
>
> But if I read your recipe correctly, you're not resolving %host-type in
> those options.  Does that really suffice?

Ah, yes that is a little confusing.  This is a quirk of the different
behaviour of the LIBRARY_PATH environment variable and the -B flag to
gcc.

I recommend reading about "-Bprefix" in `man gcc`, but in short it
tries those paths with and without "machine/version" appended for the
target machine and compiler version.  We *could* hard-code those, but
it isn't necessary, and it seemed like that might cause problems if
someone's brave enough to attempt cross-compilation of native-comp
emacs.

A major benefit of patching "comp.el" directly is that it avoids
leaking gcc into the user's environment.  It's possible that someone
is running emacs in a profile with a specific version of gcc, maybe
without libgccjit support (eg. while hacking on some legacy code), so
having emacs insist on a libgccjit-compatible gcc present in the
environment at runtime would cause lots of problems.

The other important bit is the libgccjit package.  The one in guix
mainline works fine, it should be possible to get a working libgccjit
as-is.  I updated the package definition on my channel for the
following reasons:

a) Support newer gcc versions

While developing native-comp support for emacs, Andrea found and fixed
some libgccjit bugs which made their way into subsequent releases of
gcc.  The native-comp library includes work-arounds for these
problems, but produces faster/smaller code with a fresher libgccjit.

b) Reduce compilation time

The definition in guix is basically the standard gcc build, but with
libgccjit also enabled.  This results in an arduous double-bootstrap
and building a bunch of compilers and libraries that are completely
unnecessary and unused by libgccjit.  I've disabled all the
unnecessary stuff and depend on the main gcc package to build
libgccjit, relying on the fact that it's already properly
bootstrapped.  It's much quicker to build, which is important if you
don't have substitutes.

Hope this helps,
Andrew




  reply	other threads:[~2022-08-05  1:01 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 13:07 bug#55657: libgccjit is unusable Liliana Marie Prikler
2022-06-04 14:07 ` Remco van 't Veer
2022-06-04 14:22 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-06-04 14:25   ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-06-04 15:14     ` Liliana Marie Prikler
2022-06-28  0:53 ` John Kehayias via Bug reports for GNU Guix
2022-06-28  4:17   ` Liliana Marie Prikler
2022-06-28  5:16     ` John Kehayias via Bug reports for GNU Guix
2022-08-03 21:13       ` John Kehayias via Bug reports for GNU Guix
2022-08-04  4:26         ` Liliana Marie Prikler
2022-08-04  4:48           ` Andrew Whatson
2022-08-04 16:52             ` Liliana Marie Prikler
2022-08-05  0:59               ` Andrew Whatson [this message]
2022-08-05 18:44                 ` Liliana Marie Prikler
2022-08-05 20:01                   ` John Kehayias via Bug reports for GNU Guix
2022-08-05 21:31                     ` Liliana Marie Prikler
2022-08-06  5:37                       ` John Kehayias via Bug reports for GNU Guix
2022-08-06  5:53                         ` Liliana Marie Prikler
2022-08-07  3:19                           ` John Kehayias via Bug reports for GNU Guix
2022-08-07 13:59                             ` Liliana Marie Prikler
2022-08-07 15:09                               ` John Kehayias via Bug reports for GNU Guix
2022-08-07 15:41                                 ` Liliana Marie Prikler
2022-08-09 20:44                                   ` John Kehayias via Bug reports for GNU Guix
2022-08-09 23:53                                     ` Andrew Whatson
2022-08-09 18:37 ` bug#55657: [PATCH 0/6] Add native compilation to Emacs Liliana Marie Prikler
2022-08-05  3:29   ` [bug#57086] [PATCH 1/6] gnu: Parameterize libgccjit Liliana Marie Prikler
2022-08-05  3:29   ` [bug#57086] [PATCH v3 1/7] " Liliana Marie Prikler
2022-08-05 18:27   ` [bug#57086] [PATCH v3 2/7] gnu: libgccjit: Build with bootstrapped gcc Liliana Marie Prikler
2022-08-05 18:27   ` [bug#57086] [PATCH 2/6] " Liliana Marie Prikler
2022-08-05 18:30   ` [bug#57086] [PATCH 3/6] gnu: libgccjit: Build multiple versions Liliana Marie Prikler
2022-08-05 18:30   ` [bug#57086] [PATCH v3 3/7] " Liliana Marie Prikler
2022-08-05 22:37   ` [bug#57086] [PATCH v3 4/7] gnu: emacs: Build with native compilation Liliana Marie Prikler
2022-08-05 22:37   ` [bug#57086] [PATCH 4/6] " Liliana Marie Prikler
2022-08-09 18:26   ` [bug#57086] [PATCH 5/6] guix: emacs-utils: Add emacs-compile-directory Liliana Marie Prikler
2022-08-09 18:26     ` [bug#57086] [PATCH v2 " Liliana Marie Prikler
2022-08-09 18:26   ` [bug#57086] [PATCH v3 5/7] " Liliana Marie Prikler
2022-08-09 18:32   ` [bug#57086] [PATCH v3 6/7] build-system: emacs: Use native compilation Liliana Marie Prikler
2022-08-09 18:32   ` [bug#57086] [PATCH 6/6] " Liliana Marie Prikler
2022-08-09 21:19   ` [bug#57086] [PATCH 0/6] Add native compilation to Emacs ( via Guix-patches via
2022-08-10  4:19     ` Liliana Marie Prikler
2022-08-10  6:11       ` ( via Guix-patches via
2022-08-23 20:07     ` Liliana Marie Prikler
2022-08-24 21:59   ` [bug#57086] [PATCH v3 7/7] gnu: emacs-yasnippet: Fix build Liliana Marie Prikler
2022-08-25  7:08   ` [bug#57086] [PATCH v3 0/7] Add native compilation to Emacs Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPE069cyYY-uVDC_rW6OfEOHnPO6ea08ckAtzs6sysoD6tvTpw@mail.gmail.com \
    --to=whatson@gmail.com \
    --cc=55657@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    --cc=liliana.prikler@gmail.com \
    --cc=me@tobias.gr \
    --cc=remco@remworks.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.