Emacs error in Ubuntu

  • Done
  • quality assurance status badge
Details
5 participants
  • Liliana Marie Prikler
  • Ludovic Courtès
  • Maxim Cournoyer
  • Vicente Mataix ferrandiz
  • zimoun
Owner
unassigned
Submitted by
Vicente Mataix ferrandiz
Severity
normal
V
V
Vicente Mataix ferrandiz wrote on 15 Mar 2022 17:09
(address . bug-guix@gnu.org)
6780887.11555111.1647360563972.JavaMail.zimbra@inria.fr
Greetings,

I follow the instructions from:

[ https://zimbra.inria.fr/zimbra/%20https://guix.gnu.org/manual/en/guix.html#Binary-Installation| https://guix.gnu.org/manual/en/guix.html#Binary-Installation ]

Installation (Ubuntu 20.04):

cd /tmp
chmod +x guix-install.sh
./guix-install.sh
guix install glibc-utf8-locales
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

Update:

guix pull

Install emacs:

guix install emacs

Load environment:

GUIX_PROFILE="$HOME/.guix-profile"
. "$GUIX_PROFILE/etc/profile"

Run emacs:

emacs

/home/vmataixf/.guix-profile/bin/emacs: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or director

Best regards,

Vicente Mataix Ferrándiz
Attachment: file
L
L
Liliana Marie Prikler wrote on 16 Mar 2022 09:02
d79f7dae9acfd0295dffe38934871ab79d777f5f.camel@ist.tugraz.at
Hi Vicente,

Am Dienstag, dem 15.03.2022 um 17:09 +0100 schrieb Vicente Mataix
ferrandiz:
Toggle quote (36 lines)
> Greetings,
>
> I follow the instructions from:
>
> https://guix.gnu.org/manual/en/guix.html#Binary-Installation
>
> Installation (Ubuntu 20.04):
>
> cd /tmp
> wget
> https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
> chmod +x guix-install.sh
> ./guix-install.sh
> guix install glibc-utf8-locales
> export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
>
> Update:
>
> guix pull
>
> Install emacs:
>
> guix install emacs
>
> Load environment:
>
> GUIX_PROFILE="$HOME/.guix-profile"
>     . "$GUIX_PROFILE/etc/profile"
>
> Run emacs:
>
> emacs
>
> /home/vmataixf/.guix-profile/bin/emacs: error while loading shared
> libraries: liblzma.so.5: cannot open shared object file: No such file
> or director
That is an interesting and surprisingly difficult to debug error you
have there. On Guix System, we have
Toggle snippet (3 lines)
$ ldd $GUIX_ENVIRONMENT/bin/.emacs-27.2-real | grep lzma
liblzma.so.5 => /gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/lib/liblzma.so.5 (0x00007f7919fee000)
where xz is one of those magic libraries you'd expect to exist in any
distro. However,

Toggle snippet (10 lines)
$ guix show emacs | recsel -p dependencies
dependencies: acl@2.3.1 alsa-lib@1.2.4 cairo@1.16.0 coreutils@8.32
+ dbus@1.12.20 ghostscript@9.54.0 giflib@5.2.1 gmp@6.2.1 gnutls@3.7.2 gpm@1.20.7
+ gtk+@3.24.30 gzip@1.10 harfbuzz@2.8.2 jansson@2.13.1 libice@1.0.10
+ libjpeg-turbo@2.0.5 libotf@0.9.16 libpng@1.6.37 librsvg@2.50.7 libsm@1.2.3
+ libtiff@4.3.0 libx11@1.7.3.1 libxft@2.3.3 libxml2@2.9.12 libxpm@3.5.13
+ m17n-lib@1.8.0 mailutils@3.14 ncurses@6.2.20210619 pango@1.48.10
+ pkg-config@0.29.2 poppler@21.07.0 texinfo@6.7 zlib@1.2.11

If at all, xz is included as implicit input to unpack Emacs! We should
probably add it as explicit input instead.

Cheers
Z
Z
zimoun wrote on 16 Mar 2022 10:23
Re: bug#54400: Emacs error in Ubuntu
(name . Vicente Mataix ferrandiz)(address . vicente.mataix-ferrandiz@inria.fr)(address . 54400@debbugs.gnu.org)
CAJ3okZ1TW_0ZsGFSYwza67iu3C-UxMs-BmfAP7Xp1UZ3cQEaOg@mail.gmail.com
Hi Vicente,

On Tue, 15 Mar 2022 at 22:18, Vicente Mataix ferrandiz
<vicente.mataix-ferrandiz@inria.fr> wrote:

Toggle quote (4 lines)
> Update:
>
> guix pull

What is your revision? Other said which "guix describe"?


Cheers,
simon
Z
Z
zimoun wrote on 16 Mar 2022 10:36
86tuby44u3.fsf@gmail.com
Hi Liliana.

On Wed, 16 Mar 2022 at 09:02, Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> wrote:

Toggle quote (22 lines)
> --8<---------------cut here---------------start------------->8---
> $ ldd $GUIX_ENVIRONMENT/bin/.emacs-27.2-real | grep lzma
> liblzma.so.5 => /gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/lib/liblzma.so.5 (0x00007f7919fee000)
> --8<---------------cut here---------------end--------------->8---
>
> where xz is one of those magic libraries you'd expect to exist in any
> distro. However,
>
> --8<---------------cut here---------------start------------->8---
> $ guix show emacs | recsel -p dependencies
> dependencies: acl@2.3.1 alsa-lib@1.2.4 cairo@1.16.0 coreutils@8.32
> + dbus@1.12.20 ghostscript@9.54.0 giflib@5.2.1 gmp@6.2.1 gnutls@3.7.2 gpm@1.20.7
> + gtk+@3.24.30 gzip@1.10 harfbuzz@2.8.2 jansson@2.13.1 libice@1.0.10
> + libjpeg-turbo@2.0.5 libotf@0.9.16 libpng@1.6.37 librsvg@2.50.7 libsm@1.2.3
> + libtiff@4.3.0 libx11@1.7.3.1 libxft@2.3.3 libxml2@2.9.12 libxpm@3.5.13
> + m17n-lib@1.8.0 mailutils@3.14 ncurses@6.2.20210619 pango@1.48.10
> + pkg-config@0.29.2 poppler@21.07.0 texinfo@6.7 zlib@1.2.11
> --8<---------------cut here---------------end--------------->8---
>
> If at all, xz is included as implicit input to unpack Emacs! We should
> probably add it as explicit input instead.

Toggle snippet (6 lines)
$ guix graph --path emacs xz
emacs@27.2
libxml2@2.9.12
xz@5.2.5

Note that

Toggle snippet (6 lines)
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/emacs/emacs-"
version ".tar.xz"))

