bsd-curses versus ncurses #442

Open
opened 7 years ago by bkauler · 10 comments
bkauler commented 7 years ago (Migrated from github.com)
Owner

Just a note about an experience with bsd-curses versus ncurses.

I built Sabotage, installed it in a Flash stick. I built 'mp' a nice console text editor, that we have used for ages in Puppy Linux and derivatives. Here is my recipe:
https://github.com/bkauler/sabotage/blob/master/pkg/mp

Problem though, it was unusable. Scrolling was haywire. For example, I moved the cursor down to the bottom of the window, and only the bottom line would scroll, not the rest of the window. It was a mess.

I had never encountered this problem before, so suspected bsd-curses.

I have done a complete rebuild using ncurses, this time mp works perfectly. Here is my recipe for ncurses:
https://github.com/bkauler/sabotage/blob/master/pkg/qky-ncurses

...I had to jump through a lot of hoops to get all the packages to build with ncurses. Got some help from LFS, plus some creativity of my own.

I am posting this just for the general information of the Sabotage developers. If bsd-curses works for you, you will probably want to stay with it.

Just a note about an experience with bsd-curses versus ncurses. I built Sabotage, installed it in a Flash stick. I built 'mp' a nice console text editor, that we have used for ages in Puppy Linux and derivatives. Here is my recipe: https://github.com/bkauler/sabotage/blob/master/pkg/mp Problem though, it was unusable. Scrolling was haywire. For example, I moved the cursor down to the bottom of the window, and only the bottom line would scroll, not the rest of the window. It was a mess. I had never encountered this problem before, so suspected bsd-curses. I have done a complete rebuild using ncurses, this time mp works perfectly. Here is my recipe for ncurses: https://github.com/bkauler/sabotage/blob/master/pkg/qky-ncurses ...I had to jump through a lot of hoops to get all the packages to build with ncurses. Got some help from LFS, plus some creativity of my own. I am posting this just for the general information of the Sabotage developers. If bsd-curses works for you, you will probably want to stay with it.
rofl0r commented 7 years ago (Migrated from github.com)
Owner

thanks for the info. we at sabotage generally fix bugs, rather than working around them by using another version or replacement of a package.
that said, i'll look at why mp is misbehaving with netbsd-curses.

thanks for the info. we at sabotage generally fix bugs, rather than working around them by using another version or replacement of a package. that said, i'll look at why mp is misbehaving with netbsd-curses.
rofl0r commented 7 years ago (Migrated from github.com)
Owner

i just added a package mp cba0e0e9d0 it's using latest official tarball from upstream, and everything works perfect with curses - there was only a little issue i needed to fix to prevent it segfaulting @ line 17 of the package (apparently mp's author assumed that passing NULL instead of a valid WINDOW* to curses functions makes it automatically use stdscr).

i just added a package mp https://github.com/sabotage-linux/sabotage/commit/cba0e0e9d097ec17d093b00e9632cd2abb8a7a6f it's using latest official tarball from upstream, and everything works perfect with curses - there was only a little issue i needed to fix to prevent it segfaulting @ line 17 of the package (apparently mp's author assumed that passing NULL instead of a valid WINDOW\* to curses functions makes it automatically use stdscr).
bkauler commented 7 years ago (Migrated from github.com)
Owner

That's good that it works. I used a very old version of mp, 3.2.13. Latest, that you are using, is 5.2.10.

Just a note: that wasn't the only reason I went over to ncurses. Ncurses is what I have always used, very familiar with, and wanted to do a Sabotage build with it anyway. Except couldn't, had to fix the recipe. Now, it can be used in place of bsd-curses if anyone desires.

That's good that it works. I used a very old version of mp, 3.2.13. Latest, that you are using, is 5.2.10. Just a note: that wasn't the only reason I went over to ncurses. Ncurses is what I have always used, very familiar with, and wanted to do a Sabotage build with it anyway. Except couldn't, had to fix the recipe. Now, it can be used in place of bsd-curses if anyone desires.
rofl0r commented 7 years ago (Migrated from github.com)
Owner

are you planning to use the latest version or do you have a reason to stick to yours ?

are you planning to use the latest version or do you have a reason to stick to yours ?
bkauler commented 7 years ago (Migrated from github.com)
Owner

Oh, I should also reply that another reason I did a build with ncurses was to verify that bsd-curses was indeed the cause of the problem with mp.

There was a reason why I stayed with the older version of mp, back when I was developing for Puppy Linux. Can't remember now.
Anyway, the old version works fine, at least with ncurses.

Oh, I should also reply that another reason I did a build with ncurses was to verify that bsd-curses was indeed the cause of the problem with mp. There was a reason why I stayed with the older version of mp, back when I was developing for Puppy Linux. Can't remember now. Anyway, the old version works fine, at least with ncurses.
rofl0r commented 7 years ago (Migrated from github.com)
Owner

just found that the version you're using still lives on the original site
http://triptico.com/download/ , so let's test it..

just found that the version you're using still lives on the original site http://triptico.com/download/ , so let's test it..
rofl0r commented 7 years ago (Migrated from github.com)
Owner

so far the only issue with it is that it begins scrolling down not in the last line but in the previous-to-last line, but the same happens when linked against ncurses.

so far the only issue with it is that it begins scrolling down not in the last line but in the previous-to-last line, but the same happens when linked against ncurses.
rofl0r commented 7 years ago (Migrated from github.com)
Owner

yeah, that's it. i cannot identify any differences when built against curses vs ncurses
note that you can easily test yourself:

butch unlink ncurses
butch rebuild curses
# ... build stuff against curses, testing...
butch unlink curses
butch relink ncurses
# ... build stuff against ncurses....
yeah, that's it. i cannot identify any differences when built against curses vs ncurses note that you can easily test yourself: ``` sh butch unlink ncurses butch rebuild curses # ... build stuff against curses, testing... butch unlink curses butch relink ncurses # ... build stuff against ncurses.... ```
bkauler commented 7 years ago (Migrated from github.com)
Owner

The old version of mp is working perfectly for me.
I wonder if that is because my recipe for ncurses is different:
https://github.com/bkauler/sabotage/blob/master/pkg/qky-ncurses

Whatever, mp works fine. I did have a problem before with the borders around mp displaying as characters instead of lines, but that was a matter of setting env. variable TERM=xterm when used with bash.

The old version of mp is working perfectly for me. I wonder if that is because my recipe for ncurses is different: https://github.com/bkauler/sabotage/blob/master/pkg/qky-ncurses Whatever, mp works fine. I did have a problem before with the borders around mp displaying as characters instead of lines, but that was a matter of setting env. variable TERM=xterm when used with bash.
bkauler commented 7 years ago (Migrated from github.com)
Owner

A thought just occurred to me, perhaps the problem with the old mp is not curses, but busybox sh.

In Puppy Linux, I had /bin/sh a symlink to /bin/bash, as there were problems with some scripts. I just remembered one example:
${ABC:(-4)}
...this will extract the last 4 characters of string $ABC. Works with bash, not with busybox sh (or ash).

Anyway, my builds with Sabotage had /bin/sh linked to busybox, until I wanted to use a script with a bash-ism, so I changed /bin/sh to link to bash.
Now, I can't remember whether I tested mp with bsd-curses before or after that change.

It will be easy enough to verify. Can't do it right now, but thought I would post this, as it seems quite likely the reason for the problem with the older mp.
I'll report back.

A thought just occurred to me, perhaps the problem with the old mp is not curses, but busybox sh. In Puppy Linux, I had /bin/sh a symlink to /bin/bash, as there were problems with some scripts. I just remembered one example: `${ABC:(-4)}` ...this will extract the last 4 characters of string $ABC. Works with bash, not with busybox sh (or ash). Anyway, my builds with Sabotage had /bin/sh linked to busybox, until I wanted to use a script with a bash-ism, so I changed /bin/sh to link to bash. Now, I can't remember whether I tested mp with bsd-curses before or after that change. It will be easy enough to verify. Can't do it right now, but thought I would post this, as it seems quite likely the reason for the problem with the older mp. I'll report back.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: sabotage-linux/sabotage#442
Loading…
There is no content yet.