Karim.Belabas on Thu, 8 Feb 2001 13:44:34 +0100 (MET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: pari & cygwin insurmountable difficulty saga!


On Thu, 8 Feb 2001, Iwao KIMURA wrote:

> I met same trouble when I tried to compile pari-gp 2.1.0 from the
> source on my Microsoft Windows98SE / Cygwin box.
> 
> After wasting a few hours, I gave up. But I also found that `make
> gp-sta' will build a static version of pari library and gp-sta.exe.
> They works well.

In fact much better than the "native" ones (independant of CYGWIN.DLL) built
using either MSVC and mingw32: the latter use MS's version of libio which
causes lots of problems (e.g no colors, AltGr key doesn't work in the
readline port, etc.)  [I have no doubt that it could eventually be made to
work with some rewriting effort, but since Cygwin is OK...]

> The precompiled binary of gp for cygwin environment is available from
> ftp://megrez.math.u-bordeaux.fr/pub/pari/windows/
> (This is written in README.WIN file), though I did not try it.
> 
> In section 4 of same file, 
> > It is quite easy to build (or cross-build) GP and readline from the unix
> > sources using mingw, but if you have installed mingw you probably also have
> > Cygwin, in which case it's even easier to use the generic build process as
> > under Unix, as mentioned in Solution 1.
> 
> I wonder it is really quite easy or not so easy.

The *current* README.WIN [highly-unstable development versions, post 2.1, not
yet mentioned on this list] and the ones which I left in the
/pub/pari/windows directory now read:

  [...] in which case it's even easier to use the generic build process as
  under Unix, as mentioned in Solution 1. IMPORTANT NOTE: you have to type
  "make gp-sta" since Configure defaults to building the dynamic version, which
  doesn't work (see below) [this is a bug in Configure].

  [...]

  %%%%%%%%%%%%%  What about library programming ? %%%%%%%%%%%%%%%%%%%%%%
  
  Building a static LIBPARI.A Library should be straightforward. It is possible
  but painful to build a LIBPARI.DLL and .def file using gcc-mingw (or 
  gcc-cygwin) + dlltool and some header magic; but GP itself, when linked with
  such a library, crashes on startup.  No other decent compiler being available
  to us, we won't provide prebuilt libraries. For this one, you're on your own.
  Sorry.

In short, I wasted a few hours trying to build a Cygwin DLL, succeeded, but
the library doesn't work. So I gave up.

I'd be highly interested if you succeed in making this work. I'll send you my
(minimally) modified config files to have it at least compile properly if
you're interested, but I'll have to get them from my home PC first.

The original Cygwin port was done by Andy Stubbs <agstubbs@liverpool.ac.uk>,
who had the DLL working under Win95, but this was in the times of
cygwin32-beta19.1, and the API has changed tremendously since then... [he was
quite optimistic about graphics (X support, available under Cygwin), but it
hasn't been done yet, and I don't think he's still working on it]

Sorry about the late answer,

    Karim.

PS: I'm no Cygwin expert: I had to install Windows specifically to test it,
but I only use it when running Windows (i.e almost exclusively to test new
hardware, or GP binaries [usually cross-compiled from Linux...]).

-- 
Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://www.parigp-home.de/