but I do not see ’xz’ in the implicit inputs; only emacs-minimal. Quick
look, maybe I miss it.

Well, indeed, something seems unexpected if the Emacs binary is linked
to liblzma and this liblzma is not an explicit inputs but instead comes
from a reference to another inputs.


Cheers,
simon
Z
Z
zimoun wrote on 16 Mar 2022 10:42
(name . Vicente Mataix ferrandiz)(address . vicente.mataix-ferrandiz@inria.fr)(address . 54400@debbugs.gnu.org)
CAJ3okZ2fbZS-TdcAG8wkenio3976LsSy1z0CLXBx5T7-o1bM+g@mail.gmail.com
Hi,

On Wed, 16 Mar 2022 at 10:32, Vicente Mataix ferrandiz
<vicente.mataix-ferrandiz@inria.fr> wrote:

Toggle quote (2 lines)
> I did it just after guix pull.

Using bec806e from yesterday, I cannot reproduce on Ubuntu. The invokation

guix shell -C -E DSISPLAy -E TERM emacs -- emacs -nw

works for me. I suspect something wrong with your environment
variables. Maybe you could run "guix shell --check".

Cheers,
simon
L
L
Liliana Marie Prikler wrote on 16 Mar 2022 10:48
06777b60013c79b14b29820bfd14b0f947f94353.camel@ist.tugraz.at
Hi simon

Am Mittwoch, dem 16.03.2022 um 10:36 +0100 schrieb zimoun:
Toggle quote (6 lines)
> --8<---------------cut here---------------start------------->8---
> $ guix graph --path emacs xz
> emacs@27.2
> libxml2@2.9.12
> xz@5.2.5
> --8<---------------cut here---------------end--------------->8---
Thanks for investigating, I did not consider ‘guix graph’.

Toggle quote (11 lines)
> Note that
>
> --8<---------------cut here---------------start------------->8---
>     (source (origin
>               (method url-fetch)
>               (uri (string-append "mirror://gnu/emacs/emacs-"
>                                   version ".tar.xz"))
> --8<---------------cut here---------------end--------------->8---
>
> but I do not see ’xz’ in the implicit inputs; only emacs-minimal. 
> Quick look, maybe I miss it.
IIRC, it'd be quite deep in the unpack chain, but maybe I'm mixing
things up as well.

Toggle quote (3 lines)
> Well, indeed, something seems unexpected if the Emacs binary is
> linked to liblzma and this liblzma is not an explicit inputs but
> instead comes from a reference to another inputs.
I think that's what you'd observe on other distros as well. IIRC the
linker ought to correctly resolve/"propagate" such dependencies, so it
shouldn't be a problem.

Vicente, could you check the output of ldd for your Emacs, as well as
libxml2 and also check whether your xz package is perhaps broken and
ought to be repaired?

Cheers
V
V
Vicente Mataix ferrandiz wrote on 16 Mar 2022 10:32
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 54400@debbugs.gnu.org)
910431912.11768214.1647423175720.JavaMail.zimbra@inria.fr
I did it just after guix pull. I cannot check the revision as I did it in my work computer, I will check it tomorrow.

----- Mail original -----
Toggle quote (20 lines)
> De: "zimoun" <zimon.toutoune@gmail.com>
> À: "Vicente Mataix ferrandiz" <vicente.mataix-ferrandiz@inria.fr>
> Cc: 54400@debbugs.gnu.org
> Envoyé: Mercredi 16 Mars 2022 10:23:15
> Objet: Re: bug#54400: Emacs error in Ubuntu

> Hi Vicente,
>
> On Tue, 15 Mar 2022 at 22:18, Vicente Mataix ferrandiz
> <vicente.mataix-ferrandiz@inria.fr> wrote:
>
>> Update:
>>
>> guix pull
>
> What is your revision? Other said which "guix describe"?
>
>
> Cheers,
> simon
Z
Z
zimoun wrote on 16 Mar 2022 11:11
86pmmm436w.fsf@gmail.com
Hi Liliana,

On Wed, 16 Mar 2022 at 10:48, Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> wrote:

Toggle quote (4 lines)
> Vicente, could you check the output of ldd for your Emacs, as well as
> libxml2 and also check whether your xz package is perhaps broken and
> ought to be repaired?

I am not Vicente but mine looks like with Guix ff093f5 on Debian.

Toggle snippet (5 lines)
$ guix shell libxml2
[env]$ ldd $GUIX_ENVIRONMENT/lib/libxml2.so | grep lzma
liblzma.so.5 => /gnu/store/aggsb6j1svxp70xlll4rqnx5f2pzz794-xz-5.2.5/lib/liblzma.so.5 (0x00007fee6026e000)

and

Toggle snippet (5 lines)
$ guix shell emacs
[env]$ ldd $GUIX_ENVIRONMENT/bin/.emacs-27.2-real | grep lzma
liblzma.so.5 => /gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/lib/liblzma.so.5 (0x00007f134d7e3000)

Ah! It is not the “same“ xz. :-) Well, it probably does not come from
libxml2 (except if there is a graft).

