-
Notifications
You must be signed in to change notification settings - Fork 13
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
GLIBC_2.33
errors when installing jinx
module
#71
Comments
Further investigation shows that function gcc -I. -O2 -Wall -Wextra -fPIC -shared -o jinx-mod.so jinx-mod.c -pthread -I/usr/include/enchant-2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lenchant-2 Manually changing to /snap/emacs/2249/usr/bin/gcc-10 -I. -O2 -Wall -Wextra -fPIC -shared -o jinx-mod.so jinx-mod.c --sysroot=/snap/emacs/2249 -pthread -I/usr/include/enchant-2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lenchant-2 leads to
Not including the |
Hmmmm I think the only option here would be to ship enchant within the emacs snap (if we don't already) and ensure this gets used when compiling and running the module. I'm currently on leave for a couple weeks so won't get time to look at this properly until I get back but will keep an eye on this issue in the meantime. |
Looks like you ship the shared object but not the corresponding Enjoy your leave! |
So I just had another look at this - I don't think ubuntu provides any libenchant-2.a (although as you say it does provide the .so):
So I am not sure this can easily be solved - would the .so be sufficient? |
same for me: Emacs -Q (require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-refresh-contents)
(package-install 'jinx)
(require 'jinx)
(global-jinx-mode))
$ find /snap/emacs/current/ -name "*libc*.so"
/snap/emacs/current/lib/x86_64-linux-gnu/libc-2.31.so |
This should allow jinx to be compiled by setting PKG_CONFIG_SYSROOT_DIR in the environment when installing it to reference `emacs-snap-dir`. Signed-off-by: Alex Murray <[email protected]>
I've added a couple changes which hopefully will allow jinx to be compiled - however I haven't had a chance to finish testing it completely, but once new builds land in
|
For some reason absolute path is passed to GCC and providing headers with snap don't help:
|
It looks like after installing system wide header it compiled and loaded. It couldn't find dictionaries but probably it is unrelated to this issue. |
Apologies, I realise there was an error in the example code above - I just corrected it and was also able to reproduce the failure:
I think I know what the issue is - let me see if I can fix it... |
With the additional fix (in ...) we get a bit closer but it still fails to compile:
But we can work around this by setting CPATH in the environment as follows:
With the above snippet I can get jinx to compile and install correctly for the emacs snap which is currently in the stable channel (r2430 on amd64). You can test by removing any existing module and using the above for to reinstall it: |
On my Fedora 39 jinx was successfully compiled and run after
using following configuration:
Unfortunately, it couldn't find dictionaries and unusable for me :(
I will try on my Ubuntu over weekend. |
On my Ubuntu it 22.04.4 LTS it works like a charm. Compiles without a problem and fetches installed dictionaries |
Thanks for confirming @connormclaud |
I'll leave this issue open for now so that others can find if need be. |
I tried to install the
jinx
module for Emacs, snap r2249, on Ubuntu 22.04.3 LTS. I have the libenchant2-2 and libenchant-2-dev apt packages installed, both version 2.3.2-1ubuntu2.I started
emacs -q
and then executed the following form, adapting from the instructions from #66:I get the following backtrace:
I assume this is because the system
/lib/x86_64-linux-gnu/libenchant-2.so.2
is not compatible with the version of glibc in the snap.Do you have any suggestions on how to work around this?
The text was updated successfully, but these errors were encountered: