-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Formulae built with GCC have LC_BUILD_VERSION sdk n/a causing notarization issue #209981
Comments
This was filed right as I was putting 209983 together. I'll close that one. |
Probably a side effect of GCC setting SDK to 0.0 at https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/darwin.h#l289 CC @fxcoudert ❯ ld test.o -o test -platform_version macos 15.0 0.0 && otool -l test | grep -E 'sdk|minos'
minos 15.0
sdk n/a
❯ ld test.o -o test -platform_version macos 15.0 15.0 && otool -l test | grep -E 'sdk|minos'
minos 15.0
sdk 15.0
❯ ld test.o -o test -macos_version_min 15.0 && otool -l test | grep -E 'sdk|minos'
minos 15.0
sdk 15.0 |
Interesting, I always thought homebrew defaults to apple clang for prebuilt bottles. Maybe it gets confused because gcc is installed for the gfortran compiler? Btw. why is Fortran used here? OpenBlas should compile fine without (apparently they even have a LAPACK version in C if you do it for LAPACK). |
So I'm not entirely sure what is the bug. The codesign binary is giving a warning. The SDK min version is not set. I think that's actually done on purpose by GCC |
If there is no min sdk set, you cannot notarize the library for deployment as a dependency of an app (e.g. for the App store). |
At least that was my understanding. |
@jpfeuffer do you have a doc link or quote for that? Then we have to figure out: do we think it's the responsibility of the compiler, or the build system, to pass the right information about SDK. |
Specifically seems to need 10.9 minimum: |
@cho-m thanks for jumping in. |
@jpfeuffer as @cho-m's link describe, the SDK is very different from the macOS min deployment version (which, I believe, is correctly set) |
Per the apple documentation link it looks like the minimum SDK (for libraries that are intended to be included in downstream distribution) should be 10.9, to avoid these sorts of opaque errors. @fxcoudert you are correct that the macOS version is properly specified. |
homebrew-core/Formula/o/openblas.rb Line 38 in 7ba9200
which apparently does not work as intended. Edit: Forget what I said, you are completely right. Minos is correct but sdk is n/a. |
Sorry, you are correct. See my edits. I understand what you mean now. For the actual sdk version I kind of assume the compiler/linker would set this when using whatever sdk it receives from the sysroot (or its default). |
Conda seems to have similar problems: |
Adding Original reason for 0.0 choice: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624#c5 This change was first introduced in GCC 13.2.0 via backport (gcc-mirror/gcc@4adf49a) so its been around a while (2023-09) |
After some discussion, this is now being treated as a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119172 A fix is being tested. Many thanks for the report! |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem. (I will not remove the deprecated libraries and tools, since I need them)What were you trying to do (and why)?
Codesign a library that uses openblas from brew for distribution. See e.g. OpenMS/OpenMS#7882 (comment)
What happened (include all command output)?
❯ codesign -dvvv libopenblasp-r0.3.29.dylib
Library validation warning=OS X SDK version before 10.9 does not support Library Validation
❯ otool -l libopenblasp-r0.3.29.dylib | grep sdk
sdk n/a
❯ otool -l libopenblasp-r0.3.29.dylib | grep LC_VERSION_MIN_MACOSX
What did you expect to happen?
Openblas being built with a min SDK specified.
I can see that you are trying to use it here but apparently it does not work.
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: