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-1567] [SwiftPM] Prevent/solve issue with seeing headers in /usr/include and SDK (was: compiler crash when passing -Xcc -I/usr/include
to swiftc)
#5281
Comments
@benlangmuir, any ideas? |
@aciidb0mb3r can you check if this is still an issue? |
Comment by Ian Partridge (JIRA) Kitura is seeing this as we migrate from 07-20a to 08-07a. Travis build: https://travis-ci.org/IBM-Swift/Kitura-net/jobs/153515406 Is there a workaround? |
I don't think anything changed here recently. I don't know of a workaround. |
(because we haven't seen it on macOS systems) |
…oh, Ankit's system is a macOS system. In that case I'm confused. Maybe there are conflicting module definitions? ( |
unfortunately I won't be able to re-check this again on my MacBook for another week |
I wonder if this is related to whether or not users have the command line tools installed causing an SDK to be present in /usr/include. |
Aha, this is probably SR-89 and also rdar://problem/26866326. Here's my guess as to what's going on, based on Daniel's idea and mren2 (JIRA User)'s diagnosis in the Radar: you're importing |
Comment by Shmuel Kallner (JIRA) We do indeed include curl/curl.h, however we do it as follows: 1) We have a project in the repository https://github.com/IBM-Swift/CCurl.git #import <curl/curl.h> The build is being run by simply executing: swift build |
I think the root cause when using We ultimately need to figure out why that is happening here and fix it. To some extent the Clang crash is a red herring, because even if Clang didn't crash here it would likely be a bad situation to be in. |
Given that we have SR-89 and a Radar for the clang crash, let's use this for figuring out why SwiftPM users are ending up in this situation. |
The example of |
Comment by Shmuel Kallner (JIRA) The issue apparently was a combination of using XCode 8 beta 6 with the Swift 3 08/07 driver. SPM in the 08/07 driver incorrectly picked up IBM-Swift/CCurl 0.2.0, instead of 0.2.1. The difference that seemed to matter the most was that the 0.2.0 version of IBM-Swift/CCurl has a pkgConfig element in it's Package.swift file, while the 0.2.1 version doesn't have it. Adding this information to help debug this problem for others. We in Kitura abandoned the migration to the 08/07 driver of Swift and have since migrated to the 08/23 driver without any problems. |
Comment by Jeffrey Bergier (JIRA) I don't know if this comment helps at all. But this problem has only been effecting me on some Macs. I've had 3 Macs all with exact same El Capitan and Xcode configuration. This problem was an issue on 2 of 3 Macs. The third Mac compiled fine. Then after the Sierra update, I could compile on 2 of the 3 Macs (the third was not Sierra compatible). However, since the 12.1 update, the issue has reappeared. I'm essentially dead in the water on the 12" MacBook. It works on fine on an older 15" rMBP. |
Comment by Jeffrey Bergier (JIRA) Ignore my previous comment. I've been working with the Perfect web server guys and we tracked down what causes Perfect-CURL to fail to compile. I'm assuming its the same failure as Kitura CURL failing. First there are two pre-requisites: 1) Xcode Command Line Tools installed (xcode-select -install) If both of those things are installed then it fails to compile. If only 1 of the 2 is installed then it works. So I just did brew uninstall pkg-config and it fixed the problem. I was able to install and uninstall pkg-config on 2 Macs and verify the crash happened and then didn't happen like clock work. So I'm not sure if this "solves" the problem, but its a workaround for now. |
The original problem doesn't involve pkg-config and I cannot reproduce it anymore . However the multiple pkg-config thing sounds like a SwiftPM bug, jeffburg@jeffburg.com (JIRA User) Can you open a new bug for that with output of this command with and without CLT: |
Comment by Jeffrey Bergier (JIRA) @aciidb0mb3r sure thing. New bug is SR-3129 |
Closing this as I don't see this error anymore on latest toolchain right now -> swift-DEVELOPMENT-SNAPSHOT-2016-11-15-a |
Attachment: Download
Additional Detail from JIRA
md5: 2a4e522bb9e3593da3cc9bab47b22184
is duplicated by:
relates to:
Issue Description:
I don't exactly know how to describe it but attaching the minimal package which reproduces this crash.
Crash :
The text was updated successfully, but these errors were encountered: