Why is it compiling GMP so hard?
Brian Gladman
brg at gladman.plus.com
Thu Mar 10 11:17:03 CET 2005
Sisyphus wrote:
> Paul Leyland wrote:
>
>>
>> Face it: installing a high-performance version of GMP on the Windows
>> platform is hard work and, IMO, much harder work than it needs to be.
>> It is very Unix-centric (to forestall opposing claims, I am well aware
>> that it can be got to work on non-Unix systems) and if you don't have a
>> Unix box you have to go out of your way to make it look like Unix.
>
>
> That's a fairly perverse idea of going "out of your way". It takes a lot
> less time to download and install MSYS than it does to install Visual
> Studio.
>
> As far as I can see, installing GMP on Win32 is trivial - and making
> that trivially-built GMP workable with Visual Studio (if that's what you
> want) is even more trivial.
>
> Or - is there a performance hit involved here ?
> In other words, what is gained by building GMP the way Brian does it ?
This rather depends on what you mean by performance - if you mean speed
of GMP code when running, in most cases there is no performance hit
since the core functionality of GMP is written in assembler.
In my view it is of little real use trying to promote the Windows or
Gnu/Linux environments by denigrating the other since this is very easy
to do in _either_ direction. There is also a very real danger that such
efforts will be seen as denigrating those who choose to use the
denigrated products rather than the products themselves.
There are several advantages in using VC++ to build GMP for those who
already use this development environment for their work. And this is
the key since _for these users_ there is no reason to compare the
installation cost of VC++ and MSYS/Cygwin/Mingw since the former tool
chain is _already_ installed (obviously this is also true the other way
round). So its essentially a matter of choice in terms of development
environment.
Although it might be possible (I admit that I have not tried that hard),
I have not yet found a way of porting a Cygwin/Mingw produced version of
GMP into VC++ in a way that gives full access to the debugging and
browsing capabilities that the VC++ IDE offers. These facilities make
it easier _in this environment_ to integrate GMP into GMP based
applications (e.g NTL) when GMP itself is built with these same tools.
I actually build GMP on Windows either way depending on what I want to
do with the finished product. Both approaches have advantages and
disadvantages, although you would hardly think so listening to those who
don't seem to have the experience needed to make such assessments (since
they only ever build GMP in one way).
I get a regular stream of comments on my native Windows port of GMP so I
assume it is being used by quite a few people. And I am always open to
suggestions for ways in which it can be improved.
Brian Gladman
More information about the gmp-discuss
mailing list