Skip to content
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

[SR-3502] Poor diagnostic when reading pkg config file with unsupported flags #5142

Closed
Bouke opened this issue Dec 28, 2016 · 0 comments
Closed
Labels

Comments

@Bouke
Copy link
Contributor

Bouke commented Dec 28, 2016

Previous ID SR-3502
Radar None
Original Reporter @Bouke
Type Bug
Status Resolved
Resolution Duplicate
Environment

Apple Swift version 3.0-dev (LLVM 217eb6c2b6, Clang 34a98ce92e, Swift 1eb5648c46)
Target: x86_64-apple-macosx10.9

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: eddc700c900efb73e32a3a5887f5fa43

duplicates:

  • SR-4195 omit frame pointer is not whitelisted

Issue Description:

The following system module wrapper;

import PackageDescription

let package = Package(
    name: "CNCurses",
    pkgConfig: "ncurses",
    providers: [
        .Brew("ncurses")
    ]
)

When trying to build gives this error message:

swift build
error: nonWhitelistedFlags("Non whitelisted flags found: [\"-D_DARWIN_C_SOURCE\"] in pc file ncurses")

The pkg-config file that's being used:

# pkg-config file generated by gen-pkgconfig
# vile:makemode

prefix=/usr/local/Cellar/ncurses/6.0_2
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/ncursesw
abi_version=6
major_version=6
version=6.0.20150808

Name: ncursesw
Description: ncurses 6.0 library
Version: ${version}
URL: http://invisible-island.net/ncurses
Requires.private:
Libs:  -L${libdir} -lncursesw
Libs.private:
Cflags:  -D_DARWIN_C_SOURCE -I/usr/local/Cellar/ncurses/6.0_2/include -I${includedir}

What's the error here; is this pkg config file not supported at all? Does it require alterations? Is SwiftPM lacking in this regard? As a user, it's a very confusing error message. What's the fix-it?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant