Feature #6735

curses: support linking against pdcurses

Added by Luis Lavena over 2 years ago. Updated over 2 years ago.

[ruby-core:46485]
Status:Closed
Priority:Normal
Assignee:Shugo Maeda

Description

Hello,

On Windows, ncurses are not available. Instead we link against PDCurses when building RubyInstaller.

Except that we required rename linking library to libcurses so curses extension finds it.

I would like to ask curses extension supports pdcurses linking library.

Attached is a patch that allows linking against unmodified pdcurses linking library.

I would like to port this change also to 1.9.3 in order to standardize building RubyInstaller.

Thank you

curses-support-pdcurses-lib.diff Magnifier (491 Bytes) Luis Lavena, 07/15/2012 09:36 AM

Associated revisions

Revision 36436
Added by Shugo Maeda over 2 years ago

  • ext/curses/extconf.rb: support PDCurses. patched by Luis Lavena. [Feature #6735]

Revision 36436
Added by Shugo Maeda over 2 years ago

  • ext/curses/extconf.rb: support PDCurses. patched by Luis Lavena. [Feature #6735]

History

#1 Updated by Thomas dickey over 2 years ago

Actually, ncurses is "available" for Windows in the sense that it builds and
works there, using MinGW.
http://invisible-island.net/ncurses/ncurses.faq.html#other_versions
But there are no downloads of binaries (unlike end-user programs such as
lynx and vile, developers generally are able to build their own libraries).

#2 Updated by Luis Lavena over 2 years ago

  • Status changed from Open to Assigned

ThomasDickey (Thomas dickey) wrote:

Actually, ncurses is "available" for Windows in the sense that it builds and
works there, using MinGW.
http://invisible-island.net/ncurses/ncurses.faq.html#other_versions

Thank you for pointing that out.

Interesting that nothing about MinGW is mentioned in the official GNU ncurses page:

http://www.gnu.org/software/ncurses/

But is included in README.MinGW, which states a lot of TODO like Unicode, thread locking and other aspects.

Even by following the instructions and using the right tools, couldn't get a usable ncurses installation to work with, I believe still have some work to be done.

PDCurses has worked for us (RubyInstaller) and now that I'm working on x64 version of Ruby for Windows. The need to keep pdcurses as is is what pushes me to generate this request.

But there are no downloads of binaries (unlike end-user programs such as
lynx and vile, developers generally are able to build their own libraries).

While that statement might be good answer for some (build your own) is error prone and time consuming, if wasn't for binary packages installing a Linux distribution today would be tiresome.

In the case of Windows, binaries are for libraries and end user programs are highly valuable due the complexities of compiler toolchain and building those packages.

#3 Updated by Thomas dickey over 2 years ago

Actually the page on gnu.org is a copy (with some minor changes) of the file on my site.
I see that my faq didn't provide a link to the 5.8 release where MinGW was listed -
http://invisible-island.net/ncurses/announce-5.8.html
and you may see that it was one of many changes made since 5.7. However, I agree that
building dll's is time-consuming (I would do this via cross-compiling, but it happens
that the cross-compiling tools aren't quite stable enough to promise that this would
be done routinely).

#4 Updated by Luis Lavena over 2 years ago

Thanks for your time and details Thomas.

However, as mentioned in my previous comment, ncurses does not compile properly with either MinGW or mingw-w64 toolchains that I use to build RubyInstaller.

While getting ncurses to work properly on Windows is a great idea, I personally lack the knowledge or experience on curses to help.

On the other hand, pdcurses, with minor changes, did compile properly with both 32 and 64bits compiler toolchains, which is the reason I'm requesting support for linking against it.

Regards.

#5 Updated by Shugo Maeda over 2 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36436.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/curses/extconf.rb: support PDCurses. patched by Luis Lavena. [Feature #6735]

#6 Updated by Thomas dickey over 2 years ago

I cannot account for the developer's failure to compile ncurses, since he's
never provided a bug report. However, it's trivial to cross-compile, so
perhaps some progress might be made in that area. I've put a zip-file with
current code here, which I'll update:
http://invisible-island.net/datafiles/release/mingw32.zip

Also available in: Atom PDF