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

libvterm.so.0: cannot open shared object file: No such file or directory on ubuntu-20.04 #14

Closed
Sbozzolo opened this issue Oct 12, 2020 · 4 comments

Comments

@Sbozzolo
Copy link

I am trying to set up CI for vterm with GitHub Actions, but I cannot get it to work with Ubuntu 20.04. No matter what I do, I always have the error libvterm.so.0: cannot open shared object file: No such file or directory". It works with Ubuntu 16.04.

See, https://github.com/Sbozzolo/emacs-libvterm/runs/912526858?check_suite_focus=true, tab "require vterm".

I don't know much about all the moving parts, so maybe I am missing something obvious.

Could it be a bug somewhere, or am I missing something obvious?

A user reported success, with the following comment:

With my limited nix knowledge I made ci.nix to build vterm-module.so which setup-emacs's emacs can load.
https://github.com/tsuu32/emacs-libvterm/runs/1222306107

Thanks for the help
Originally posted by @tsuu32 in akermu/emacs-libvterm#410 (comment)

@purcell
Copy link
Owner

purcell commented Oct 12, 2020

Thanks for getting in touch - what's your goal in asking this question? From what I can see above, somebody has demonstrated how to get this working. If you're asking why you can't get it to work under Ubuntu, probably the important thing to know is that Nix binaries don't see the system-wide installed libraries, so even if you could get an Emacs to try to load the vterm emacs module, it would not be able to resolve libvterm installed via apt.

@Sbozzolo
Copy link
Author

My initial impression was that the proposed fix was more of a workaround than a real solution. However, given your comment, I now see why attempts failed and how that could be the way to go.

I assumed there was a bug somewhere because everything works in Ubuntu 16.04. The reason it works is because libvterm is too old on Ubuntu 16.04, so I don't install it with apt.

Thanks!

@akirak
Copy link

akirak commented Oct 12, 2020

@Sbozzolo A proper way to configure Emacs in Nix is to use emacsWithPackages: https://nixos.org/manual/nixos/stable/index.html#module-services-emacs

I was working on a project to support this without the need to write Nix: https://github.com/akirak/elinter. I haven't been working on it for a month or so, because it's become boring to further work on it. Maybe I'll rework on it.

@purcell
Copy link
Owner

purcell commented Oct 12, 2020

Yeah, nixpkgs (the Nix package DB) actually already has libvterm 0.1.3 (as "libvterm-neovim"), so if that's sufficient, you can probably dispense with the ci.nix and simply compile the vterm module in a nix-shell with the appropriate tool packages available, e.g.

nix-shell -p libvterm-neovim -p cmake -p libtool --run "mkdir build && cd build && cmake .. && make && ldd ../vterm-module.so"

And if you start emacs inside such a shell, it might have what it needs to compile the module itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants