-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
FZF broken on archlinux (ncurses library version changes) #350
Comments
Can you try Related: 1de4cc3 |
I have also problem on arch linux today after pulling latest from master. I manually compiled fzf and that binary works. Using the linked one: Using the static binary:
|
@jonaz |
@junegunn i just manually compiled fzf and that binary works. I already tried removing ~/.fzf and cloing and running ./install again without success. Check my last comment above. I saw different errors when using your static and linked binary. |
@kowalskey reported that the static binary works on his machine. 1de4cc3#commitcomment-13306953 I wonder what makes the difference. |
@jonaz I'm not sure but assertion above may suggest some locale problems. env | egrep LC\|LOCALE\|LANG
LANG=pl_PL.utf8
LC_COLLATE=C
LC_CTYPE=pl_PL.utf8
LC_MEASUREMENT=pl_PL.UTF-8
LC_MONETARY=pl_PL.UTF-8
LC_NUMERIC=pl_PL.UTF-8
LC_PAPER=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8 I removed binaries and called install once again:
|
after unsetting LC_COLLATE I reproduced problem:
So this is triggered by |
@kowalskey Thanks for the investigation! I'll see what I can do. |
This is my LOCALE/LC/LANG: $ env | egrep LC|LOCALE|LANG |
@jonaz I could also reproduce the problem:
I'm trying to find the right solution to the problem. |
Possibly related: rstudio/rmarkdown#498 |
It seems to be issue with Archlinux. There are some topics on forums, however AFAIK no practical (working) solutions are present. Few topics I encountered are: I tested a little and noticed that when
at least this is what I observe on my system. I'll try to find some other packages which are affected by this and if there aren't any bugs at http://bugs.archlinux.org regarding glibc / locale problems - I'll report one and leave URL here for reference. |
Aaand I think I pinpointed what is the problem. both me and @jonaz use statically compiled binary which is probably compiled against older glibc version. So upgrading to glibc 2.22 on arch will automatically call I think that static recompilation against newer glibc will fix that problem on Arch. Or at least it should help to confirm whether this is a problem. |
@kowalskey Awesome, thanks for looking into it. I was unsuccessful to build static binary on Arch, so currently I'm building it on Ubuntu. (I got the impression that Arch community was against this notion of static linking in general: https://www.archlinux.org/todo/remove-static-libraries/) linux: docker-arch
docker run -i -t -v $(GOPATH):/go junegunn/arch-sandbox \
/bin/bash -ci 'cd /go/src/github.com/junegunn/fzf/src; make'
linux-static: docker-ubuntu
docker run -i -t -v $(GOPATH):/go junegunn/ubuntu-sandbox \
/bin/bash -ci 'cd /go/src/github.com/junegunn/fzf/src; make STATIC=1' So we can either:
|
Okay, I was able to build a static binary on Arch by building ncurses6 and gpm from source (and with Related: #322 |
Instead of building a separate statically-linked binary, build partially-static binary that only contains ncurses to avoid compatibility issues in libc.
I think I got this. Statically linking only ncurses seems to fix the compatibility issue. I'll release 0.10.6 binaries with the change and let you know. Thank you very much for your help. |
Just released 0.10.6. Please update the git repo and re-run the install script. The problem should be gone now. Thanks.
|
Hmm, realized that the new binary does not run on old linux boxes (RHEL5) so I reverted the update. |
Phew, I changed the makefile to build the binary on Centos 6 which has old glibc 2.12, and finally it works fine on Ubuntu 14, Centos 6, RHEL 5, RHEL 6, and the latest Arch linux. |
Great job, thanks! |
On Arch x86_64, I had to change line 8 of
to
to get it to compile. Otherwise, the build halts with the following.
|
@lyeoh Yeah, that's because on Arch, libraries are not shipped with static libraries ( |
If you want to compile a static binary release that's fine for those that want it, but the source code repository should be setup to compile for their host systems. Most of us compiling from the source are going to want to run on the system it was compiled for. A statically linked build could be a build time option but it should not be the default. |
@alerque Yeah I see the point, please send me a PR, so I can still build statically compiled binary with |
Hello!
I noticed today that fzf stopped working on my Archlinux install.
Looks like ncurses got upgraded and
libncursesw.so.5
is not available anymore.I recompiled FZF to confirm that this was the problem.
Here's
ldd
output for packaged binaryAnd here's
ldd
output for self-compiled binary:I think that fzf may benefit from shipping arch-specific binary or pointing in docs that it requires compilation on latest archlinux.
Or maybe it might perform/suggest compilation in
install
script ?If you need any help/testing with this please let me know.
The text was updated successfully, but these errors were encountered: