unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* native compilation version on AArch64 running Debian 9.9
@ 2021-03-10 11:41 Eric S Fraga
  2021-03-10 12:23 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Eric S Fraga @ 2021-03-10 11:41 UTC (permalink / raw)
  To: emacs-devel

Hello,

yesterday, I cloned and built Emacs with native compilation on my
desktop running Debian testing.  Went smoothly and it works very nicely
indeed!

So today I thought I would try to do the same on a small palmtop
computer running a somewhat older version of Debian (9.9) and,
obviously, a different architecture.  In this case, the configure step
fails with the error message (from the log):

,----
| configure:16269: checking for gcc_jit_context_acquire in -lgccjit
| configure:16294: gcc -o conftest  -g3 -O2 -pthread [...] conftest.c -lgccjit  -lX11   -lcairo >&5 
| /usr/bin/ld: cannot find -lgccjit
| collect2: error: ld returned 1 exit status
`----

If I look at ldconfig on both systems, on the desktop I get the
following:

libgccjit.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgccjit.so.0

and on the palmtop:

libgccjit.so.0 (libc6,AArch64) => /usr/lib/aarch64-linux-gnu/libgccjit.so.0

The versions of the gccjit packages are different (8 on palmtop, 10 on
desktop) but the library is there, including the .so.0.0.1 file linked
to from the above in both cases.

Any suggestions?  My wee palmtop would love jit compilation Emacs!

Thank you,
eric

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 11:41 native compilation version on AArch64 running Debian 9.9 Eric S Fraga
@ 2021-03-10 12:23 ` Eli Zaretskii
  2021-03-10 12:31   ` Eric S Fraga
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2021-03-10 12:23 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-devel

> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> Date: Wed, 10 Mar 2021 11:41:40 +0000
> 
> ,----
> | configure:16269: checking for gcc_jit_context_acquire in -lgccjit
> | configure:16294: gcc -o conftest  -g3 -O2 -pthread [...] conftest.c -lgccjit  -lX11   -lcairo >&5 
> | /usr/bin/ld: cannot find -lgccjit
> | collect2: error: ld returned 1 exit status
> `----
> 
> If I look at ldconfig on both systems, on the desktop I get the
> following:
> 
> libgccjit.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgccjit.so.0
> 
> and on the palmtop:
> 
> libgccjit.so.0 (libc6,AArch64) => /usr/lib/aarch64-linux-gnu/libgccjit.so.0

A misconfigured system?  What does this produce:

  gcc -print-file-name=libgccjit.so



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 12:23 ` Eli Zaretskii
@ 2021-03-10 12:31   ` Eric S Fraga
  2021-03-10 12:49     ` Andreas Schwab
  2021-03-10 13:48     ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Eric S Fraga @ 2021-03-10 12:31 UTC (permalink / raw)
  To: emacs-devel

On Wednesday, 10 Mar 2021 at 14:23, Eli Zaretskii wrote:
> A misconfigured system?  

Likely given the nature of this system with little vendor support beyond
a somewhat fragile Debian installation...

> What does this produce:
>
>   gcc -print-file-name=libgccjit.so

Interesting.  On the palmtop, it simply returns "libgccjit.so" whereas
on my desktop it returns the full path to that file.  Any suggestions on
how I might correct this?  I guess I can go and dig...

Thank you,
eric

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 12:31   ` Eric S Fraga
@ 2021-03-10 12:49     ` Andreas Schwab
  2021-03-10 13:16       ` Eric S Fraga
  2021-03-10 13:48     ` Eli Zaretskii
  1 sibling, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2021-03-10 12:49 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-devel

You need to install the devel package for libgccjit.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 12:49     ` Andreas Schwab
@ 2021-03-10 13:16       ` Eric S Fraga
  0 siblings, 0 replies; 11+ messages in thread
From: Eric S Fraga @ 2021-03-10 13:16 UTC (permalink / raw)
  To: emacs-devel

On Wednesday, 10 Mar 2021 at 13:49, Andreas Schwab wrote:
> You need to install the devel package for libgccjit.

Thank you.  That is installed already (on both systems).

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 12:31   ` Eric S Fraga
  2021-03-10 12:49     ` Andreas Schwab
@ 2021-03-10 13:48     ` Eli Zaretskii
  2021-03-10 13:54       ` Eric S Fraga
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2021-03-10 13:48 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-devel

> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> Date: Wed, 10 Mar 2021 12:31:28 +0000
> 
> > What does this produce:
> >
> >   gcc -print-file-name=libgccjit.so
> 
> Interesting.  On the palmtop, it simply returns "libgccjit.so" whereas
> on my desktop it returns the full path to that file.

If it just repeats the argument, it means GCC cannot find the library,
probably because it looks in the wrong places.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 13:48     ` Eli Zaretskii
@ 2021-03-10 13:54       ` Eric S Fraga
  2021-03-10 14:12         ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Eric S Fraga @ 2021-03-10 13:54 UTC (permalink / raw)
  To: emacs-devel

On Wednesday, 10 Mar 2021 at 15:48, Eli Gretzky wrote:
> If it just repeats the argument, it means GCC cannot find the library,
> probably because it looks in the wrong places.

Indeed.  And that's what I cannot understand and need some pointers to
see if I can fix the problem.

Emacs builds just fine without the native compilation option so
obviously gcc compiles and runs the various tests in the configure
file.  Only the jit aspect fails in finding the library.

I have looked at /etc/ld.so.conf (and .d), for instance, and everything
looks fine.  Does anybody have any suggestion as to where &/or how gcc
might be getting misinformed?

thank you,
eric
-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 13:54       ` Eric S Fraga
@ 2021-03-10 14:12         ` Eli Zaretskii
  2021-03-10 15:35           ` Eric S Fraga
  2021-03-11  8:49           ` Eric S Fraga
  0 siblings, 2 replies; 11+ messages in thread
From: Eli Zaretskii @ 2021-03-10 14:12 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-devel

> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> Date: Wed, 10 Mar 2021 13:54:46 +0000
> 
> On Wednesday, 10 Mar 2021 at 15:48, Eli Gretzky wrote:
> > If it just repeats the argument, it means GCC cannot find the library,
> > probably because it looks in the wrong places.
> 
> Indeed.  And that's what I cannot understand and need some pointers to
> see if I can fix the problem.
> 
> Emacs builds just fine without the native compilation option so
> obviously gcc compiles and runs the various tests in the configure
> file.  Only the jit aspect fails in finding the library.
> 
> I have looked at /etc/ld.so.conf (and .d), for instance, and everything
> looks fine.  Does anybody have any suggestion as to where &/or how gcc
> might be getting misinformed?

Run the same compilation that the configure test does, but add -v to
the GCC command-line options.  Then look at the output, which should
show which directories are searched for libraries during the link
step.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 14:12         ` Eli Zaretskii
@ 2021-03-10 15:35           ` Eric S Fraga
  2021-03-11  8:49           ` Eric S Fraga
  1 sibling, 0 replies; 11+ messages in thread
