larrykollar / tines

Tines is a console-based outliner/planner/notebook. It is a fork of the hnb outliner, which has not been updated in >10 years.
Other
49 stars 7 forks source link

No reverse video or color on many Arch derivitives #5

Open fwarren opened 8 years ago

fwarren commented 8 years ago

HNB has the same problem. It runs fine on Arch Linux and Chakra. However when I run it on Manjaro Linux or Antergos all text is white and there is no text coloring or revere video. It does not matter if I am using xterm, rxvt, urxvt, lxterminal or gnome-terminal. I am willing to help troubleshoot this, but I have no idea where to even start.

larrykollar commented 8 years ago

That's weird. Can you find out what version of curses each one uses?

fwarren commented 8 years ago

Any version of Arch that works with hnb uses curses 5.9-5. Any version using ncurses 6.0-4 has the bad behavior. If I start out with an older version of any Arch derivative with ncurses 5 everything woks fine, the moment I upgrade to ncurses 6 hnb no longer works correctly.

However on Ubuntu ncurses 6.0+20160213 works just fine with hnb with both hnb and ncurses unpatched.

I have attached a screenshot of what hnb looks like.

hnb

larrykollar commented 8 years ago

I'm going to leave this issue open, because I don't consider it completely solved and it might help someone else if they run into this problem.

After a little research, I see two possible root causes:

I think the most reliable solution involves including some version of ncurses with Tines and static-linking the library, especially when I get to the point of building binary packages. This might be necessary to completely support UTF-8 as well, because some systems (cough OS X cough) don't compile ncurses with wide-character support.

carnager commented 8 years ago

This sadly makes it impossible to use tines on arch linux, since you never know where the cursor is. By the way: This also happens in hnb

fwarren commented 8 years ago

On Arch linux you can install ncurses5-compat-libs to make both hnb and tines work properly

autumn-birds commented 6 years ago

This issue also shows up on Void Linux. I think it does have something to do with the way ncurses is configured/compiled; compiling with a statically built ncurses 6.0 worked for me and was pretty simple:

LIBS=libcli/libcli.a ../curses/ncurses-6.0/lib/libncurses.a
CFLAGS=-I. -Ilibcli -I../curses/ncurses-6.0/include -DHAVE_CONFIG_H -Wall -pedantic -g

After that, did make clean and make in the src directory, and ./tines worked as expected, with color.

Not sure if this actually forces gcc to use the curses.h from my compiled version instead of the global one, but it seems to work either way. I'm also not sure if all those configuration options were really necessary; I got some of them from the abovementioned Arch package's PKGBUILD. The important one for building it as a static library is --with-normal (normal as opposed to shared. Thanks stackoverflow.)

I might try to see if it still works without --with-abi-version=5 and --disable-widec later when I have time.

Other curses programs that use color do work on my system, though, which makes me think there ought to be a way to fix tines to do so, too, without going through all this. But I have no idea what the real problem is, so this seems to be the easy way out for now.

autumn-birds commented 6 years ago

I've tried again, building with no parameters aside from --with-normal. It still appeared to work fine.

aThorp96 commented 6 years ago

The reconfigured ncruses did not work for me. However, if you build and install then swap the binaries for a copy of tines, built statically linked on a Debian based system, it should run near flawlessly on you Arch based system. I ran Debian in a vm and built tines there, and I can run it on my Manjaro machine now. In order to build statically I had to change the first line of src/Makefile to LIBS=-static -lncursesw -ltinfo libcli/libcli.a