-
-
Notifications
You must be signed in to change notification settings - Fork 985
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
Failing to build nightly on MacOS due to "librsync.h file not found" #4042
Comments
You need to install librsync |
Thanks, that fixed it, should the list on https://sw.kovidgoyal.net/kitty/build/ be updated to include librsync ? |
It already is in master. The documentation lists the deps for the |
Excellent! should have looked there first considering im building nightly ; ) |
Thanks :) Oh and note that nowadays there are nightly builds of kitty |
I've installed
|
librsync.h needs to be somewhere in a standard include directory on your system. Or use the --extra-include-dirs argument to setup.py to specify the path to the folder it is placed in. |
@kovidgoyal I've included the librsync headers. But failing like this. FYI, I am trying to build kitty in Mac book Pro M1 Chip
|
next you need to include librsync.dylib in some standard location. |
Thanks @kovidgoyal . I was able to build successfully using |
When I do
|
The |
Thanks sir for your help, will take a try tonight. |
after installing
with home-brew and source a python3.9 virtual environment, remove full kitty folder and redo git clone
works ! |
I must still be doing something wrong here. I run the following in the kitty directory:
This seems to work successfully as a kitty.app file gets made:
But actually trying to run the kitty.app file by double clicking on the icon brings "kitty quit unexpectedly" with the following details:
For some reason it looks like it's looking for EDIT: Got it working. I just used the homebrew installed Python3 instead of the "native" one.
I'm leaving this all here in case anyone else needs it. |
Failing with a macOS 12.1 Using
This fails at the linking step.
Not sure where in the build the stack size option is being passed in |
It's not. That comes from a broken python installation, probably |
Thanks so much. Found this in the issues. I just searched Afterwards,
built and linked without trouble. However.... upon launching kitty.app, I got a segfault. So, perhaps that quick fix was not the answer. |
Thank you for leaving this here. It helped me. My slightly updated command (python 3.9.10 changed some paths) looked liked this: |
Somebody install kitty in Clear Linux The error about librsync.h also appear But i dont Know what blunder install that include that lib. |
|
Just to provide more context (sorry for the bump): If you're using MacOS, you can grab the runtime and build times dependencies via Homebrew. It's okay if you have some of these already installed, it won't reinstall. # You should double check everything is upgraded first.
brew update
brew upgrade
# These are both runtime and buildtime.
brew install librsync harfbuzz zlib libpng librsync openssl go gcc Now you're going to need to add LDFLAGS as a prefix, as we're going to need to add the librsync directory. Homebrew has changed where it stores files on Apple Silicon (M1/M2, etc) vs Intel, but there is a super handy way to ensure you're using the correct prefix and the latest versions. LDFLAGS=-L$(brew --cellar librsync)/$(brew list --versions librsync | tr ' ' '\n' | tail -1)/lib python3 setup.py --extra-include-dirs $(brew --cellar librsync)/$(brew list --versions librsync | tr ' ' '\n' | tail -1)/include Note this can be a little slow as it has to invoke Homebrew, so a faster step might be to just do: echo $(brew --cellar librsync)/$(brew list --versions librsync | tr ' ' '\n' | tail -1) So for Apple Silicon for example I get this path: /opt/homebrew/Cellar/librsync/2.3.4 So my command now becomes: LDFLAGS=-L/opt/homebrew/Cellar/librsync/2.3.4/lib python3 setup.py --extra-include-dirs /opt/homebrew/Cellar/librsync/2.3.4/include PythonNow as another note, the Python version may be something you don't want to use (ie if installing via homebrew, or using multiple system versions, etc). You can use a tool like pyenv to create a locked version you use in that directory, so you can always use 3.10.10 if you wanted. I also HIGHLY recommend using virtualenvs, so you don't fight with system pip versions. pyenv steps (optional, but recommended):
Virtualenv steps
You're now in the shell for this. You can also just use the python3 binary if you want (``./.venv/bin/activate`). So to build the app files we would need to do this, instead of LDFLAGS=-L$(brew --cellar librsync)/$(brew list --versions librsync | tr ' ' '\n' | tail -1)/lib python3 setup.py kitty.app --extra-include-dirs $(brew --cellar librsync)/$(brew list --versions librsync | tr ' ' '\n' | tail -1)/include
|
Thanks, it worked for me! Wouldn't it make sense for kitty to build according to instructions without custom flags? Or for the instructions to be augmented to make the build work on Apple Silicon? |
Hi
This morning building kitty from nightly has stopped working on my MacOS BigSur 11.6, something that has not failed me for a year or so since i started building from source.
Excuse my poorly developed script for building from nightly:
#!/bin/bash
cd ~/nightly/kitty
git fetch origin
if ! git diff origin master --quiet
then
git pull
make app
# python3 setup.py linux-package
rm -rf /Applications/kitty.app
cp -R kitty.app /Applications
rm -rf /usr/local/lib/kitty
# cp -R linux-package/ /usr/local
fi
▶ make app
python3 setup.py kitty.app
CC: clang (12, 0)
:1:10: fatal error: 'librsync.h' file not found
#include <librsync.h>
^~~~~~~~~~~~
1 error generated.
The librsync library is required
make: *** [app] Error 1
I am not sure if this has something todo with my updates of python or some other Homebrew process.
I also notice some failures in your Actions related to the same file and MacOS
Thank you
The text was updated successfully, but these errors were encountered: