unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: Andrew Whatson <whatson@gmail.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: Wed, 03 Aug 2022 21:13:35 +0000	[thread overview]
Message-ID: <QBzbwGsoJAPXLEIoj0pztUgjvlWLfxW4UxA2NoD7I4eMnZ0SeFxrlEjPn30QWo-lsMi-bQfJPRp-rpIM1S-JX4cphCaRWSbnXvilsyRPyXI=@protonmail.com> (raw)
In-Reply-To: <g7erfFF7ErV3F2PgmisSVSUcmk4fyChDnpWBykGnRoUS6sI4frkev0XxPlpqJOACTPN1PT6Yee3miMavYf5g61TDXxdt9AgKgGtcVX3mhvc=@protonmail.com>

Hi everyone,

Found out some useful info and a work around for the original reported issue of the simple "hello world" of gccjit not working.


------- Original Message -------
On Tuesday, June 28th, 2022 at 1:16 AM, John Kehayias wrote:

> Hi,
>
> ------- Original Message -------
> On Tuesday, June 28th, 2022 at 12:17 AM, Liliana Marie Prikler wrote:
>
> > Keyword here is "has worked for emacs". I've tried porting the logic
> > from flatwhatson's channel over, but regardless of what I do, it
> > already fails in the configure step of Emacs (in a manner that's
> > reproducible outside as well). Thus, I think this is a bug in
> > libgccjit (or perhaps our packaging of it) that simply happened to be
> > ignored during development of Emacs 28, but no longer in the release.
>
>
> Sorry, I should be extra clear that I mean has in the past and continues to work for Emacs. I've been using emacs-pgtk-native-comp through the flatwhatson channel from well before v28 was released. Currently I'm using emacs-pgtk-native-comp-28.1.50-223.3ddccb5. Everything has built, installed, and run fine for as long as I have been using it. Just in case that was in question, and as a point of reference.
>
> Anyway, I'll try to reproduce when I can (tomorrow likely) what you reported in the first message using this setup, if that is of use.
>

I was able to reproduce the original error, though I used the libgccjit package from the flatwhatson channel, at v11.3.0 (along with GCC at that version). For good measure, I also used the tutorial at that version, just in case https://gcc.gnu.org/onlinedocs/gcc-11.3.0/jit/intro/tutorial01.html  I chose this version since that is what emacs-native-comp from that channel is built with.

Searching for these error messages of missing libraries/files, I found

https://ref.strikr.io/jit/internals/index.html#environment-variables

and a bug report at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87808

I didn't dive into the details and I'm not expert here, but it gave me the clues to work around it. Seems that where gccjit looks for things has some assumptions (bugs?) which we can fix at runtime with:

LIBRARY_PATH=$GUIX_ENVIRONMENT/lib/gcc/x86_64-unknown-linux-gnu/11.3.0:$LIBRARY_PATH ./gccjittest

The errors reported before were solved with this LIBRARY_PATH addition of the lib/gcc subdirectory. So, the test program runs in

guix shell gcc-toolchain@11 libgccjit@11 --pure

where I compiled to gccjittest following the tutorial directions (no change to LIBRARY_PATH).

So, looking at the emacs-native-comp definition in flatwhatson, we can see that a phase is used to set LIBRARY_PATH before configure just as I did here: https://github.com/flatwhatson/guix-channel/blob/master/flat/packages/emacs.scm#L65

Hope this is helpful and unblocks libgccjit and emacs-native-comp for Guix!

John




  reply	other threads:[~2022-08-03 21:15 UTC|newest]

Thread overview: 25+ 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 [this message]
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
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

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='QBzbwGsoJAPXLEIoj0pztUgjvlWLfxW4UxA2NoD7I4eMnZ0SeFxrlEjPn30QWo-lsMi-bQfJPRp-rpIM1S-JX4cphCaRWSbnXvilsyRPyXI=@protonmail.com' \
    --to=bug-guix@gnu.org \
    --cc=55657@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    --cc=liliana.prikler@gmail.com \
    --cc=me@tobias.gr \
    --cc=remco@remworks.net \
    --cc=whatson@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).