Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gmp] 6.3.0 Build on Windows could be great if it could identify patch levels #43460

Open
twata1 opened this issue Jan 25, 2025 · 4 comments
Open
Assignees
Labels
category:question This issue is a question

Comments

@twata1
Copy link

twata1 commented Jan 25, 2025

Is your feature request related to a problem? Please describe.

Thanks for providing the vcpkg.

Currently, gmp version is v6.3.0.
If I just use the library, I don't know if it is #0, #1 or #2.
v6.3.0#2 includes #42443 .
It is no longer easy to distinguish whether a library is built with cl.exe or with gcc.exe or others.

Proposed solution

Define something like __GNU_MP_VCPKG_VERSION_PATCH_LEVEL in gmp.h.

Describe alternatives you've considered

No response

Additional context

As stated in the INSTALL file of MPFR 4.2.1, if the MPFR-formatted output functions based on ISO-conforming printf() are to be used in gcc.exe, gmp may be compiled with CC="gcc -D__USE_MINGW_ANSI_STDIO".
If a module provided in an LL language such as Perl deals with its gmp, it may fail in the test case of its output functions if it is not known which one the library was compiled with.

@twata1 twata1 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jan 25, 2025
@Mengna-Li
Copy link
Contributor

You can see the specific version number through the vcpkg command:

C:\123\vcpkg>vcpkg.exe install gmp:x64-windows
Computing installation plan...
The following packages are already installed:
    gmp:[email protected]#2
C:\123\vcpkg>vcpkg.exe search gmp
glpk[gmp]                                 Use the GNU Multiple Precision Arithmetic Library
gmp                      6.3.0#2          The GNU Multiple Precision Arithmetic Library
gmp[fat]                                  Enable runtime selection of optimized low level routines

@Mengna-Li Mengna-Li added category:question This issue is a question and removed category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist labels Jan 26, 2025
@twata1
Copy link
Author

twata1 commented Jan 26, 2025

@Mengna-Li
Thank you for your reply.

The following is an example of execution in my environment, but you can certainly see that it is vcpkg search gmp.

C:\utilities\vcpkg>vcpkg search gmp
glpk[gmp]                                 Use the GNU Multiple Precision Arithmetic Library
gmp                      6.3.0#2          The GNU Multiple Precision Arithmetic Library
gmp[fat]                                  Enable runtime selection of optimized low level routines
The result may be outdated. Run `git pull` to get the latest results.
If your port is not listed, please open an issue at and/or consider making a pull request.  -  https://github.com/Microsoft/vcpkg
issues

C:\utilities\vcpkg>

But if I use a previous version in another directory, I don't know what version it is (Version 6.3.0#2 should not have been released on 09/22/2024.).

C:\utilities\vcpkg>dir C:\ext\lib\gmp*
 Volume in drive C has no label.
 Volume Serial Number is EE0B-E7AE

 Directory of C:\ext\lib

09/22/2024  09:13 PM         5,328,532 gmp.lib
09/22/2024  09:13 PM         4,214,692 gmpxx.lib
               2 File(s)      9,543,224 bytes
               0 Dir(s)  627,354,042,368 bytes free

C:\utilities\vcpkg>

@Mengna-Li
Copy link
Contributor

You can use the vcpkg.exe list command to check the port version numbers you have already installed.

@twata1
Copy link
Author

twata1 commented Jan 26, 2025

@Mengna-Li
Thank you again.

It is my understanding that in your opinion the vcpkg ... command will tell you the version of the installed library.
In fact, at the time I broke the vcpkg environment when I tried to update gmp.
Once I had almost emptied the c:\utilities\vcpkg folder and reintroduced it.
The results of vcpkg.exe list in my environment are as follows:

C:\utilities\vcpkg>vcpkg.exe list
gmp:x64-windows                                   6.3.0#2             The GNU Multiple Precision Arithmetic Library
gmp:x64-windows-static                            6.3.0#2             The GNU Multiple Precision Arithmetic Library
mpfr:x64-windows-static                           4.2.1               The MPFR library is a C library for multiple-pre...
vcpkg-cmake-get-vars:x64-windows                  2024-09-22
vcpkg-cmake:x64-windows                           2024-04-23

C:\utilities\vcpkg>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

2 participants