Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT: fix licence path win #24793

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

Merged
merged 1 commit into from
Sep 25, 2023
Merged

MAINT: fix licence path win #24793

merged 1 commit into from
Sep 25, 2023

Conversation

andyfaff
Copy link
Member

@charris, I think there's a mistake in the licence path on windows.

Also, is it permitted to statically link a LGPL libquadmath into the libopenblas that we bundle?

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Sep 25, 2023
@charris
Copy link
Member

charris commented Sep 25, 2023

@mattip @rgommers Thoughts?

@@ -880,7 +880,7 @@ Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Name: libquadmath
Files: numpy\.libs\libopenb*.dll
Files: numpy.libs\libopenb*.dll
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we statically linking a .dll? Or should it be .a for Windows? And we're sure it should be an OpenBLAS library name for quadmath instead of a quadmath-specific lib? Is it an indirect link to quadmath via OpenBLAS then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that's what's in the wheel, although maybe the static linking line below this line is less clear to me via DLL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is correct. The one file that is vendored is libopenblas64*.dll, and that DLL also contains statically linked libgcc and libquadmath.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andyfaff. That's indeed a mistake, it snuck in in gh-24753. The discussion shows that the intent was numpy.libs, and that is what is in the 1.26.0 wheels.

@@ -880,7 +880,7 @@ Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Name: libquadmath
Files: numpy\.libs\libopenb*.dll
Files: numpy.libs\libopenb*.dll
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is correct. The one file that is vendored is libopenblas64*.dll, and that DLL also contains statically linked libgcc and libquadmath.

@rgommers
Copy link
Member

Also, is it permitted to statically link a LGPL libquadmath into the libopenblas that we bundle?

Yes, that is permitted. I looked at those details when reviewing gh-24753; there's no substantial difference in dynamic vs static linking.

@charris charris merged commit 4953864 into numpy:main Sep 25, 2023
@charris
Copy link
Member

charris commented Sep 25, 2023

Thanks Andrew.

@andyfaff andyfaff deleted the licence branch September 25, 2023 21:56
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Sep 26, 2023
@carlkl
Copy link
Member

carlkl commented Sep 27, 2023

just a comment: (windows)

a statically linked and stripped libquadmath.dll doesn't include any libquadmath code. This can be easily proven with linker maps.

@mattip
Copy link
Member

mattip commented Sep 27, 2023

@carlkl I don't understand the comment. The source code is still compiled into the resulting OpenBLAS dll.

@mattip
Copy link
Member

mattip commented Sep 27, 2023

Or are you saying that the windows DLL does not actually use any of the libquad code, since it does not call any 128-bit float routines, so the linker will not pull in the code?

@mattip
Copy link
Member

mattip commented Sep 27, 2023

Ahh, I found this discussion of libquadmath on an openblas-libs issue MacPython/openblas-libs#82 (comment). It would be nice to upstream that patch.

@carlkl
Copy link
Member

carlkl commented Sep 27, 2023

I tested this last year or so with te help of linker maps. The symbol quadmath_snprintf isn't used after all in the resulting binary but it is necessary to make the linker happy. I can check this again if needed and provide more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants