[avail for test] ncurses-5.2-1
Charles S. Wilson
Wed Nov 8 21:49:00 GMT 2000
I've just uploaded ncurses-5.2-1 to sourceware. USE A MIRROR -- the
ones listed in the INSTALLATION section have been verified up-to-date
with ncurses. ncurses is marked as a 'test' release, so you may have to
specifically select it in setup to install (see INSTALLATION below). I
need some help debugging C++/dll issues; but the C/dll's work fine as do
the C and C++ static libraries. Search for "HELP HELP HELP" below. The
ncurses pacakge provides several libraries of routines for handling
consoles and text-based displays.
o CONFLICTS!!! known conflicts:
termcap package /usr/include/termcap.h
clear package /usr/bin/clear.exe
Backup these files BEFORE installing the ncurses package; ncurses will
overwrite them. You have been warned.
o After installing, please read /usr/doc/Cygwin/ncurses-5.2.README
o (Full build instructions included in source distro; overview only
here) The build procedure for static libs is very straightforward.
However, building the dlls requires an odd "./configure" THEN patch,
then build sequence. This is my typical way of dll-izing a new package,
at first -- get it working, then clean it up. Normally I don't release
until it's clean, but I'm stuck and need some help (more below). If you
look at my other packages (zlib, libpng, etc) the procedure is
"./configure; make" and poof! Both static libs and dlls are built, plus
two versions of each utility/test program -- one statically linked and
one dynamically. We're at the 'get it working' stage right now, so the
build process isn't quite as streamlined.
o There are two patches: one that is already applied in the source
archive ncurses-5.2-1-src.tar.gz. It munges all the headers and C files
so that functions and variables are declared using <no special
__declspecs>, __declspec(dllexport), or __declspec(dllimport), as
appropriate, depending on -DNCURSES_STATIC / -DNCURSES_DLL / <no special
#defines>. That patch is over 400k. The second, much smaller patch,
are the Makefile-specific changes necessary ONLY when building the dll's
and dll-dependent executable (this one must be applied only AFTER doing
a ./configure). Anyway, I've put in quite a bit of work on this
package, but I can't go any further without outside help (see HELP HELP
o The binary package DOES contain static libs, import libs, and dlls for
all of the libraries in the ncurses package, plus statically and
dynamically linked versions of all test and utility programs. Some
variants are in subdirectories of /usr/bin:
dynamically linked version of the utility programs
also, the dll's
statically linked versions of the utility programs
dynamically linked versions of the test programs
statically linked versions of the test programs
o Nothing is stripped, so that debugging is easier -- but it means the
download is huge.
o My tests show:
- the statically linked programs which depend on the C libraries all
seem to work just as well as the ncurses-5.0 distribution at cygutils.
There are a *few* imperfections (like testscanw.exe doesn't work) -- but
these failures are not new. So, I conclude that the static versions of
the C libraries (libncurses.a, libpanel.a, libform.a, libmenu.a) are all
- the one program which links to the C++ library, (demo.exe links to
libncurses++), works fine when statically linked. I conclude that
libncurses++.a is A-OK.
- the dynamically linked programs which depend on the C libraries all
work identically to their statically linked counterparts. So, I
conclude that the dll versions of the C libraries (cygncurses5.dll,
cygpanel5.dll, cygform5.dll, and cygmenu5.dll, with their respective
import libraries) are all A-OK.
HELP HELP HELP HELP HELP HELP
- Big problems when dynamically linking the one program that exercises
the C++ library. demo.cc does NOT have a main() function -- it relies
on global static initializers to bootstrap itself. This works okay when
linking statically, but ld fails to link when trying to link demo.exe
dynamically. To get around this, I added a kludged main() function to
demo.cc (which is ONLY #defined when (a) __CYGWIN__ and (b) linking
dynamically). After doing that, I could link demo.exe dynamically.
However, it coredumps when I run it. I do not know if the problem is:
o my stupid main() is wrong
o the C++ dll, cygncurses++5.dll, is somehow messed up
o cygwin binutils can't handle static initializes + dlls
o some other explanation.
o some or all of the above
This is the problem I need help fixing or understanding -- I don't know
C++ well enough to figure this out. Some valuable tests:
o somebody please write your own program which requires libncurses++
but does NOT use global static initializers. Link it statically and
verify operation. Link it dynamically and verify (?) operation. This
will prove (?) that the problem is demo.cc, not cygncurses++5.dll.
o fix my kludgy main() in demo.cc -- I may have done something stupid;
I really don't know what I'm doing here. Get it to 'work' with the
existing cygncurses++5.dll if possible. This will prove (?) that the
problem is my stupid main(), and not cygncurses++5.dll.
o Explain why global static initializers + dlls + cygwin-binutils
doesn't work, when global static initializes + cygwin-binutils with NO
dlls does work.
FWIW, the 'kludge' main() in demo.cc is this:
static TestApplication Demo;
# if defined(NCURSES_STATIC)
static TestApplication Demo;
TestApplication * Demo = new TestApplication();
The original was just:
static TestApplication Demo;
o follows new naming scheme for dlls
/usr/lib/libncurses.dll.a (import lib)
/usr/lib/libcurses.dll.a --> libncurses.dll.a
/usr/lib/libpanel.dll.a (import lib)
/usr/lib/libmenu.dll.a (import lib)
/usr/lib/libform.dll.a (import lib)
/usr/lib/libncurses++.dll.a (import lib)
/usr/lib/libncurses.a (static lib)
/usr/lib/libcurses.a --> libncurses.a
/usr/lib/libpanel.a (static lib)
/usr/lib/libmenu.a (static lib)
/usr/lib/libform.a (static lib)
/usr/lib/libncurses++.a (static lib)
To update your installation, click on the "Install Cygwin now" link on
the http://sources.redhat.com/cygwin web page. This downloads setup.exe
to your system.
FIRST BACK UP /usr/bin/clear.exe and /usr/include/termcap.h !
Run setup and answer all of the questions. PLEASE, PLEASE, PLEASE
choose a mirror site for your download. The 'sources.redhat.com' site
is badly overloaded. The mirrors below have the latest version of this
The setup.exe program will figure out what needs to be updated on your
system and should install the less package automatically. To install
this Test version of ncurses you'll have to tell setup.exe to
specifically install it by clicking on the arrows to the left of the
ncurses package line until "Test" shows up. You may need to click on
the "Full/Part" button in the upper right corner of the the setup screen
to get ncurses to show up in the list.
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org
More information about the Cygwin