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

Testers needed for Linux binaries #595

Closed
kovidgoyal opened this issue Jun 1, 2018 · 25 comments
Closed

Testers needed for Linux binaries #595

kovidgoyal opened this issue Jun 1, 2018 · 25 comments

Comments

@kovidgoyal
Copy link
Owner

I have made new binary builds of kitty available for Linux (with bundled dependencies), along with a one-liner to install them. See https://sw.kovidgoyal.net/kitty/binary.html for details. This way people wanting to be up-to-date with the latest release version of kitty dont need to build from source.

It would be nice if we could get some testing on different Linux distributions.

P.S. The one-liner works on macOS also, where it simply downloads the dmg and installs it into /Applications auto-magically.

@kovidgoyal kovidgoyal changed the title Testers needed Testers needed for Linux binaries Jun 2, 2018
@reed-jones
Copy link

Ubuntu 18.04, the binary install went great. I made a symlink from ~/.local/kitty.app/bin/kitty to ~/.local/bin/kitty, and copied ~/.local/kitty.app/share/applications/kitty.desktop to ~/.local/share/application/kitty.desktop, and had to change the Icon in the desktop file to its full absolute path, but then everything worked great, as expected!

@kovidgoyal
Copy link
Owner Author

Good to know :)

@brontosaurusrex
Copy link

brontosaurusrex commented Jun 17, 2018

cat /etc/issue.net && curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
Debian GNU/Linux 9
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Using python executable: /usr/bin/python3
100  8225  100  8225    0     0  50853      0 --:--:-- --:--:-- --:--:-- 51086
Checking for latest release on GitHub...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 222, in script_launch
  File "<string>", line 189, in main
  File "<string>", line 78, in get_latest_release_data
  File "/usr/lib/python3.5/json/__init__.py", line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

p.s. My python knowhow is way to low to even have an opinion on the above.

@kovidgoyal
Copy link
Owner Author

This is a bug in python versions before 3.6, should be an easy workaround. Basically versions of python between 3 and 3.5 only used a version of json.loads that could not decode bytes.

@kovidgoyal
Copy link
Owner Author

2aba3e2

@brontosaurusrex
Copy link

brontosaurusrex commented Jun 18, 2018

That did the trick

curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8249  100  8249    0     0  28705      0 --:--:-- --:--:-- --:--:-- 28742
Using python executable: /usr/bin/python3
Checking for latest release on GitHub...
Will download and install kitty-0.11.1-x86_64.txz
Downloaded 8520320 bytes 
Extracting tarball...
kitty successfully installed to /home/ticho/.local/kitty.app
Use /home/ticho/.local/kitty.app/bin/kitty to run kitty
Traceback (most recent call last):
  File "python3.6/runpy.py", line 280, in run_path
  File "python3.6/runpy.py", line 85, in _run_code
  File "kitty/__main__.py", line 96, in <module>
  File "kitty/__main__.py", line 89, in main
  File "kitty/main.py", line 10, in <module>
  File "kitty/borders.py", line 8, in <module>
ImportError: /home/ticho/.local/kitty.app/bin/../lib/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates

Now I need a newer harfbuzz python ... I assume?

@kovidgoyal
Copy link
Owner Author

No, a newer freetype, harfbuzz is bundled, freetype is not, because it often has system specific patches.

@brontosaurusrex
Copy link

brontosaurusrex commented Jun 18, 2018

Some of this?

apt-cache policy libfreetype6    
libfreetype6:
  Installed: 2.7-0.1
  Candidate: 2.7-0.1
  Version table:
 *** 2.7-0.1 100
        100 /var/lib/dpkg/status
     2.6.3-3.2 500
        500 https://deb.debian.org/debian stretch/main amd64 Packages

apt-cache policy libftgl2 
libftgl2:
  Installed: 2.1.3~rc5-4+nmu1.1
  Candidate: 2.1.3~rc5-4+nmu1.1
  Version table:
 *** 2.1.3~rc5-4+nmu1.1 500
        500 https://deb.debian.org/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status

@kovidgoyal
Copy link
Owner Author

libfreetype6

@brontosaurusrex
Copy link

brontosaurusrex commented Jun 18, 2018

libfreetype6 backported from sid, still no joy

~/.local/kitty.app/bin 

./kitty 
[169 23:21:59.654064] Unknown uniform in cursor program: _main_pos_map_0[0]

apt-cache policy libfreetype6
libfreetype6:
  Installed: 2.8.1-2~bpo9+1
  Candidate: 2.8.1-2~bpo9+1
  Version table:
 *** 2.8.1-2~bpo9+1 100
        100 /var/lib/dpkg/status
     2.6.3-3.2 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages

@kovidgoyal
Copy link
Owner Author

That indicates a problem in your OpenGL stack, the shader compiler is not able to handle OpenGL 3.3 shaders. Updating the drivers should do the trick.

@brontosaurusrex
Copy link

I'am assuming this is a problem with nvidia blob (really old nvidia card) and switching to nouveau would probably fix that?

@kovidgoyal
Copy link
Owner Author

Probably, I dont have any experience with nvidia, though.

@arubertoson
Copy link
Contributor

on CentOS 7 the freetype provided comes with the same missing symbol:

../kitty/bin/../lib/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates

My current approach around this is:

  • Download new harfbuzz + freetype
  • build freetype with harfbuzz
  • install libraries into kitty/lib
  • patch libharfbuzz provided by kitty to look in '$ORIGIN' first

