Sujet : Re: Python recompile
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 11. Mar 2025, 21:20:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqq5um$25dm2$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Mozilla Thunderbird
On 11/03/2025 18:47, bart wrote:
On 11/03/2025 17:09, David Brown wrote:
On 11/03/2025 17:23, bart wrote:
On 11/03/2025 15:06, David Brown wrote:
On 11/03/2025 15:24, bart wrote:
>
To build open source projects, I'm happy to use an existing C compiler. I'm NOT happy about bending over backwards to use CYGWIN, MSYS2 or WSL because the developers insist on forcing their Linux dependencies down my throat.
>
>
Developers can do what they like. But they shouldn't inflict their choices on other people, especially those using other OSes.
>
>
I have not paid a lot of attention to this thread. But I am curious here - who do you think is /forcing/ you to compile their code?
>
OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I can can use on Windows. If that's not possible then there is no choice (other than not to use them at all, which is what I do).
>
>
So do you think that those projects are /forcing/ you to use their code? Are the folks who wrote GMP responsible for /your/ insistence on using /their/ code, without using additional tools or libraries? You want to use what probably amounts to hundreds of person-years of specialised work, for free, and you are not willing to go to the effort of downloading and installing a few other bits of /free/ software first, in order to be able to follow freely available instructions found online?
>
And you blame the GMP and LIBFFI for all this? They are, after all, holding a gun to your head and insisting that you use their software while viscously and maliciously refusing to re-write their code to remove traces of code that rely on the platforms they use themselves.
>
Or maybe it is now /my/ responsibility to find these dll's for you?
>
Well, you are in luck :
>
<https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp>
<https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi>
>
The compressed tarballs include the dlls.
I downloaded a couple of large files, including mingw64-x86_64-gmp-6.3.0-1-src.tar, but found no trace of any DLL files.
You downloaded the source tarballs, and are surprised to find they contain source files - not binaries? Did the abbreviation "src" not give you a clue?
Try the link that is labelled "File:" - it is the msys2/mingw-w64 tarball with libgmp-10.dll and all the other files shown in the list at the bottom of the page, under "Files:".
Now, it may be that those dll's rely on other dll's that are a standard part of the msys2 packaging - that's up to you to figure out, since you don't want to use a convenient setup.
The page also has a link to a page on a site called "release-monitoring.org", which again has a link to a page on "cran.r-project.org" :
<
https://cran.r-project.org/web/packages/gmp/index.html>
This also has Windows binaries for gmp. I leave it up to you to figure out which file you should be downloading, and to check if the dll is directly suitable for you.
(But I'm pleased that the GMP configure script hasn't grown beyond 30583 lines. When they manage 0 lines, let me know.)
Meanwhile here is the library *I* had to use instead:
https://github.com/sal55/langs/tree/master/bignum
It is not exactly comparable, is it?
If all you need is some simple arithmetic done in a naïve school long multiplication way, then the code is fine. Your code is a reasonably clear and straightforward implementation of that. If you have no need of more than that, there is little point in going for something as powerful as GMP - it is probably faster to write such code than it is to learn how to use GMP.