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

emacsql urges to install sqlite3 for magit which crashes Emacs #15992

Closed
vitaminace33 opened this issue Apr 27, 2023 · 13 comments
Closed

emacsql urges to install sqlite3 for magit which crashes Emacs #15992

vitaminace33 opened this issue Apr 27, 2023 · 13 comments

Comments

@vitaminace33
Copy link
Contributor

vitaminace33 commented Apr 27, 2023

Description :octocat:

I recently performed a clean install of Spacemacs (because of reasons) with rm -rf ~/.emacs.d && git clone [...] && emacs. After that, when accessing the status of a git repository, a message would urge me to install sqlite3 (reported at r/spacemacs). Doing so and issuing M-m g s crashes Emacs.

Reproduction guide 🪲

  1. Clean install Spacemacs with git layer enabled
  2. Start Emacs (everything is installed)
  3. Install sqlite3
    • OS' dynamic library: in a shell type sudo apt install libsqlite3-{0,dev}
    • Emacs' pacakge, add sqlite3 to dotspacemacs-additional-packages (M-m f e d)
  4. Restart Emacs, issue M-m q R
    • If not installed yet, Emacs will download sqlite3
  5. Open a git repository
  6. Check status, issue M-m g s
    • If not built yet, Emacs will compile sqlite3.el
  7. Repeat steps 4-5-6

Observed behaviour: 👀 💔

  • Emacs should crash after completing step 7.
  • If in a first round steps 3-4 are omitted, emacsql will eventually print the the following message.
Warning (emacsql): Since your Emacs does not come with
built-in SQLite support [1], but does support C modules, the best
EmacSQL backend is provided by the third-party `sqlite3' package
[2].

Please install the `sqlite3' Elisp package using your preferred
Emacs package manager, and install the SQLite shared library
using your distribution's package manager.  That package should
be named something like `libsqlite3' [3] and NOT just `sqlite3'.

In the current Emacs instance the legacy backend is used, which
uses a custom SQLite executable.  Using an external process like
that is less reliable and less performant, and in a few releases
support for that might be removed.

[1]: Supported since Emacs 29.1, provided it was not disabled
     with `--without-sqlite3'.
[2]: https://github.com/pekingduck/emacs-sqlite3-api
[3]: On Debian https://packages.debian.org/buster/libsqlite3-0 Disable showing Disable logging

Expected behaviour: ❤️ 😄

  • Emacs should not crash.
  • Installation of sqlite3 should be taken care of by the git layer or at least be documented.
    • In this sense,libsqlite3-dev is only needed at compile time.

System Info 💻

  • OS: gnu/linux
  • Emacs: 28.1
  • Spacemacs: 0.999.0
  • Spacemacs branch: develop (rev. 0bbb41e)
  • Graphic display: t
  • Running in daemon: nil
  • Distribution: spacemacs
  • Editing style: emacs
  • Completion: helm
  • Layers:
(auto-completion better-defaults bibtex
                 (c-c++ :variables c-c++-backend 'lsp-clangd)
                 emacs-lisp epub git helm html
                 (julia :variables julia-backend 'lsp julia-repl-switches "--threads 8")
                 (latex :variables latex-enable-auto-fill nil latex-enable-magic nil)
                 (lsp :variables lsp-julia-default-environment "~/.julia/environments/v1.8")
                 markdown mu4e multiple-cursors octave org pdf
                 (shell :variables shell-default-position 'right shell-default-shell 'vterm)
                 shell-scripts spacemacs-org spell-checking syntax-checking version-control treemacs
                 (yaml :variables yaml-enable-lsp t))
  • System configuration features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Backtrace 🐾

I don't know.

@lebensterben
Copy link
Collaborator

this warning is new: magit/emacsql@6401226

@lebensterben
Copy link
Collaborator

lebensterben commented Apr 27, 2023

I think you need to report to the upstream, https://github.com/pekingduck/emacs-sqlite3-api/issues

@vitaminace33 vitaminace33 changed the title emacsql urges to install sqlite3 for magit which crashes Emacs emacsql urges to install sqlite3 for magit what crashes Emacs Apr 27, 2023
@calpluca
Copy link

Same thing on Ubuntu 22.04, Emacs 27.1. Warning comes up everytime I run magit-status, but Emacs does not seem to crash and I can still work normally after quitting the warnigns buffer

@smile13241324 smile13241324 changed the title emacsql urges to install sqlite3 for magit what crashes Emacs emacsql urges to install sqlite3 for magit which crashes Emacs Jun 11, 2023
@smile13241324
Copy link
Collaborator

Hi :),

I have just read through the messages, and noticed that the upstream package did not receive any update since March. Can someone check if the issue also happens with emacs 29.1? Given that we already have an issue with package.el and org in emacs < 29.1 upgrading emacs to 29.1 could be proper fix for all affected persons.

mfg
Maxi

@zerinoid
Copy link

zerinoid commented Jul 7, 2023

Hi :),

I have just read through the messages, and noticed that the upstream package did not receive any update since March. Can someone check if the issue also happens with emacs 29.1? Given that we already have an issue with package.el and org in emacs < 29.1 upgrading emacs to 29.1 could be proper fix for all affected persons.

mfg Maxi

any confirmation about upgrading to 29.1?

@vitaminace33
Copy link
Contributor Author

No, still at 28.2.

@usernolan
Copy link

I upgraded to 29.1 earlier this week, and continued seeing this warning. I already had sqlite installed via brew at version 3.42.0, so I added sqlite3 to dotspacemacs-additional-packages, and restarted. After prompting me to build the sqlite3-api module when I next SPC g s'd, everything seems to be working fine, and the warning is gone. I have not experienced any crashes over a few hours of usage of the sqlite-enabled magit.

Pretty happy about not seeing that anymore. Hopefully this helps!

@zerinoid
Copy link

zerinoid commented Aug 9, 2023

Did it stop even after restarting emacs?

@vitaminace33
Copy link
Contributor Author

I am still using 28.1 on Ubuntu (28.2 on Manjaro). I no longer suffer from this bug that affected me only on Ubuntu. I don't know if because of a sys update or a Spacemacs/packages update.

@vitaminace33
Copy link
Contributor Author

In the upstream issue thread, a guy found that magit was maybe to blame. In any case, I closed the issue there and so I am doing here since it doesn't seem to be reproducible any longer.

Thanks for the help.

@SamuelBanya
Copy link

I am still getting this on Emacs Version 29.1 on Linux Mint that was installed via the default 'git clone' install instructions for Spacemacs.

This still has not been fixed.

@drobban
Copy link

drobban commented Oct 31, 2023

Ubuntu 22.04.3 LTS
Spacemacs - a1680f2
Emacs 27.1

Started getting same warnings from magit as reported above.
I added sqlite3 to additional packages as suggested by @usernolan and the problem/warning went away.

Should perhaps mention that I never got any crashes

@Irratzo
Copy link

Irratzo commented Nov 16, 2023

On MacOS 13.5.2, Spacemacs@Emacs version 0.999.0@29.1, followed @usernolan 's advice above. On next call of magit-status, the warning was gone and no crash occurred.

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

No branches or pull requests

9 participants