Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues with version 3x on rocky linux 8 #96

Closed
keeper791 opened this issue Dec 1, 2024 · 11 comments
Closed

issues with version 3x on rocky linux 8 #96

keeper791 opened this issue Dec 1, 2024 · 11 comments
Assignees

Comments

@keeper791
Copy link

Hey,

Installing latest/stable via snap on RHEL8 Rocky Linux 8 works fine

but using latest/beta or pgtk/edge has the following issues:

  1. A few seconds after openning emacs, the following warning is seen:
image
  1. Everytime I click to open a file, the terminal has these errors:
image

I've source-compiled emacs version 30.0.90 and none of these issues were present. they're only there when installing with snap

@alexmurray
Copy link
Owner

Hey, thanks for reporting this issue and apologies for it - can you let me know in particular which revision of the snap you have tried from beta / edge as there have been a bunch of changes recently. Thanks.

@alexmurray alexmurray added the incomplete Waiting on information from the reporter label Dec 2, 2024
@keeper791
Copy link
Author

sure, here are some more details

I'm managing a fleet of RHEL8 servers, more particularly Rocky Linux 8.10, emacs is installed via Puppet managed snap.

We're currently on pgtk/edge , up until a couple of weeks ago we had 30.0.50 and it was working without any issues. A couple of weeks ago the channel got updated to 31.0.50, which is where we started seeing the errors I mentioned.

I then tried removing the snap and installing latest/beta (30.0.92) , but these errors are visible with this version as well.

Removed again and installed latest/stable (29.4) , works well - without any errors or issues.

My last attempt was to download .tar.gz of emacs 30.0.90, I compiled and installed it and it worked well, without errors.

@alexmurray
Copy link
Owner

Ok, I expect this may be due to the difference in where snaps are installed on non-Ubuntu distributions - I think they are not under /snap right? Can you try running the following for me:

snap run --shell emacs
echo $SNAP

Thanks.

@keeper791
Copy link
Author

snap run --shell emacs
/snap/emacs/2592/usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so: undefined symbol: g_assertion_message_cmpint
Failed to load module: /snap/emacs/2592/usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
/lib64/libc.so.6: version GLIBC_2.33' not found (required by /snap/emacs/2592/usr/lib/x86_64-linux-gnu/gio/modules/../../gvfs/libgvfscommon.so) Failed to load module: /snap/emacs/2592/usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so /lib64/libc.so.6: version GLIBC_2.38' not found (required by /snap/emacs/2592/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so)
Failed to load module: /snap/emacs/2592/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so

echo $SNAP
/snap/emacs/2592

@alexmurray
Copy link
Owner

Thanks - that is not what I expected (it is the same as Ubuntu, so I was hoping that the various workaround we have in the snap to support it working on older Ubuntu releases like 18.04 would also work on Rocky)... I think I may have to try and set up a rocky VM and try and debug this locally myself.

Out of interest, why do you use the pgtk branch?

@keeper791
Copy link
Author

Thanks! we'll be very happy if the new versions work well on Rocky8!

To your question - no good reason, I think we've just set it up like that initially. I've modified our env to use latest/stable now to resume normal functionality. The main motivation now is to have future releases of latest/stable to not have the issues described in here

@alexmurray alexmurray removed the incomplete Waiting on information from the reporter label Dec 3, 2024
@alexmurray
Copy link
Owner

Ok, I got a rocky 8 VM going and can reproduce this issue. I think it is because in the snap we have the /snap/emacs/current/usr/lib/x86_64-linux-gnu/libc.so file which contains:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /lib/x86_64-linux-gnu/libc.so.6 /snap/emacs/current/usr/lib/x86_64-linux-gnu/libc_nonshared.a  AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )

This works on Ubuntu but these same paths don't exist on rocky - instead they should be:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /lib64/libc.so.6 /snap/emacs/current/usr/lib/x86_64-linux-gnu/libc_nonshared.a  AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )

But as the snap is a readonly file-system we can't easily do this or to my knowledge ship multiple versions of the linker script. I have tried to have the snap specify these to all come from the snap - ie, something like:

GROUP ( /snap/emacs/current/usr/lib/x86_64-linux-gnu/libc.so.6 /snap/emacs/current/usr/lib/x86_64-linux-gnu/libc_nonshared.a  AS_NEEDED ( /snap/emacs/current/usr/lib64/ld-linux-x86-64.so.2 ) )

but this doesn't work and compilation fails still on both Ubuntu and rocky. So we may have to be a bit cleverer with this hack but I don't have great ideas yet how to fix it for both... but I'll have a think.

@alexmurray alexmurray self-assigned this Dec 3, 2024
alexmurray added a commit that referenced this issue Feb 26, 2025
By default the script was using the path for Ubuntu but this fails on other
distros like Rocky Linux where this does not exist. So instead use a relative
path for libc.so.6 and add both the Ubuntu and the Rocky path to the search path
for the linker so it can find either. Fixes issues #96 and #100.

Signed-off-by: Alex Murray <[email protected]>
@alexmurray
Copy link
Owner

Ok I have committed a fix which works for me locally - this should build soon and be published to the candidate channel in an hour or two - can you please test it once this becomes available? Note I only focused on fixing the native-comp issue, the GVFS-WARNING seems less critical but if this turns out to be a real issue please file another issue and I can try and look into it. Thanks.

@alexmurray
Copy link
Owner

Apologies - this is on the beta channel not candidate, and available now - if you can provide any testing that would be great.

@keeper791
Copy link
Author

I've just tried latest/beta 30.1, I no longer see the compile errors. GVFS warnings are still there

So it looks like it's working as expected

thanks!

@alexmurray
Copy link
Owner

Thanks for confirming - I'll close this issue for now and we can follow up in #101 etc for other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants