Windows

1 view
Skip to first unread message

Jason Moxham

unread,
Jun 13, 2009, 9:42:00 PM6/13/09
to mpir...@googlegroups.com
Hi
 
I just posting this from my shiny new Vista 32 and 64 bit install .
Had a nightmare trying to get a network card to work under windows and linux ...
but at least vista plays nicely with the partitions now..
So now I've got Linux64 win64 win32 on my box1 nehalem , I'll put linux32 on it as well soon. I've installed MSVC,cygwin,mingw on win32 and win64 .
So I be able to test mpir on a few more combinations.
 
Cygwin 32bit on Vista 32bit , cygwin is only 32 bit and I've not tested it yet but I assume I'll get the same result under vista64.
Trivial point , configure gives a warning about diff and python not being installed , I didn't do a full install of cygwin , but I would of thought a minimum install would include diff . I installed diff and continued. Yasm builds fine without python , I remember someone else commenting on this.
 
a standard configure && make && make check pass OK
same for configure --build=none-pc-cygwin  && make && make check
 
If I try a make -j 10 though , yasm fails to build , but typing make corrects the problem and we get a proper build . This looks like a yasm problem . Just tryed it again and it worked that time.
 
make try and speed both fail , but make tune builds and seems to give sensible parameters
 
 

Jason Moxham

unread,
Jun 13, 2009, 10:13:33 PM6/13/09
to mpir...@googlegroups.com
--------
 
make tune builds but make tuneup fails
the makefile or configure has not put all the paths in correctly as it cant find mpir.h etc
just of a matter of finding out why cygwin misses this bit out
 

Jason Moxham

unread,
Jun 14, 2009, 12:09:07 PM6/14/09
to mpir...@googlegroups.com
You have to add .exe to the end.. so
make tuneup.exe and make speed.exe and make try.exe all work
I suppose this is normal for cygwin builds ? , I tried one other package and it had the same problem.
If we fix this I cant see it leading to other problems, so the question is should we fix it?

Bill Hart

unread,
Jun 14, 2009, 12:25:38 PM6/14/09
to mpir...@googlegroups.com
Yes, we probably should fix that. There is a standard way of adding an
extension though, which if I recall correctly is used in make check.
It "knows" what extension should be added, and then some magic
incantation causes it to be added.

By the way, just want to make sure you know about the devel list for
Sage for Windows and the website for the project to which we are
contributing MPIR for MSVC:

http://groups.google.com/group/sage-windows/topics?start=0&pli=1

http://windows.sagemath.org/

You should ask to have your name added to the list of contributors at
the bottom of the website.

The latest version of Sage for Windows maybe has Pari 32 bit for MSVC,
but without MPIR support at this stage, I think. If not, William Stein
or Craig Citro should have the version of Pari which was ported to
MSVC 32 bits. As far as I am aware no work whatsoever has ever been
done to port to 64 bit MSVC or use 64 bit MPIR/GMP.

Also, if you do try to come up with a script based build system for
MPIR, first check out what there is in Sage Windows already, and of
course the idea is to generate something minimal, perhaps even
automagically turning a set of MSVC files into a scripted build
system. The idea is not to replace Brian's MSVC project files with a
hand written Python based build system, which might take many, many
months of work. Brian probably has more of an idea of what is possible
and what is available out there technology-wise than I do.

There's also a wiki for Sage Windows, but most of the information on
that is now incorrect:

http://wiki.sagemath.org/windows

Bill.

2009/6/14 Jason Moxham <ja...@njkfrudils.plus.com>:

Jason Moxham

unread,
Jun 14, 2009, 1:45:38 PM6/14/09
to mpir...@googlegroups.com
I add a ticket for it.

Also enable-fat fails make check on cygwin , we should pass this
and make -j 8 does crash yasm building , but only sometimes on cygwin ,
but when it does it seems to be always in the same place. I would post the
error but at the moment copy/paste isn't working from the cygwin window.

Bill Hart

unread,
Jun 14, 2009, 1:57:26 PM6/14/09
to mpir...@googlegroups.com
If you have the same Cygwin as me, then to copy paste you have to use
the little black and green C- menu in the upper left corner which has
Edit->Mark. You press Enter once you have marked the section you wish
to put into the clipboard. Then you should be able to paste somewhere
else.

Jason Moxham

unread,
Jun 14, 2009, 3:05:29 PM6/14/09
to mpir...@googlegroups.com
I'm getting the same errors with mingw/msys , fat doesn't work , etc
although parellel make hasn't given me any problems , yet.

William Stein

unread,
Jun 14, 2009, 4:42:14 PM6/14/09
to mpir...@googlegroups.com
On Sun, Jun 14, 2009 at 7:57 PM, Bill Hart<goodwi...@googlemail.com> wrote:
>
> If you have the same Cygwin as me, then to copy paste you have to use
> the little black and green C- menu in the upper left corner which has
> Edit->Mark. You press Enter once you have marked the section you wish
> to put into the clipboard. Then you should be able to paste somewhere
> else.

Install the rxvt cygwin package by re-running the cygwin setup
program. Then run cygwin and type in the console

rxvt -fn 9x15 &

(say -- you may try a different font). That gives you an rxvt window,
which is massively better than cmd.exe. Also, if you highlight text
it is *automatically* put in the copy buffer. To paste, just middle
click.

William

Case Vanhorsen

unread,
Jun 14, 2009, 7:09:30 PM6/14/09
to mpir...@googlegroups.com
On Sun, Jun 14, 2009 at 12:05 PM, Jason Moxham<ja...@njkfrudils.plus.com> wrote:
>
> I'm getting the same errors with mingw/msys , fat doesn't work , etc
> although parellel make hasn't given me any problems , yet.
>

You may need to upgrade your installation to use all the latest
versions of the various packages. The fixed the fat issue for me.

casevh

Jason Moxham

unread,
Jun 14, 2009, 8:39:11 PM6/14/09
to mpir...@googlegroups.com

----- Original Message -----
From: "Case Vanhorsen" <cas...@gmail.com>
To: <mpir...@googlegroups.com>
Sent: Monday, June 15, 2009 12:09 AM
Subject: Re: Windows



On Sun, Jun 14, 2009 at 12:05 PM, Jason Moxham<ja...@njkfrudils.plus.com>
wrote:
>
> I'm getting the same errors with mingw/msys , fat doesn't work , etc
> although parellel make hasn't given me any problems , yet.
>

You may need to upgrade your installation to use all the latest
versions of the various packages. The fixed the fat issue for me.

casevh

I'm using the latest cygwin , and the latest stable mingw/msys.
if the msys rc fixes this fat issue then we still have to fix the cygwin
case.

Can you run try tests without the -z switch on the latest mingw?
which would mean the latest mingw has a working mprotect/mmap

I'm just going to disable bounds checking on mingw otherwise.

Thanks
Jason

Jason Moxham

unread,
Jun 14, 2009, 10:46:01 PM6/14/09
to mpir...@googlegroups.com
mpir-1.1 passes with enable-fat on mingw , so it's something we did to
mpir-1.2
divebyff fails whereas redc_base passes , and on x86-fat they are both
generic C , strange..

Jason Moxham

unread,
Jun 14, 2009, 11:13:50 PM6/14/09
to mpir...@googlegroups.com
Bug fixed , I had forgotten to update fat structure in x86/fat/fat.c to
match the x86_64 one.
It's a real pain having this structure defined in about 5 or 6 files , you
just forget one...

I tested -enable-fat on cicero which is x86 and it passed which is a bit
strange

Bill Hart

unread,
Jun 15, 2009, 7:46:51 AM6/15/09
to mpir...@googlegroups.com
We need to do much more wide testing of enable-fat these days, as Sage
ships binaries which have been made using the enable-fat option. It's
amazing no one complained about a broken binary!!

Bill.

2009/6/15 Jason Moxham <ja...@njkfrudils.plus.com>:

William Stein

