Sujet : Re: Python recompile
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 11. Mar 2025, 18:47:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqpsvc$23gc1$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
User-Agent : Mozilla Thunderbird
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.
(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/bignumThere are 4 files:
bignum.c Source code
bignum.h Header provides the API
bignum.dll Prebuilt binary
pid.c Demo to show it works
You can build bignum.c into the .dll yourself (sorry, I don't have a 40,000-line configure script or massive makefile for that, you'll have to figure it out yourself!), or compile it into your application.
The demo (shows digits of pi) is built like this:
tcc pid.c bignum.dll
This is what simplicity looks like.
(GMP now includes 'minigmp', which is one-file version plus headers. Performance is roughly on a par with my library.
However my library uses decimal representation, and includes arbitrary precision floating point.)
Oh, and it's open source and is in public domain.
<snip rest of your post>