-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
AppleFramework modules should be case-sensitive to support case-sensitive partitions #12480
Description
Describe the bug
When using AppleFrameworks, the modules should be set to case-sensitive to support both case-sensitive and case-insensitive partitions. Confirmation is requested by p11-kit before they fix an issue.
The case-sensitive warning should be put in the AppleFrameworks (instead of bottom of the page). Also, the following example should be fixed:
dep = dependency('appleframeworks', modules : 'foundation')
to
dep = dependency('appleframeworks', modules : 'Foundation')
Note: this is for all Darwin/iOS modules, including the ones located in /System/Library/Frameworks.
To Reproduce
On a partition that is case-sensitive (e.g. APFS case-sensitive), you can reproduce with files 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 frameworkExpected behavior
Warn the user to use case-sensitive name of the AppleFrameworks modules. Here's the output of a fix where module 'foundation' is set to 'Foundation':
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
......system parameters
- Test for MacOS case-sensitive and case-insensitive partitions
- meson 1.2.3
- ninja 1.11.1