syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.68k stars 4.89k forks source link

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

Closed vitaminace33 closed 1 year ago

vitaminace33 commented 1 year ago

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 :beetle:

  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: :eyes: :broken_heart:

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 likelibsqlite3' [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'.

[3]: On Debian https://packages.debian.org/buster/libsqlite3-0 Disable showing Disable logging


*Expected behaviour:* :heart: :smile:
- 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 :computer:
- OS: gnu/linux
- Emacs: 28.1
- Spacemacs: 0.999.0
- Spacemacs branch: develop (rev. 0bbb41ec9)
- Graphic display: t
- Running in daemon: nil
- Distribution: spacemacs
- Editing style: emacs
- Completion: helm
- Layers:
```elisp
(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))

Backtrace :paw_prints:

I don't know.

lebensterben commented 1 year ago

this warning is new: https://github.com/magit/emacsql/commit/64012261f65fcdd7ea137d1973ef051af1dced42

lebensterben commented 1 year ago

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

calpluca commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

No, still at 28.2.

usernolan commented 1 year ago

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 commented 1 year ago

Did it stop even after restarting emacs?

vitaminace33 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 11 months ago

Ubuntu 22.04.3 LTS Spacemacs - a1680f27783b42e14d0c1a7e61fe787500a2db4e 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 commented 11 months ago

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.