Compiling rtorrent-PS on Solaris 11.4: problem with views: misaligned columns; duplicated text.

Skip to first unread message


Sep 3, 2018, 1:43:40 AM9/3/18
to pyroscope-users
Hi Pyroscope

I've managed to get the latest rtorrent-PS compiled on Solaris 11.4, using GCC 7.3.0.  Mostly it works fine, but there's one big problem:  terminal display is incorrect, with columns not aligning correctly and some characters duplicated.   This is best shown in a screenshot: .  The "started" view is even worse:

In non-condensed mode things are nearly normal, although one row still hangs onto the next line by one } char, and the "active row" indicator jams on that row:

I do not see any issues in vanilla rtorrent, either 0.9.6 or 0.9.7.

My default TERM is xterm-256color.  For locale I have tried en_US.UTF-8 and en_GB.UTF-8 (my normal choice).   I have pyrocore installed, and have tested with your ~/rtorrent/start script, ensuring LANG is definitely set correctly.  LC_* are  unset.  I have also tested in tmux -2u with TERM=screen-256color and TERM=tmux-256color, which again made no difference.  I have also tested various other TERM values, both in and out of tmux, and again the problem remains in all.  I even tried screen.

I thought it could be a NCurses/NCursesW issue.  Solaris 11.4 includes NCurses 6.0, compiled as the version 5 ABI.  I did my own separate compile of the latest NCurses 6.1.0 with ABI=6 and integrated it into the rtorrent-PS build, but this made no difference.  I have confirmed that I am using the normal GNU terminfo database, and tried setting the latest terminfo database location on the commandline, eg: TERMINFO=~/.local/ncurses-6.1/usr/share/terminfo rtorrent/start

I've run the terminal tests mentioned in the docs, which work fine.  The PYTHONIOENCODING=utf-8 python -c ...  command prints:
⋅ ⋅⋅ ” ’ ♯ ☢ ☍ ⌘ ✰ ⣿ ⚡ ☯ ⚑ ↺ ⤴ ⤵ ∆ ⌚ ≀∇ ✇ ⚠ ◔ ⚡ ↯ ¿ ⨂ ✖ ⇣ ⇡ ⠁ ⠉ ⠋ ⠛ ⠟ ⠿ ⡿ ⣿ ☹ ➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉ ▹ ╍ ▪ ⚯ ⚒ ◌ ⇅ ↡ ↟ ⊛ ♺ also worked fine, printing all 256 colours as expected.  Screenshots: 
Python Encoding test:
term-256color-py test:

I have confirmed that other ncurses apps like Vim work fine with UTF-8 widechars, eg by opening your src/ in Vim and confirming the special chars all look OK.  Finally I also tried chros73's fork, rtorrent-PS-ch 1.8.0/0.9.7, and found it has the same problem - actually it's slightly worse, the views are even more corrupted; maybe just because it uses a different layout.

I've now tried everything I can think of and am out of ideas.  Would you have have any idea on how I can debug and resolve this?

Here's my rtorrent-0.9.6/config.log in case it's of use (taken from a compile using the system NCurses 6.0 with ABI=5):  . FYI In order to build on Solaris I had to integrate GNULib to provide a portable version of random_r and initstate_r (no glibc in Solaris), so you might notice some unexpected extra logging in config.log because of that.

Let me know if I can provide any further info, and many thanks in advance for any help.

Tom  (TheBloke)


Sep 5, 2018, 9:09:24 AM9/5/18
to pyroscope-users
One more piece of info:  I was wrong in my first post when I said the issue only seems to affect rtorrent-PS.

I have found the issue also affects tmux + vim.  In other words, when I run vim inside tmux, I see a similar problem with UTF-8 chars.  But only when vim is run inside tmux.

To demonstrate this I made a simple text file, containing some of the special chars found in src/  Here's the contenst of the file:

tomj@vbox-sol114:~$ cat ~/utf8chars
        // "  ⠁ ⠉ ⠋ ⠛ ⠟ ⠿ ⡿ ⣿ ❚ "
        //⠀"  ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ "
        // "☹ ➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉ " "😇 "
        // "☹ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ "
        // "☹ ➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓ "

Now, here's some screenshots:

1. vim ~/utf8chars, not in tmux =  works fine:
2.  In tmux, cat ~/utf8chars = works fine:
3. In tmux -2u with "set -g default-terminal screen-256colors", vim ~/utf8chars = PROBLEM:
4. In tmux -2u with "set -g default-terminal tmux-256colors", vim ~/utf8chars = WORSE PROBLEM:

In tmux with "set -g default-terminal screen-256colors", the characters are displaying, but the spacing is all messed up - exactly like I see in rtorrent-PS.  Then in tmux with default-terminal tmux-256colors, the problem is even worse: those characters don't even display.  Trying default-terminal xterm-256colors in tmux gives the same result as screen-256colors, ie characters display but with messed up spacing.

The default tmux on Solaris is 2.2, compiled against NCursesW 6.0 with ABI=5.  I've also tried compiling tmux myself, latest version 2.7, and linked against NCursesW 6.1 with ABI=6.  But this gives identical results, ie broken in exactly the same way.

I realise that all this indicates that the problem is not actually in rtorrent-PS, but I'm hoping these symptoms might give some idea of what my issue might be?

Note that in all cases I am running with TERM=xterm-256color,  LANG=en_US.UTF-8, and am using an UTF-8 capable terminal (iTerm2 on Mac OS with UTF8 explicitly enabled).   Inside tmux, TERM is either screen-256color or tmux-256color as mentioned above.

I'd be most grateful for any advice you can offer.  Thanks again.


Sep 5, 2018, 9:11:22 AM9/5/18
to pyroscope-users
In above post, I meant: screen-256color,  tmux-256color and xterm-256color   (not color*s*)

Krisztian Kovacs

Sep 5, 2018, 1:13:44 PM9/5/18
Report tge vim problem to tmux, Nick and Tom respond pretty quickly, maybe they know what the culprit is. 

You received this message because you are subscribed to the Google Groups "pyroscope-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit


Sep 5, 2018, 1:23:31 PM9/5/18
to pyroscope-users
OK good idea, thanks.  I'm currently preparing a post on some Solaris support forums but yeah I'll go direct to tmux as well.

It seems like it must be something on Solaris itself, I just can't figure out what it could be given all the libraries involved are GNU and known to work elsewhere.   And it's not everything broken - vim itself works fine, for example - just certain combinations like tmux + vim, and unfortuntately rtorrent-PS in all scenarios.

Anyway yeah I'll try the tmux guys and the Solaris guys (if I can find any) and see what I can dig up.

Reply all
Reply to author
0 new messages