It works... It's clunky, what would be the issues of providing a freetype library bundled with kitty? If it's meant to work as a standalone it wouldn't really be affected from the system libraries no?

@kovidgoyal
Copy link
Owner Author

FreeType is often patched by distros and fontconfig depends on it which is even more often patched and reads files from various compile time option dependent locations and creates system-wide caches whose format is version dependent. As such they are not suitable for inclusion in a bundle. All you need to do is delete the harfbuzz from the kitty lib dir and kitty should use your system harfbuzz instead which hopefully is new enough (IIRC kity requires harfbuzz >= 1.6

@arubertoson
Copy link
Contributor

Ah, shame

CentOS only makes 1.3.2 available - unless I've got privileges that won't change anytime soon. I've left fontconfig alone, I really didn't know that FreeType had those limitations. Until something breaks I'll continue doing the workaround.

Thanks!

@nh2
Copy link

nh2 commented Sep 7, 2018

I just tried the binary installer on Ubuntu 16.04 and got:

% curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8249  100  8249    0     0  17618      0 --:--:-- --:--:-- --:--:-- 17588
Using python executable: /usr/bin/python3
Checking for latest release on GitHub...
Will download and install kitty-0.12.0-x86_64.txz
Downloaded 8088464 bytes 
Extracting tarball...
kitty successfully installed to /home/niklas/.local/kitty.app
Use /home/niklas/.local/kitty.app/bin/kitty to run kitty
Traceback (most recent call last):
  File "python3.7/runpy.py", line 280, in run_path
  File "python3.7/runpy.py", line 85, in _run_code
  File "kitty/__main__.py", line 110, in <module>
  File "kitty/__main__.py", line 103, in main
  File "kitty/main.py", line 10, in <module>
    from .borders import load_borders_program
  File "kitty/borders.py", line 7, in <module>
    from .fast_data_types import (
ImportError: /home/niklas/.local/kitty.app/bin/../lib/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates

It would be nice if the website could mention systems on which the binary installer is known to not work due to too old system dependencies, so that people don't spend time on this.

@wd5gnr
Copy link

wd5gnr commented Sep 7, 2018

In case you are listening to nh2's advice, I agree. KDE Neon also has this problem. Yes I can go track down a newer freetype or build from source, but....

Update: http://ubuntuhandbook.org/index.php/2017/06/install-freetype-2-8-in-ubuntu-16-04-17-04/

That PPA will get you working.

@Herz3h
Copy link

Herz3h commented Sep 11, 2018

Thanks @wd5gnr that fixed it for me too on Ubuntu 16.04

@Petrox
Copy link

Petrox commented Mar 10, 2019

Unfortunately http://ubuntuhandbook.org/index.php/2017/06/install-freetype-2-8-in-ubuntu-16-04-17-04/ does not work anymore, the referred ppa has been removed.

@sung-kim
Copy link

This worked for me on Ubuntu 16.04:

  • Install freetype 2.8 (or 2.9), and harfbuzz if needed
    • harfbuzz is only needed if you get errors about missing symbols with a prefix hb_
    • There actually shouldn't be any issues with harfbuzz since kitty comes with the libraries in lib, but mentioning it anyway
  • There are some straightforward directions for FT/HB installation here: http://www.linuxfromscratch.org/blfs/view/8.2-systemd/general/freetype2.html (link is for FT 2.9, but the same author has directions for 2.8).

After installing freetype, you can verify the newly installed libs (libfreetype.so and libfreetype.so.6 on my system) have the missing symbols: nm -D <libname> | grep FT_Get_Var, or something similar. The symbols should have a T next to them.

There might be a couple locations to softlink the freetype .so's into, just run find . -name "*freetype*" in /usr/lib to find those locations. Don't delete the old shared libraries of course, in case some other app relies on them and you need to revert.

I guess it's worth mentioning since I spent an hour messing around with font hinting until realizing it was actually a totally different font (oops 😅 ) - kitty doesn't default to the system default font. So for Ubuntu, font_family Ubuntu Mono (no double quotes).

Cheers!

@jberryman
Copy link

FWIW, on Debian stretch It looks like things are working after doing:

  • unpack the binary bundle from https://github.com/kovidgoyal/kitty/releases to ~/.local
  • build harfbuzz from source (was very straightforward ./autogen.sh && ./configure && make)
  • copy the libharfbuzz.so you just built, overwriting ~/.local/lib/libharfbuzz.so.0

@ogabriel
Copy link

@jberryman this solution of yours works in debian stretch, thanks

@D3faIt
Copy link

D3faIt commented Sep 8, 2019

@jberryman Thank you so much!

I've struggled to get this working, and now I finally have it!

On thing to note, after building harfbuzz, libharfbuzz.so, it should be located under src/.libs

@spytheman
Copy link

FreeType is often patched by distros and fontconfig depends on it which is even more often patched and reads files from various compile time option dependent locations and creates system-wide caches whose format is version dependent. As such they are not suitable for inclusion in a bundle. All you need to do is delete the harfbuzz from the kitty lib dir and kitty should use your system harfbuzz instead which hopefully is new enough (IIRC kity requires harfbuzz >= 1.6

This worked, thank you!
rm -rf ~/.local/kitty.app/bin/../lib/libharfbuzz.so.0

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