Open omochi opened 6 years ago
@swift-ci create
Comment by Brian Palmer (JIRA)
This is a problem with SDL2 as well, which has `-D_THREAD_SAFE` in its .pc file CLFAGS.
Comment by Tom Sullivan (JIRA)
Also an issue with `osxfuse`:
$ pkg-config --cflags osxfuse
-D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/osxfuse/fuse
Environment
macOS High Sierra version 10.13.4 iMac (retina 4K, 21.5-inch, 2017) Xcode 9.3 Homebrew 1.6.3 imagemagick: stable 7.0.7-31 (bottled)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 5af0917f7ede1519c735bf074c4a2f92Issue Description:
SwiftPM can not handle pkg-config file which contains `-D` options for cflags at all.
In my investigation, `PackageLoading.whitelist` throws `PkgConfigError.nonWhitelistedFlags` if cflags in `*.pc` file contains `-D` style options and `PackageLoading.pkgConfigArgs(for: fileSystem🙂` which is a caller of `whitelist` returns error value of `PkgConfigResult`.
This is problem in a library actually exists.
For example, `MagickWand` distributed by homebrew in mac contains `-D` options.
This is programming interface of `ImageMagick` which is a very famous image processing tool.