From: Charles W. <cwi...@us...> - 2010-12-14 06:18:09
|
On 12/13/2010 9:56 PM, Glenn Burkhardt wrote: > I've been trying to build 'bc' with readline support, but I couldn't > find a pre-built readline library, so I've built one from the latest > source release. > I can't include the <termcap.h> file that comes in > libtermcap-0.20050421_1-2-msys-1.0.13-dev.tar.lzma, because it wants This is an MSYS package, and since it has -dev in the package name, that means it is for developing *msys* applications -- which, in turn, means that you must use the msys compiler (msys-gcc-3.4.5) -- not MinGW gcc-4.5.0. Otherwise bad things will happen (I'm actually a little surprised your readline port "found" termcap.h -- did you explicitly pass -I/usr/include and -L/usr/lib to the compiler?) > <termios.h>, which is no where to be found in my installation, nor have > I been able to locate it in any of the pre-built packages. > > It must be possible to do this, since 'gdb' in the pre-built packages > has readline support. Any help will be appreciated. Thanks. Non-sequitor. gdb is a mingw build, and I'm not exactly sure what hacks were used to get its *internal* readline support "working". For all I know it may not even bother to use termcap or termios at all, and just "knows" about the DOSBOX console. Short version: your port of readline is incomplete, because it really should be using a *mingw* port of libtermcap (or libncurses; MAYBE libpdcurses?). Throwing in an msys port of libtermcap will just break things, as you have seen. So...you've now discovered why there is not a pre-built readline library for MinGW (from mingw.org; other sites may have one): it's hard, and most likely requires porting ncurses -- and THAT has been impossible until very recently (e.g. mingw support has only been added "recently" to unreleased snapshots of ncurses; since the ncurses developer doesn't publish a source control repository, you have to d/l ncurses-5.7 and apply a ZILLION patches in sequence; one per week going back about 2.5 years...). Also, mingw.org's core mission is to support the compiler itself and the Minimal SYStem of unix utilities necessary (e.g. MSYS) -- not to provide ports of lots of different unix *libraries* to win32. There are other projects for that: gnuwin32 http://devpaks.org/ (never tried this myself) or you can download fedora-mingw rpms and unpack them, assuming you have access to a linux box. The easiest option is probably to install the PDCurses and libpdcurses packages from mingw.org (one of our few exceptions to the "we don't do libraries" policy), and attempt to get readline to build using that curses port. THEN try to build bc... -- Chuck |