reddit / emacs

How to resolve error: "configure: error: No package 'gtk+-3.0' found" when installing emacs

TheLastSock · 2022-05-16 10:06
Running `export CC=/usr/bin/gcc-10 && export CXX=/usr/bin/gcc-10 && ./autogen.sh && ./configure --with-native-compilation --with-x-toolkit=gtk3` results in a long list of checks ending in this `configure: error: No package 'gtk+-3.0' found` I have consulted google and the stars and still don't know what I'm supposed to do. I have installed every variant of libgtk-3-dev and gtk i can think of and nothing helps. I couldn't find a cohesive set of instructions either. Running Ubuntu 20.04
ieure · 2022-05-16 16:02
libgtk-3-dev should be the package you want. Check the `configure.log` for clues, see if it has switches to increase verbosity so you can see what it's missing. If it mentions a specific header file it can't find, you can head to https://packages.debian.org and put it into "Search the contents of packages" to see what package you need to install.
arthurno1 · 2022-05-17 08:57
> export CC=/usr/bin/gcc-10 Is there some special reason why you compile with older gcc? Current one is in version 12.1, Emacs compiles fine with it. > export CXX=/usr/bin/gcc-10 You don't need c++ compiler, Emacs does not have c++ code in its sources. Actually, if you have GCC in your path, which you seem to have since /usr/bin is normally in the path, you don't need those 'export' options at all. Seems like configure can not find gtk3 headers. Did you install gtk3? I am not an Ubuntu user, so I don't know how they package gtk, you might wish to check on that. Also I don't know what Ubuntu does for devs, but maybe you need to run some extra command for the OS to set up your development environment or to add headers manually or something else?