-
Notifications
You must be signed in to change notification settings - Fork 98
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
Meson build failure in macOS Catalina (appleframeworks not found, tried framework) in p11-kit 0.25.1+ #598
Comments
Given the CI passes on macOS 12 with "Run-time dependency appleframeworks found: YES (foundation)", I suspect there might be something missing on your build setup, though I can't point what's exactly causing this. @neverpanic do you have any thought? |
Quick test with check_appleframeworks.c and meson.build: #include <stdio.h>
int main() {
printf("Apple Frameworks Test\n");
return 0;
} project('check_appleframeworks', 'c')
src = 'check_appleframeworks.c'
appleframeworks = dependency('appleframeworks', modules: 'foundation')
if appleframeworks.found()
message('appleframeworks with "foundation" module found')
else
message('appleframeworks with "foundation" module not found')
endif
executable('check_appleframeworks', src, dependencies: appleframeworks) Output: username appleframeworks_test % meson build
The Meson build system
Version: 1.2.3
Source dir: /Users/username/Development/appleframeworks_test
Build dir: /Users/username/Development/appleframeworks_test/build
Build type: native build
Project name: check_appleframeworks
Project version: undefined
C compiler for the host machine: cc (clang 12.0.0 "Apple clang version 12.0.0 (clang-1200.0.32.29)")
C linker for the host machine: cc ld64 609.8
Host machine cpu family: x86_64
Host machine cpu: x86_64
Run-time dependency appleframeworks found: NO (tried framework)
meson.build:7:18: ERROR: Dependency "appleframeworks" not found, tried framework
A full log can be found at /Users/username/Development/appleframeworks_test/build/meson-logs/meson-log.txt
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. Error logs (meson-log.txt):
More information (MacOS Catalina 10.15.7): username % xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
username % xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates There are more issues but not sure if they are related: Thanks :) |
Hi, this works with a capital F in Foundation. Path to it is /System/Library/Frameworks/Foundation.framework, and my filesystem is also case-sensitive. project('check_appleframeworks', 'c')
src = 'check_appleframeworks.c'
appleframeworks = dependency('appleframeworks', modules: 'Foundation')
if appleframeworks.found()
message('appleframeworks with "foundation" module found')
else
message('appleframeworks with "foundation" module not found')
endif
executable('check_appleframeworks', src, dependencies: appleframeworks) ......
C compiler for the host machine: cc (clang 12.0.0 "Apple clang version 12.0.0 (clang-1200.0.32.29)")
C linker for the host machine: cc ld64 609.8
Host machine cpu family: x86_64
Host machine cpu: x86_64
Run-time dependency appleframeworks found: YES (Foundation)
Message: appleframeworks with "foundation" module found
Build targets in project: 1
Found ninja-1.11.1 at /usr/local/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. If you set it to Foundation, it should work for both case-sensitive and case-insensitive disk format. Please let me know your opinion and if it passes the tests for your macOS versions. Thanks again! Note: if this turns out to be the fix, case-sensitivity should also be mentioned in Meson Dependencies for AppleFrameworks |
@aminehaddad thank you tracking down the issue! Regarding the fix, I would like to hear any opinion from the Meson folks. Could you open an issue at https://github.com/mesonbuild/meson/issues ? |
@ueno Hi, I've reported it but I also tried their python code and they seem to be lowercasing (glob) the entry in *.framework. I'm not sure why my python script works, and why my meson build works, but it is making an error installing p11-kit. I could use some help, please! Thank you! |
I tried building p11-kit from source, and it worked when changing it to 'Foundation': With 'foundation':
Changed to 'Foundation':
I also noticed that Catalina was removed from Homebrew. |
Unfortunately it is common for such case issues to remain undetected on macOS because the default is a case-insensitive but case-preserving filesystem. I'm not sure whether this should be fixed in meson or p11-kit, but it's definitely a bug. |
If it is a case-sensitive issue, then it should follow the rules that AppleFramework does. In iOS/etc development, they use case-sensitive. In most projects with meson.build, they use case-sensitive as well: QEMU - I use this as well (it compiles fine with darwin and it uses case-sensitive letters) Can a fix be added on p11-kit as well, please? Thanks! |
Thanks a lot, @aminehaddad, this allowed me upgrade locally! For other Homebrew users going through this issue, for the time being, what allowed me to upgrade p11-kit was to do the following: Run After it completes, exit the shell and choose option 2, "ignore" – the build should now succeed. |
As per issue p11-glue#598, the Foundation AppleFramework should be searched case-sensitively, to accomodate for case-sensitive APFS partitions.
As per issue p11-glue#598, the Foundation AppleFramework should be searched case-sensitively, to accomodate for case-sensitive APFS partitions.
I've taken the liberty to open #600 myself, feel free to close if an alternative fix is found. |
I've been having compilation failures since p11-kit 0.25.1/0.25.2 in macOS Catalina (with xcode-select installed). It was working fine with 0.25.0. Should this be reported in Meson or perhaps I am missing something on my end?
Side note: it is used for dependencies in QEMU -> gnutls -> p11-kit. Thanks!
The text was updated successfully, but these errors were encountered: