kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.62k stars 986 forks source link

Build fails on Ubuntu 22.04; uuid not found, required by fontconfig #7686

Closed TamaMcGlinn closed 3 months ago

TamaMcGlinn commented 3 months ago

Describe the bug Unable to build on Ubuntu 22.04.

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/kovidgoyal/kitty.git && cd kitty
  2. ./dev.sh build
  3. See error:
$ ./dev.sh build
Package uuid was not found in the pkg-config search path.
Perhaps you should add the directory containing `uuid.pc'
to the PKG_CONFIG_PATH environment variable
Package 'uuid', required by 'fontconfig', not found
The package fontconfig was not found on your system
The following build command failed: /home/myusername/path/to/kitty/dependencies/linux-amd64/bin/python setup.py develop
exit status 1

By the way, apt says:

fontconfig-config is already the newest version (2.13.1-4.2ubuntu5).
kovidgoyal commented 3 months ago

So install libuuid-dev

TamaMcGlinn commented 3 months ago
$ sudo apt install libuuid-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libuuid-dev     

In case you meant one of these, I tried installing all of them and the issue is still the same:

libuuid1              libuuid-perl          libuuid-urandom-perl  
libuuidm-ocaml-dev    libuuid-tiny-perl

Once we resolve this, would you welcome a PR to add it to the dependencies listed in the build docs? Currently you say "All you need to get started is a C compiler and the go compiler." Or, would you prefer to add this to ./dev.sh build itself?

TamaMcGlinn commented 3 months ago

Ah, I figured it out. The step "install dependencies" is missing from the build docs I linked to. It should have this line before ./dev.sh build:

sudo apt install libdbus-1-dev libxcursor-dev libxrandr-dev libxi-dev libxinerama-dev libgl1-mesa-dev libxkbcommon-x11-dev libfontconfig-dev libx11-xcb-dev liblcms2-dev libssl-dev libpython3-dev libxxhash-dev libsimde-dev

(after installing libfontconfig-dev, I had a similar error with the next dependency, xrandr)

kovidgoyal commented 3 months ago

On Thu, Aug 01, 2024 at 02:17:56AM -0700, Tama McGlinn wrote:

Ah, I figured it out. The step "install dependencies" is missing from the build docs I linked to. It should have this line before ./dev.sh build:

sudo apt install libdbus-1-dev libxcursor-dev libxrandr-dev libxi-dev libxinerama-dev libgl1-mesa-dev libxkbcommon-x11-dev libfontconfig-dev libx11-xcb-dev liblcms2-dev libssl-dev libpython3-dev libxxhash-dev libsimde-dev

Yes the instructions assume you are working on a at least somewhat functional computer. I am not going to bundle an entire OS with kitty.

TamaMcGlinn commented 3 months ago

I don't see how that vitriol was necessary, I was just suggesting to improve your build docs by moving around the instructions, so that the build dependencies are installed before trying to build kitty, which seems sensible to me. I'm not suggesting to "bundle an entire OS".

Is a PR welcome to fix this, or not?

kovidgoyal commented 3 months ago

On Thu, Aug 01, 2024 at 03:43:34AM -0700, Tama McGlinn wrote:

I don't see how that vitriol was necessary, I was just suggesting to improve your build docs by moving around the instructions, so that the build dependencies are installed before trying to build kitty, which seems sensible to me. I'm not suggesting to "bundle an entire OS".

The build dependencies not bundled by dev.sh are system specific. If you were serious about that you would need to go investigate the 50 linux distributions make a table of the dependencies on each of them.

Is a PR welcome to fix this, or not?

If you can come up with a way to actually fix it, sure. Listing a Ubuntu/Debian specific (and that too probably version specific) install command isnt that.