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-4195] omit frame pointer is not whitelisted #5073

Open
swift-ci opened this issue Mar 8, 2017 · 7 comments
Open

[SR-4195] omit frame pointer is not whitelisted #5073

swift-ci opened this issue Mar 8, 2017 · 7 comments
Assignees
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Mar 8, 2017

Previous ID SR-4195
Radar rdar://problem/28171331
Original Reporter tannernelson (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 4
Component/s Package Manager
Labels Bug
Assignee @aciidb0mb3r
Priority Medium

md5: 3528ba291b3b454cfba59ed543ac6675

is duplicated by:

  • SR-2481 SwiftPM pkgconfig Cflags whitelist prevents MySQL client import
  • SR-3502 Poor diagnostic when reading pkg config file with unsupported flags

Issue Description:

error: nonWhitelistedFlags("Non whitelisted flags found: [\"-fno-omit-frame-pointer\"] in pc file mysqlclient")

Would it be possible to white list this flag in pkg config? It's preventing mysql from linking properly

// swift-tools-version:3.1

import PackageDescription

let package = Package(
    name: "CMySQL",
    pkgConfig: "mysqlclient",
    providers: [
        .Brew("mysql"),
        .Apt("libmysqlclient-dev")
    ]
)

The offending line of the .pc file

/usr/local/opt/mysql/lib/pkgconfig/mysqlclient.pc

Cflags: -I${includedir} -fno-omit-frame-pointer

Environment:

Gertrude:mysql tanner$ swift --version
Apple Swift version 3.1-dev (LLVM a7c680da51, Clang 9772bf511a, Swift ce937d9373)
Target: x86_64-apple-macosx10.9
Gertrude:mysql tanner$ sw_vers -productVersion 
10.12.3
Gertrude:mysql tanner$ 
@ankitspd
Copy link
Member

ankitspd commented Mar 8, 2017

@ddunbar What do you think we should do here? Will this be solved by build settings?

@swift-ci
Copy link
Contributor Author

swift-ci commented Mar 8, 2017

Comment by tanner0101 (JIRA)

Update:
Fails on Circle CI with:

error: nonWhitelistedFlags("Non whitelisted flags found: [\"-fabi-version=2\", \"-fno-omit-frame-pointer\"] in pc file mysqlclient")

Strange b/c it works on my local docker copy of Ubuntu 16.04

@ankitspd
Copy link
Member

ankitspd commented Mar 8, 2017

Thats probably because of difference in pc files on your local docker and circle ci.

@ddunbar
Copy link
Member

ddunbar commented Mar 8, 2017

I think what we should do for now is accept and discard these flags.

-fabi-version is something only G++ takes.

-fno-omit-frame-pointer isn't required for correctness of dependents, so I don't think we would want to propagate it in this manner

@swift-ci
Copy link
Contributor Author

swift-ci commented Mar 8, 2017

Comment by tanner0101 (JIRA)

It would be nice if non whitelisted flags could be ignored (maybe just print warnings?) without causing the build to fail.

Any chance a fix like this could be making it into Swift 3.1? We're trying to figure out how to handle linker flags in Vapor 2 and I'd love if we could start using pkg config over the custom CLI system we have now.

@swift-ci
Copy link
Contributor Author

swift-ci commented Mar 9, 2017

Comment by tanner0101 (JIRA)

#1008

@swift-ci
Copy link
Contributor Author

Comment by Pop Flamingo (JIRA)

I encountered the same issue and did a PR to try to fix it : #1827

Don't hesitate to comment it if you have any feedback.

@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
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

4 participants