Anyway, I suspect something wrong with Vicente’s ’env’.


Cheers,
simon
L
L
Liliana Marie Prikler wrote on 16 Mar 2022 11:30
06a32468ccc8f7959ee51136b30767df12b7f5f3.camel@ist.tugraz.at
Hi zimoun,

Am Mittwoch, dem 16.03.2022 um 11:11 +0100 schrieb zimoun:
Toggle quote (17 lines)
> I am not Vicente but mine looks like with Guix ff093f5 on Debian.
>
> --8<---------------cut here---------------start------------->8---
> $ guix shell libxml2
> [env]$ ldd $GUIX_ENVIRONMENT/lib/libxml2.so | grep lzma
>         liblzma.so.5 => /gnu/store/aggsb6j1svxp70xlll4rqnx5f2pzz794-
> xz-5.2.5/lib/liblzma.so.5 (0x00007fee6026e000)
> --8<---------------cut here---------------end--------------->8---
>
> and
>
> --8<---------------cut here---------------start------------->8---
> $ guix shell emacs
> [env]$ ldd $GUIX_ENVIRONMENT/bin/.emacs-27.2-real | grep lzma
>         liblzma.so.5 => /gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-
> xz-5.2.5/lib/liblzma.so.5 (0x00007f134d7e3000)
> --8<---------------cut here---------------end--------------->8---
Looking at the derivations,
/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/ is built with all
our mesboot stuff, whereas /gnu/store/aggsb6j1svxp70xlll4rqnx5f2pzz794-
xz-5.2.5 is not. In other words, I suspect that it is indeed
Schrödinger's missing dependency :P


Cheers
L
L
Ludovic Courtès wrote on 16 Mar 2022 11:52
(name . Vicente Mataix ferrandiz)(address . vicente.mataix-ferrandiz@inria.fr)(address . 54400@debbugs.gnu.org)
878rtaf9ul.fsf@gnu.org
Hi,

Vicente Mataix ferrandiz <vicente.mataix-ferrandiz@inria.fr> skribis:

Toggle quote (6 lines)
> Run emacs:
>
> emacs
>
> /home/vmataixf/.guix-profile/bin/emacs: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or director

Could you check whether the ‘LD_LIBRARY_PATH’ environment variable is
defined, for instance by running:

env | grep LD_LIBRARY_PATH

If it is, please unset it:

unset LD_LIBRARY_PATH

Does it help?

Ludo’.
M
M
Maxim Cournoyer wrote on 23 Mar 2022 03:16
control message for bug #54400
(address . control@debbugs.gnu.org)
87h77p1kh7.fsf@gmail.com
tags 54400 + moreinfo
quit
M
M
Maxim Cournoyer wrote on 14 Jul 2022 06:15
Re: bug#54400: Emacs error in Ubuntu
(name . Ludovic Courtès)(address . ludo@gnu.org)
874jzkxrb8.fsf@gmail.com
Hi,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (23 lines)
> Hi,
>
> Vicente Mataix ferrandiz <vicente.mataix-ferrandiz@inria.fr> skribis:
>
>> Run emacs:
>>
>> emacs
>>
>> /home/vmataixf/.guix-profile/bin/emacs: error while loading shared
>> libraries: liblzma.so.5: cannot open shared object file: No such
>> file or director
>
> Could you check whether the ‘LD_LIBRARY_PATH’ environment variable is
> defined, for instance by running:
>
> env | grep LD_LIBRARY_PATH
>
> If it is, please unset it:
>
> unset LD_LIBRARY_PATH
>
> Does it help?

Since we haven't heard back from Vicente, I presume their problem has
been resolved somehow.

Closing.

Maxim
Closed
?