From: Eric S Fraga @ 2021-03-10 15:35 UTC (permalink / raw)
  To: emacs-devel

On Wednesday, 10 Mar 2021 at 16:12, Eli Zaretskii wrote:
> Run the same compilation that the configure test does, but add -v to
> the GCC command-line options.  Then look at the output, which should
> show which directories are searched for libraries during the link
> step.

Okay, this helps!  I have found that Debian allowed me to install
(minor) version 8 of the libgccjit library although gcc expects version
6.  Found version 6 (from Debian oldstable aka stretch) and installed it
and I get further.  I am surprised that Debian's apt allowed me to
install the wrong version.  Interesting!

I am still having difficulties with configure and native compilation but
I now know the root of all the problems (a very hacked/fragile Debian
installation).  The problems I have now may lead me down a deep rabbit
hole (to do with mpfr library at the moment but I'm sure others will
crop up)... I will update if I ever come back out. :-)

Thank you all for your help.

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-10 14:12         ` Eli Zaretskii
  2021-03-10 15:35           ` Eric S Fraga
@ 2021-03-11  8:49           ` Eric S Fraga
  2021-03-11 19:26             ` Andrea Corallo via Emacs development discussions.
  1 sibling, 1 reply; 11+ messages in thread
From: Eric S Fraga @ 2021-03-11  8:49 UTC (permalink / raw)
  To: emacs-devel

Eli et al.,

Just to update on progress, as promised: I managed to build Emacs with
native compilation on my palmtop running Debian stretch.  This required
diving into a dependency rabbit hole that threatened to overwhelm me but
I came out the other end with a built Emacs and it's running very nicely
as the desktop environment (exwm) on the palmtop!

Thank you to all involved for a fantastic system!

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: native compilation version on AArch64 running Debian 9.9
  2021-03-11  8:49           ` Eric S Fraga
@ 2021-03-11 19:26             ` Andrea Corallo via Emacs development discussions.
  0 siblings, 0 replies; 11+ messages in thread
From: Andrea Corallo via Emacs development discussions. @ 2021-03-11 19:26 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-devel

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Eli et al.,
>
> Just to update on progress, as promised: I managed to build Emacs with
> native compilation on my palmtop running Debian stretch.  This required
> diving into a dependency rabbit hole that threatened to overwhelm me but
> I came out the other end with a built Emacs and it's running very nicely
> as the desktop environment (exwm) on the palmtop!

That's cool! :)

  Andrea



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-03-11 19:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 11:41 native compilation version on AArch64 running Debian 9.9 Eric S Fraga
2021-03-10 12:23 ` Eli Zaretskii
2021-03-10 12:31   ` Eric S Fraga
2021-03-10 12:49     ` Andreas Schwab
2021-03-10 13:16       ` Eric S Fraga
2021-03-10 13:48     ` Eli Zaretskii
2021-03-10 13:54       ` Eric S Fraga
2021-03-10 14:12         ` Eli Zaretskii
2021-03-10 15:35           ` Eric S Fraga
2021-03-11  8:49           ` Eric S Fraga
2021-03-11 19:26             ` Andrea Corallo via Emacs development discussions.

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).