This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-16
Channels
- # announcements (2)
- # asami (124)
- # babashka (30)
- # babashka-sci-dev (73)
- # beginners (40)
- # biff (1)
- # calva (39)
- # clj-kondo (54)
- # clj-otel (1)
- # cljdoc (59)
- # cljs-dev (8)
- # clojars (2)
- # clojure (96)
- # clojure-austin (16)
- # clojure-boston (6)
- # clojure-europe (51)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-russia (60)
- # clojure-uk (4)
- # clojurescript (34)
- # community-development (6)
- # cursive (2)
- # datahike (10)
- # datascript (18)
- # emacs (109)
- # etaoin (1)
- # events (3)
- # figwheel-main (41)
- # fulcro (13)
- # helix (4)
- # introduce-yourself (5)
- # jobs (1)
- # leiningen (5)
- # lsp (8)
- # malli (6)
- # meander (7)
- # nrepl (6)
- # off-topic (60)
- # pathom (29)
- # polylith (8)
- # re-frame (5)
- # reitit (1)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (33)
- # sci (3)
- # shadow-cljs (3)
- # xtdb (82)
I'm following the helpful guide here for installing emacs28.1. I get this error at the end
./configure --with-native-compilation --with-harfbuzz
...
checking for libXaw... configure: error: No X toolkit could be found.
If you are sure you want Emacs compiled without an X toolkit, pass
--with-x-toolkit=no
to configure. Otherwise, install the development libraries for the toolkit
that you want to use (e.g. Gtk+) and re-run configure.
Which appears when i run make to, and i persume is what's blocking the install.
I assume i want the toolkits, menus, popups, etc....
I think i have gtk installed so i'm confused why it's not being used, or why no it's not mentioned in the install script(s) i have seen if it needs to be specified. That or i don't have a proper "toolkit" installed and i would love some help figuring out how to do that.If on Ubuntu/Debian, the packages required for building Emacs can be installed using
sudo apt build-deps Emacs
Or search for the library names mentioned by ./configure using apt-cache
apt-cache search --names-only libraryname
thanks. Looks like i have to resolve this issue with my source list
✘ drewverlee@drewverlee ~/Downloads/emacs-28.1 sudo apt build-dep emacs
Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list
i was able to do that by doing exactly what it said. Though i likely just opened some doors that typically i want shut im guessing.
This is my guide that seems to have worked on a couple of different versions of Ubuntu https://github.com/practicalli/blog/issues/129
thanks john. That is what i'm using! I forgot to put the link in. (it's been quite a day for me
If you launch Software & Updates
on ubuntu desktop, then just check the Source Code entry in Ubuntu Software
yep thats what i did.
Hmm, perhaps check /etc/apt/sources.list
to see if the deb-src
entries have been commented out (or possibly deleted)
sources.list should have
i was able to run sudo apt build-dep emacs without the errors.
I just ran make
and it completed, but emacs isn't on the path...
./src/emacs -Q loads works...
make install
will install emacs globally the -Q is just a quick way of testing without using the config
ah i see
i thought the rest of the instructions were a different way of installing
There is a lot of stuff at the end for tweaking installs, but it seems its not really necessary unless there are certain features you know you want to exclude.
Once you have got to make install
then you should be done
emacs is loading but it doesn't look great (the font is all off) and i'm getting a lot of errors. Here is a sampling:
Error (use-package): clojure-essential-ref-nov/:catch: Symbol's value as variable is void: cider-mode-map Disable showing Disable logging
Warning (comp): smartparens.el:1460:1: Warning: custom-declare-variable `sp-highlight-wrap-tag-overlay' docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:2726:42: Warning: value returned from (< (sp--get-overlay-length nil) (sp--get-overlay-length nil)) is unused Disable showing Disable logging
Warning (comp): smartparens.el:2726:42: Warning: value returned from (< (sp--get-overlay-length nil) (sp--get-overlay-length nil)) is unused Disable showing Disable logging
Warning (comp): smartparens.el:2726:42: Warning: value returned from (< (sp--get-overlay-length nil) (sp--get-overlay-length nil)) is unused Disable showing Disable logging
Warning (comp): smartparens.el:2907:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:2913:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:5534:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:7200:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:8229:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:8728:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): evil-cleverparens-util.el:271:21: Warning: looking-back called with 1 argument, but requires 2-3 Disable showing Disable logging
Warning (comp): smartparens.el:9411:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): evil-cleverparens-util.el:291:15: Warning: 'in-string-p' is an obsolete function (as of 25.1); use (nth 3 (syntax-ppss)) instead. Disable showing Disable logging
W
There will be lots of warnings when you first run emacs. Its downloading all new packages and also natively compiling them. Once all the emacs packages have downloaded, then restart emacs. If there are still pages of warnings, then its something to look at.
So long as you are not getting messages about certificates, then I suspect everything is okay
i'm trying to figure out if it's ok right now. it looks like fonts and pictures are loading propery
In Emacs, run
SPC SPC all-the-icons-install-fonts
to fix the modeline fontsIf that is all the warnings you have left, then I think thats fine.
If you havent updated spacemacs in a while, i.e. pulled a new version of .emacs.d
, then that may be useful, especially if there are lingering warnings
other things seem ok...
SPC SPC all-the-icons-install-fonts
ran correctly but nothing changed.I assume a restart of emacs is required
> (Spacemacs) Warning: Cannot find any of the specified fonts (Fira Code)! Font settings may not be correct.
i did restart
sudo apt install fonts-firacode
or edit .spacemacs/init.el
and change to your preferred (and installed 🙂 ) font
i'm really happy with firacode i'm just confused because it is installed
fonts-firacode is already the newest version (2+dfsg1-1).
i didnt move emacs from local/bin ... i'm not sure why that would matter
maybe there is more than one emacs binary on the execution path...
which emacs
✘ drewverlee@drewverlee ~ which emacs /usr/local/bin/emacs
drewverlee@drewverlee ~ emacs --version GNU Emacs 28.1
so that seems right
I would recommend keeping emacs in the install location.
If you need to install it somewhere else, then go back to the emacs source directory and uninstall it. Then use the --prefix to install to a different location.
As the instructions state, its not just a single binary install...
Ah, sorry, I read that wrong...
I though you said you did move it...
i recall the instructions talking about moving it, like maybe it was a good idea. I didn't. i was just fishing for something that could be off. trying to figure out why it can't fira code atm.
maybe i didnt' include harfbuzz?
i did 11780* ./configure --with-native-compilation --with-harfbuzz
harfbuzz should be on by default, if the libraries are installed on the operating system
The fira code fonts should be in
/usr/share/fonts-firacode
drewverlee@drewverlee ~ ls /usr/share/fonts-firacode/
woff woff2
im going to restart my computer. didn't help lol.
Hmm, perhaps libotf0
and libotf-dev
are not installed, but that seems unlikely.
it says they were already at the newest version
Is emacs actually using the firacode font and just giving a warning, or is it using a different font? Did you still have the unicode layer uncommented in .spacemacs / .spacemacs/init.el ? Suggest trying with a different font and see if it also gives a similar warning for that font.
it's not using the font. Commenting out the spacemacs-default-font var and it falls back to ubunut font (or something) which gives the same error.
unicode lyaer uncommented?
this?
;; Support font ligatures (fancy symbols) in all modes
;; 'prog-mode for only programming languages
;; including text-mode may cause issues with org-mode and magit
(unicode-fonts :variables
unicode-fonts-enable-ligatures t
unicode-fonts-ligature-modes '(prog-mode))
I recall that you uncommented the unicode
layer in the spacemacs config as it was building the fonts each time when using emacs29
However, It seems that there is something missing with the emacs build... I think
you could try sudo fc-cache
to rebuild the font cache, but I think the computer reboot should have taken care of that
In the emacs source code directory, could you run
./configure --with-native-compilation > confiuration-output.txt
and paste the contents of http://configuration-output.it in a gist or some other text sharing thingsure. the warnings don't look encouraging. I don't recall that when i ran it before
drewverlee@drewverlee ~/emacs ➦ 5a223c7f2e ./configure --with-native-compilation > confiuration-output.txt
configure: WARNING: cairo requested but not found.
configure: error: ELisp native compiler was requested, but libgccjit was not found.
Please try installing libgccjit or a similar package.
If you are sure you want Emacs be compiled without ELisp native compiler,
pass the --without-native-compilation option to configure.
hmm i though that would be easy to download.
I assume you need to set these environment variables before running configure
export CC=/usr/bin/gcc-10
export CXX=/usr/bin/gcc-10
i believe i did. but maybe then i switched terminals or something lame.
Yes, I did that a few times 🙂
should i make uninstall? then do it again?
oh your saying for this command
you were saying i needed to run that export before doing ./configure --with-native-compilation > confiuration-output.txt right?
or do you think thats the issue with the install.
the config drives the build. looking at config output is quicker than building 🙂
This is the output from my config with the CC and CXX env vars set before running config
mainly want to check line 537 to line 584
What toolkit should Emacs use? LUCID Is that right? I guess i might expect this to read gtk-3
yea. your using GTK3
i mean, i have no idea what the difference is, but i googled how to install gtk3 for like 20 minutes and i thought i had finally done it.
I think we have the root cause identified. There are some interesting libraries installed :)
are you seeing something beyond lucid?
Did you share the updated configuration file?
Line 2 is not a good start configure: WARNING: cairo requested but not found.
Are you using Ubuntu or an ubuntu based distribution? Or something else. It doesnt seem GTK is installed, which is quite unusual, unless you are using KDE perhaps... or something other than the Gnome desktop
To my knowledge i'm just using Ubuntu. I installed it from a thumb drive like 4 years ago or so drewverlee@drewverlee ~/emacs ➦ 5a223c7f2e lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal
Do you have any emacs packages installed? I seem to recall an emacs-lucid package that may have install some libraries that its picking up...
It may be that we just need to specify GTK as the toolkit to use, so it doesnt default to other interesing things
Try running config again. Set the env vars and include the configure option (updated as a 1-line command)
export CC=/usr/bin/gcc-10 && export CXX=/usr/bin/gcc-10 && ./autogen.sh && ./configure --with-native-compilation --with-x-toolkit=gtk3
at the end checking for gtk+-3.0 >= 3.10 glib-2.0 >= 2.37.5... no configure: error: No package 'gtk+-3.0' found
I dont think the Ubuntu desktop (gnome desktop) is installed? Or its not being used
apt-cache show ubuntu-desktop
and check to see if it has an Installed-Size entry
Or logout of the desktop and click the settings cog next to the account login name and see what desktops you can login to... and what the currently selected one is
i should just do a fresh install of ubuntu
Ah, sorry, this is a better check
apt -qq list ubuntu-desktop
drewverlee@drewverlee ~/emacs ➦ 5a223c7f2e apt -qq list ubuntu-desktop
ubuntu-desktop/focal-updates,now 1.450.2 amd64 [installed]
Thats weird. If you dont have anything you need on the computer, then a fresh install may be simpler that trying to find out where things have gone astray
what's weird? for educational purposes.
weird that ubuntu desktop is installed, but the emacs build script cant find gtk3 or cairo libraries..
gotcha
If libgtk3
is installed but the emacs build script cannot find it, I dont know what the cause of that would be...
apt -qq list libgtk-3-0
with
sudo ./autogen.sh
sudo ./configure --with-native-compilation --with-x-toolkit=gtk
I seem to get them included: https://gist.github.com/drewverlee/cc71de172b3751a1dd9788eb87bdc484Did you run the export statements as separate commands ? Maybe that is why its not finding native compiliation
export CC=/usr/bin/gcc-10
...
export CXX=/usr/bin/gcc-10
I assume that libgccjit was installed
sudo apt install libgccjit0 libgccjit-10-dev
i just pasted it in as a code block. i'm guessing that was the issue. I just wanted that to work and they need a separator in that case.
This seems to work 🙂
export CC=/usr/bin/gcc-10 && export CXX=/usr/bin/gcc-10 && ./autogen.sh && ./configure --with-native-compilation --with-x-toolkit=gtk3
Nice debugging session, I've learned a lot more about building emacs. Thanks.
yea 😢 . same error No package 'gtk+-3.0' found. I have no idea. it doesn't seem to be a common issue.
Try installing the build-essentials meta package, this should bring in a load of libraries to help build Emacs
sudo apt install build-essential
I ended up just going with a ubuntu software package install, which is working out just fine for now. I smattering of things about building from source which wasn't on my todo list but i feel somewhat better for having tried. I know it shouldn't have been a hassle, but with great power...
Is any of you using cider with completion-in-region
? I tried to figure out why I couldn't complete keywords. Now I have a temp hack:
;; FIXME: why..
;; completion in region somehow ends up calling cider with blank prefix (a second time, the first time is good)
;; still in the dark why
(defun cider-complete-at-point ()
"Complete the symbol at point."
(when-let* ((bounds (bounds-of-thing-at-point 'symbol)))
(when (and (cider-connected-p)
(not (or (cider-in-string-p) (cider-in-comment-p))))
(list (car bounds) (cdr bounds)
(completion-table-dynamic
(let ((res))
(lambda (prefix)
(or res
(setf res
(cider-complete prefix))))))
:annotation-function #'cider-annotate-symbol
:company-kind #'cider-company-symbol-kind
:company-doc-buffer #'cider-create-doc-buffer
:company-location #'cider-company-location
:company-docsig #'cider-company-docsig))))
I don't need to recompute the cider completions after the first