Bill Allombert on Sat, 19 Dec 2009 01:09:51 +0100


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

Re: A patch for native PARI/GP build on Windows (Mingw+Msys)


On Thu, Dec 17, 2009 at 09:14:45PM +0200, Vasili Burdo wrote:
> Bill Allombert wrote:
>> 1) Could you (or someone else) provides a test build system that
>> would build PARI SVN HEAD with mingw every days and post the result to
>> <http://pari.math.u-bordeaux.fr/buildlog.html> ?
>> (If you can provide that, I will give you more detail).
> Bill, I don't feel ready to run regular builds :-(
> I build GP for myself (I use it as fancy calculator), but do it on very  
> irregular basis - like once in 2-3 months.

Your patch is rather clean, so this should not be a problem.

>> 2) If not, do you know how to cross-compile it on linux ?
>> (I have a mingw32 cross-compiler already).
> I didn't try to cross-compile it (because I don't have linux box around)

I tried to cross-compile it and that worked fine. The trick is to use
wine to run the tests from Configure and dotest. 
I will try to document how I did it, but it was very straightforward.
Probably I will set up a cross-compiler as a test build system.

>> 3) Did you try to run "make test-all" or only "make bench" ?
> I did test-all. Benchmarks and failed test logs attached.

Good! make test-all also work with the cross-compiled version under wine.

>> 4) Would the hires plotting also work with Visual C++ ?
> It should. However, I didnt try to compile GP with VC

Good! 
I cannot get the hires plotting to work under wine thought, and
the terminal support has some glitches (the prompt is printed too late).

Now my question is, is there a simple way to convert files from DOS to UNIX
using MSYS, like sed -e 's/\r//g' ? We could use it in dotest instead of
diff -wb

Your code do:
nm --defined-only ...
However it does not work when cross-compiling (I need to use a cross-nm). 
Is there no way to do that using gcc directly ? Well I found:
NM = `$CC -print-prog-name=nm 2>/dev/null`
\$(NM) --defined-only ...
but maybe there is a better way.

Cheers,
Bill.