Re: [mpir-devel] Can you just make us a Windows binary instead of source code?

186 views
Skip to first unread message
Message has been deleted

Bill Hart

unread,
Aug 17, 2018, 5:39:06 PM8/17/18
to mpir-devel
There are plenty of MPIR binaries already on the web put up by various people. We don't really have the bandwidth to host binaries.

What you say about Windows is usually true. There's usually only one platform to worry about. But with assembly libraries, this isn't the case. You need a binary built for your processor. That would mean we'd have to post bundles of binaries, one for each different processor we support. Then people will want debug versions of the library, and so on.

It's far better if you build it yourself. If you post the specific problems you are having, I'm sure someone can help you out.

Brian Gladman

unread,
Aug 17, 2018, 6:13:21 PM8/17/18
to mpir-...@googlegroups.com
On 17/08/2018 21:59, Brett wrote:

> Hello, I really would like to use MPIR but I cannot after 1+ month of trying for 200+ hours get anything to do anything. I know in Unix it's typical to release source code, but on Windows nobody does it that way.

Hi Brett,

I'm sorry that you have had issues in obtaining a suitable windows
binary of MPIR. I wish that you had asked for help here before doing
all that work since I feel sure that we could have steered you in the
right direction.

Please just compile your binary and upload the single .exe, .dll, or
.lib to the internet. Unlike Unix, Linux, and Mac, there is only one
version of Windows, so you only need to upload one binary file! It's a
lot easier on Windows! So please understand compiling other peoples'
source code on Windows in not standard, and as such you & us will only
ever have problems. We need to set up our computers to be exactly like
your computers in order for any source code to be worth anything.

The Windows build system for MPIR uses Microsoft Visual Studio for which
a free version is available. The reason we don't offer binaries is that
there would have to be a lot of them since most users of MPIR want very
high speed and this means that the code has to be built for the specific
Intel processor on which a user wishes to run it.

But the Visual Studio build system is reasonably easy to use and a lot
of people are using it without difficulty so we should be able to guide
you through the process if you have run into trouble using it.

I know from Unix and Linux you guys obfuscate your OS and installation
methods in order to make it difficult and cool to use Linux. But
everyone else just wants to download 1 binary file and run it like you
know.. a normal person. You know how there's just 1 icon on my desktop
for Internet, and 1 icon for E-Mail, and 1 icon for Facebook. You need
to make 1 icon for MPIR! There is no need to have a .zip file with 4,172
files in it! Windows isn't like Linux, it's not hard to use! Windows can
just have 1 file!

As Bill has said we don't have the bandwidth to host the binaries as you
suggest. But you are right that the current distribution approach is
one in which we put both the Linux and the Windows build into the same
distribution so each carries the unnecessary overhead of the other. I
have a feeling that we should now offer the Linux/GCC and Windows/Visual
Studio builds as two separate distributions as this would greatly reduce
the size of the Windows distribution in particular.

If you are willing to try the Visual Studio build for MPIR, I feel sure
that I will be able to guide you through it (I am the developer and
maintainer of the build system on Windows).

with my regards

Brian Gladman

Message has been deleted
Message has been deleted

degski

unread,
Aug 17, 2018, 11:44:02 PM8/17/18
to mpir-...@googlegroups.com, Brian Gladman
Hi,

1>EXEC : error : static library tests need 'mpirxx.lib'

Brian 's still asleep I would say. You'll need to build the cpp wrapper lib ' mpirxx.lib' as well and put that next to your 'mpir.lib', you'll probably need another header (mpir.hpp ?) as well, cannot remember.

Having said that, the cpp wrapper is included with mpir (which is the same as the one with gmp) is really just an afterthought and there are much better solutions wrapping mpir for modern c++, like this one https://github.com/bluescarni/mppp, it is also actively being developed, and I know from doing it that requesting anything extra to be added will get a positive response and will actually be done (I wanted full bit-wise operators for mpz's and that's now included f.e.

Other than that, I'm afraid you're a bit behind the curve. Also in the Microsoft world things are moving towards "build yourself". To that purpose (or in support of) Microsoft just spent 8 Billion dollars to acquire GitHub, so they must definitely like it. The new build tools on windows are basically cmake and ninja. VS17 has full support for git, github and cmake (and improving with every weekly release ;-) ). When you get the hang of it, it's actually quite nifty and works like a dream. Make sure you have the latest versions at all time as these tools are in constant flux due to the much increased usage (in the ms-world).

Microsoft also started a project called vcpkg, This is a package manager (automatic download, build for your system, and integrate with vc). You can find that project at https://github.com/Microsoft/vcpkg . They are extremely active, packages are added on a weekly basis, but there's no limit, just what people contributing manage to get done during that week. You can find a host of software packages there, including mpir. Most packages can also be built with vcpkg for/on nix. The project is slowly warping into being a system for all. As usual, after pissing on win-guys for years, the nix guys cannot wait to get their foot in as soon as something good is happening in the ms-world.

With the latter there is a hitch, though, as it only provides the generic c-build. If someone (unfortunately always the same person) could improve that, then mpir would be on much better footing.


You allude to a separate distro for nix and win, yes, maybe you should even just fork and create a new project vcmp (or mmp Microsoft Multi Precision). Improving availability and distribution might even attract some new blood to support the project.

degski
PS: my apologies (to all) for the ranting, did not have my coffee yet.





On Sat, 18 Aug 2018 at 06:00, UZRNW SDRXG <sdvuis234...@gmail.com> wrote:
Whoops, here are the compiler logs! Can't seem to figure out how to edit my last post.

1>------ Rebuild All started: Project: add-test-lib, Configuration: Release x64 ------
1>EXEC : error : static library tests need 'mpirxx.lib'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5): error MSB3073: The command "cd ..\..\..\build.vc 
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5): error MSB3073: check_config x64 Release 15
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5): error MSB3073: :VCEnd" exited with code -1.
1>Done building project "add-test-lib.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

1>------ Rebuild All started: Project: mpz.addsub, Configuration: Release x64 ------
1>EXEC : error : static library tests need 'mpirxx.lib'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5): error MSB3073: The command "cd ..\..\..\build.vc 
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5): error MSB3073: check_config x64 Release 15
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5): error MSB3073: :VCEnd" exited with code -1.
1>Done building project "mpz.addsub.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

On Fri, Aug 17, 2018 at 9:47 PM, UZRNW SDRXG <sdvuis234...@gmail.com> wrote:
I have been trying it all day. I can do several different things so far, but none lead to success. I can successfully compile a mpir.lib Release/x64 and incorporate it into another C project. However compiling that project complains of not being able to open LIBCMT.LIB. LIBCMT is a VStudio lib and not used by my other C compiler at all. I am not sure why it's trying to use it either.

If I try to compile any of the \mpir-3.0.0\build.vc15\tune.sln examples they all fail instantly with the same non-helpful error.


--
You received this message because you are subscribed to a topic in the Google Groups "mpir-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpir-devel/HAHjnlowYxg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpir-devel+...@googlegroups.com.
To post to this group, send email to mpir-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+...@googlegroups.com.
To post to this group, send email to mpir-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.


--
"If something cannot go on forever, it will stop" - Herbert Stein

Brian Gladman

unread,
Aug 18, 2018, 1:43:08 PM8/18/18
to mpir-...@googlegroups.com
On 18/08/2018 04:00, UZRNW SDRXG wrote:
> Whoops, here are the compiler logs! Can't seem to figure out how to edit
> my last post.
>
> 1>------ Rebuild All started: Project: add-test-lib, Configuration:
> Release x64 ------
> 1>EXEC : error : static library tests need 'mpirxx.lib'
> 1>C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5):
> error MSB3073: The command "cd ..\..\..\build.vc <http://build.vc
> 1>C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5):
> error MSB3073: check_config x64 Release 15
> 1>C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5):
> error MSB3073: :VCEnd" exited with code -1.
> 1>Done building project "add-test-lib.vcxproj" -- FAILED.
> ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
>
> 1>------ Rebuild All started: Project: mpz.addsub, Configuration:
> Release x64 ------
> 1>EXEC : error : static library tests need 'mpirxx.lib'
> 1>C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5):
> error MSB3073: The command "cd ..\..\..\build.vc <http://build.vc
> 1>C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5):
> error MSB3073: check_config x64 Release 15
> 1>C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(123,5):
> error MSB3073: :VCEnd" exited with code -1.
> 1>Done building project "mpz.addsub.vcxproj" -- FAILED.
> ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

In order to test the MPIR static library builds you have to build both
mpir.lib (the C library) and mpirxx.lib (the C++ library). As far as I
can tell these failures are being generated because the mpirxx.lib
project has not been built.

The problem with the missing Microsoft library (LIBCMT.LIB) is likely to
be caused by the use of a different Windows SDK to that set in the
default, which is currently 10.0.16299.0 (Windows 10 Creators Update).

If you know the Windows SDK you want to use, you can set this when you
run mpir_config.py. An alternative is to edit this line:

'windows_sdk':'10.0.16299.0' # Windows 10 Creators Update

in the version_info.py file is the VS17 sub-directory (before you load
Visual Studio). The SDKs for the various windows 10 updates are:

Windows 10: 10.0.14393.795
Windows 10 Creators Update 10.0.16299.0
Windows 10 latest (I think!) 10.0.17134.0

Brian
Reply all
Reply to author
Forward
0 new messages