unread,
Jun 15, 2009, 8:15:36 AM6/15/09
to mpir...@googlegroups.com
On Monday, June 15, 2009, Bill Hart <goodwi...@googlemail.com> wrote:
>
> We need to do much more wide testing of enable-fat these days, as Sage
> ships binaries which have been made using the enable-fat option. It's
> amazing no one complained about a broken binary!!

Actually dozens of people complain :-)
So far from my perspective enable-fat does nothing but make the binary
a bit bigger.

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Bill Hart

unread,
Jun 15, 2009, 8:39:44 AM6/15/09
to mpir...@googlegroups.com
I don't understand how the x86 binaries passed tests on any machine.
Specifically one of the SkyNet machines is 32 bits and we tested on
that.

2009/6/15 William Stein <wst...@gmail.com>:

William Stein

unread,
Jun 15, 2009, 8:51:26 AM6/15/09
to mpir...@googlegroups.com
On Mon, Jun 15, 2009 at 2:39 PM, Bill Hart<goodwi...@googlemail.com> wrote:
>
> I don't understand how the x86 binaries passed tests on any machine.
> Specifically one of the SkyNet machines is 32 bits and we tested on
> that.

One possibility is that --enable-fat never got properly passed into
mpir, in which case nothing was being done at all.

We do of course get constant complaints by people trying to run sage
on sse2-only processors, because of MPIR being built on ssse3 (etc.)
boxes. My hope is that --enable-fat will someday fix that problem.

William

Jason Moxham

unread,
Jun 15, 2009, 11:37:45 AM6/15/09
to mpir...@googlegroups.com
On Monday 15 June 2009 13:51:26 William Stein wrote:
> On Mon, Jun 15, 2009 at 2:39 PM, Bill Hart<goodwi...@googlemail.com>
wrote:
> > I don't understand how the x86 binaries passed tests on any machine.
> > Specifically one of the SkyNet machines is 32 bits and we tested on
> > that.
>
> One possibility is that --enable-fat never got properly passed into
> mpir, in which case nothing was being done at all.
>

Thats what happend , my script detects if the arch is x86/x86_64 and
passes --enable-fat , but for x86 is detected as i686,pentium etc so
enable-fat was never passed to the tests. So enable-fat was tested on ALL the
x86_64 machines , and should of(and will be) tested on all x86 machines.

> We do of course get constant complaints by people trying to run sage
> on sse2-only processors, because of MPIR being built on ssse3 (etc.)
> boxes. My hope is that --enable-fat will someday fix that problem.
>

If we test correctly!! then I think it should be fixed now.

Bill Hart

unread,
Jun 15, 2009, 11:45:13 AM6/15/09
to mpir...@googlegroups.com
Let's issue 1.2.1 to fix just this issue. It's that important.

2009/6/15 Jason Moxham <ja...@njkfrudils.plus.com>:

Jason Moxham

unread,
Jun 15, 2009, 12:33:02 PM6/15/09
to mpir...@googlegroups.com
On Monday 15 June 2009 16:45:13 Bill Hart wrote:
> Let's issue 1.2.1 to fix just this issue. It's that important.

Yeah , I'll test k7,cicero and a few others
make check did pick up the error , either not many use fat , or if your like
me you never use a release x.y.0 , you wait for x.y.1

Bill Hart

unread,
Jun 15, 2009, 1:07:21 PM6/15/09
to mpir...@googlegroups.com
No I was wondering why not many Sage users picked it up. Sage is
downloaded by about 5000 people a month, as a binary. William answered
the question, he tried it and it didn't work for him, so presumably he
did not ship fat binaries for x86 32 bits but built a number from
source.

Jason Moxham

unread,
Jun 15, 2009, 1:33:46 PM6/15/09
to mpir...@googlegroups.com

I've changed my script to report what tests it trys so I can easily see if we
are missing some

box1
PASSED CC=gcc CXX=g++ configure=
PASSED CC=gcc CXX=g++ configure=--enable-cxx --enable-gmpcompat
PASSED CC=gcc CXX=g++
configure=--enable-cxx --enable-gmpcompat --enable-assert --enable-alloca=debug
PASSED CC=gcc CXX=g++
configure=--enable-cxx --enable-gmpcompat --enable-assert --enable-alloca=debug --build=none-unknown-linux-gnu
PASSED CC=gcc CXX=g++ configure=--enable-fat
PASSED CC=gcc CXX=g++ configure=--enable-fat --enable-cxx --enable-gmpcompat
PASSED CC=gcc CXX=g++
configure=--enable-fat --enable-cxx --enable-gmpcompat --enable-assert --enable-alloca=debug

I do my K7 , sage ,cicero

Jason Moxham

unread,
Jun 17, 2009, 12:17:42 AM6/17/09
to mpir...@googlegroups.com
I think this related to the mingw/msys make check failure for a shared lib
build.

although tests/mpz/t-mul.exe fails
tests/mpz/t-mul passes

It looks like someone mixed up the exeext's in the Makefile.am/configure
I'll have a look today while I ponder some pari puzzles...

Jason


----- Original Message -----
From: "Bill Hart" <goodwi...@googlemail.com>
To: <mpir...@googlegroups.com>
Sent: Sunday, June 14, 2009 5:25 PM
Subject: Re: Windows



Jason Moxham

unread,
Jun 17, 2009, 11:08:04 PM6/17/09
to mpir...@googlegroups.com
Doing Pari on on VC is two new systems , not an easy way to learn , so I
start with MPIR and VC.

Just started a script based build for mpir for VC , this using Brian's
existing projects/solutions.
I bet that name(solutions) was chosen by a markerting droid...

I've got a batch file that builds the p4 static library, it looks OK(ish)
The rest should follow...

I could something like we have for linux
configure which would autodetect cpu , or select static/shared
make which would be what I just done
make check if I can do the same for the tests

Is this what we want ? , I know I prefer this way , should be quick to do
1-2 days , and I think it would suit a sage build

Jason



----- Original Message -----
From: "Bill Hart" <goodwi...@googlemail.com>
To: <mpir...@googlegroups.com>
Sent: Sunday, June 14, 2009 5:25 PM
Subject: Re: Windows



Jason Moxham

unread,
Jun 18, 2009, 12:12:46 AM6/18/09
to mpir...@googlegroups.com
I forgot to check what was in sage allready , they have something allready ,
pretty much the same.

William Stein

unread,
Jun 18, 2009, 6:49:09 AM6/18/09
to mpir...@googlegroups.com
On Thu, Jun 18, 2009 at 6:12 AM, Jason Moxham<ja...@njkfrudils.plus.com> wrote:
>
> I forgot to check what was in sage allready , they have something allready ,
> pretty much the same.

You should even try building Sage for windows -- it should be fairly
easy if you follow the directions.

William

Bill Hart

unread,
Jun 18, 2009, 6:56:41 AM6/18/09
to mpir...@googlegroups.com
Nonetheless, it would be very helpful to take the best of what is in
Sage and what you wrote and merge it into MPIR, i.e. commit to our
svn. We have other users who can benefit from a batch build solution.
It will allow more users to more easily benefit from Brian's work. We
also need to update the main mpir.texi to reflect the changes, i.e. to
tell users how to use the new batch system.

Bill.

2009/6/18 William Stein <wst...@gmail.com>:

Jason Moxham

unread,
Jun 18, 2009, 1:55:45 PM6/18/09
to mpir...@googlegroups.com

I'll do the MPIR batch build , it's a good way to get used to whole Windows
experience while still on familiar ground. I built pari under VC but svn pari
failed , I probably just forgot something. I'll stick with 32bit to start
with as more of it works , and it will be easier to pin down the problems.

Bill Hart

unread,
Jun 18, 2009, 1:57:41 PM6/18/09
to mpir...@googlegroups.com
Pari svn won't build with MSVC, it has been years since it did.

2009/6/18 Jason Moxham <ja...@njkfrudils.plus.com>:

William Stein

unread,
Jun 18, 2009, 2:28:15 PM6/18/09
to mpir...@googlegroups.com
On Thu, Jun 18, 2009 at 7:57 PM, Bill Hart<goodwi...@googlemail.com> wrote:
>
> Pari svn won't build with MSVC, it has been years since it did.

I wouldn't be surprised if one could build Pari svn with MSVC with at
most a few hours work...

--William

Bill Hart

unread,
Jun 18, 2009, 2:37:42 PM6/18/09
to mpir...@googlegroups.com
Sure, and this is indeed something I think we wanted Jason to do, right?

Bill Allombert mentioned some issues, but I can't recall what they were.

By the way, I wonder if we should move this thread over to the
sage-windows group. Only some of it is on topic for mpir. I don't
mind, it is just that there are likely lots of interested people over
there who could contribute to the discussion. Of course I have no
objection to cross posting in this instance. We should at least do
that.

William Stein

unread,
Jun 18, 2009, 2:38:56 PM6/18/09
to mpir...@googlegroups.com
On Thu, Jun 18, 2009 at 8:37 PM, Bill Hart<goodwi...@googlemail.com> wrote:
>
> Sure, and this is indeed something I think we wanted Jason to do, right?

Yes, definitely!

>
> Bill Allombert mentioned some issues, but I can't recall what they were.

Only one way to find out...

> By the way, I wonder if we should move this thread over to the
> sage-windows group. Only some of it is on topic for mpir. I don't
> mind, it is just that there are likely lots of interested people over
> there who could contribute to the discussion. Of course I have no
> objection to cross posting in this instance. We should at least do
> that.

Yes, sure, let's do that.

Jason Moxham

unread,
Jun 19, 2009, 12:58:50 AM6/19/09
to mpir...@googlegroups.com
A very rough windows batch build in svn branches , some paths(python) are
hardcoded in , no autodetect of cpu.
No existing files changed , just two new ones (make.bat and configure.bat)

cd build.vc9
configure
make
make check

configure accepts
--enable-shared
--enable-static
32
64
amd64
pentium
...
read configure for futher options (all 3 of them)

All the hard work is done by Brian's project files , so this was easy,
actually it wasn't , I kept getting errors from "windowism's" , differences
between windows and linux. They are trivial once you know them :)

It was a good execise in using windows for me , and I'll tweek it over the
next week or so.

I'll start on pari now , and try to link it with mpir, progress on that will
posted to the sage-windows list.

Jason Moxham

unread,
Jun 19, 2009, 11:14:06 AM6/19/09
to mpir...@googlegroups.com
I dont know what is going on with windows, now the batch I wrote wont run ,
I keep getting a syntax error. So I played around with it to see what is up
, got it working , compaired it with the original , and there was no
difference. Run the original and it worked . After a reboot it stopped
working , the error occurs right at the start , just setting enviroment
varibles , before any C stuff

run this

::@echo off
set VCPATH="c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC"
set VCENV="c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\bin\vcvars32.bat"
set YASMEXE64="c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\bin\yasm.exe"
if not exist %YASMEXE64% (
set VCPATH="c:\Program Files\Microsoft Visual Studio 9.0\VC"
set VCENV="c:\Program Files\Microsoft Visual Studio
9.0\VC\bin\vcvarsall.bat"
)

and it fails with syntax error

put some "" in
if not exist "%YASMEXE%" (

run it and it fails again
take the quotes off , so we are back to the original , run it and it
works....

Jason Moxham

unread,
Jun 19, 2009, 1:06:12 PM6/19/09
to mpir...@googlegroups.com
I've corrected the error , it appears
set var=val
cant be in a conditional for the first time

weird....
perhaps time to consider a more rational language.
http://en.wikipedia.org/wiki/Esoteric_programming_language

Bill Hart

unread,
Jun 19, 2009, 1:22:59 PM6/19/09
to mpir...@googlegroups.com
I strongly recommend INTERCAL (short for "Compiler Language With No
Pronounceable Acronym").

Bill.

2009/6/19 Jason Moxham <ja...@njkfrudils.plus.com>:
Reply all
Reply to author
Forward
0 new messages