-
Notifications
You must be signed in to change notification settings - Fork 10
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
Could this library optionally use static linking? #36
Comments
That's an interesting idea. Terminfo's main purpose is to read a binary database with information about the various known terminals. Unfortunately, as far as I'm aware, the location of that file may be system-dependent; and the binary format might be as well. So I don't think a single binary statically linking in just ncurses (or the equivalent) would work on all machines. I've had the idea in the past to distribute the terminfo database itself, or maybe embed it in the final binary somehow. Unfortunately, the copyright around that database seems fairly complicated, so I've avoided touching it directly: |
I see - thanks very much, this is really useful info! I might look into distributing the database itself then. |
I guess another drawback of distributing a terminfo database would be that it would not be able to use local overrides, which people sometimes will want to use, e.g. https://sw.kovidgoyal.net/kitty/faq.html#i-get-errors-about-the-terminal-being-unknown-or-opening-the-terminal-failing-when-sshing-into-a-different-computer |
I'm trying to statically link an application on manjaro/arch. Is this related the topic?
|
@andys8 yes, git-brunch depends transitively on the terminfo package. It looks like stack isn't doing the right thing here, picking a GHC build ("ghc-tinfo6-8.6.5") whose terminfo package doesn't link against the libraries available on your machine. Or, possibly, you have a shared library version of libtinfo but not a static one. I found this past discussion which seems relevant: If you still can't get it to work, I suggest filing an issue in the stack bugtracker. |
I’m going to close this, as the discussion seems to have ended and the answer to the original question appears to be “no”. Thanks again! |
It seems like dynamically linking libtinfo / libncurses / etc can cause problems when trying to ship software to users. In my case, I would like to be able to ship purescript compiler binaries which work out of the box on as many linux distributions as possible, and it seems that the dynamic linking of ncurses is the main difficulty right now; see e.g. purescript/purescript#3696 and commercialhaskell/stack#1012 and potentially even #15 and #17?
I'm not sure how feasible this is, but do you think it would be possible for this package to provide a flag which would cause libncurses to be linked statically?
The text was updated successfully, but these errors were encountered: