You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SR-11427] Swift Package cannot depend on libxml2 from SDK reliably #4666
I expect that given the fact that I defined libxml2 as a dependency in the target, with linkerSettings, SwiftPM would know how to find one of its system library (from the SDK).
This is really an Xcode issue rather than a SwiftPM issue, since the same customization is necessary to use libxml2 from an Xcode project. Can you file a Feedback with Apple as well? (It may get marked as a duplicate, admittedly, but including your use case can sometimes help prioritize bugs.)
Xcode has some bug and I already filled a bug report for it to Apple but the issue is different.
Xcode can build the project by just opening the Package.swift file and builds it without customization.
However, it cannot build the project when the package is imported in Xcode in another project, and I could not find a way to build the project depending on such lib.
daveanderson commented on Sep 7, 2019
daveandersonmannequin
Mannequin
More actions
I'm having a similar issue attempting to leverage libxml2 in an Xcode + SPM situation. I've tried both Mikaël's approach and a modulemap approach. To no avail. Have filed feedback with sample project: FB7229118.
I upgrade my setup to Xcode 11.0 GM: At least now, we have a consistent behaviour: Both Xcode or SwiftPM build cannot properly find the libxml2 headers.
Here is the Package.swift file: https://github.com/FluuxIO/XMPP/blob/master/Package.swift
So, it is unclear now how to properly set this up. Was the fact that Xcode was building fine the project a bug and what would be the preferred way to build a code depending on libxml2 ?
Activity
belkadan commentedon Sep 6, 2019
This is really an Xcode issue rather than a SwiftPM issue, since the same customization is necessary to use libxml2 from an Xcode project. Can you file a Feedback with Apple as well? (It may get marked as a duplicate, admittedly, but including your use case can sometimes help prioritize bugs.)
swift-ci commentedon Sep 6, 2019
Comment by Mickaël Rémond (JIRA)
Xcode has some bug and I already filled a bug report for it to Apple but the issue is different.
Xcode can build the project by just opening the Package.swift file and builds it without customization.
However, it cannot build the project when the package is imported in Xcode in another project, and I could not find a way to build the project depending on such lib.
daveanderson commentedon Sep 7, 2019
I'm having a similar issue attempting to leverage libxml2 in an Xcode + SPM situation. I've tried both Mikaël's approach and a modulemap approach. To no avail. Have filed feedback with sample project: FB7229118.
swift-ci commentedon Sep 11, 2019
Comment by Mickaël Rémond (JIRA)
I upgrade my setup to Xcode 11.0 GM: At least now, we have a consistent behaviour: Both Xcode or SwiftPM build cannot properly find the libxml2 headers.
Here is the Package.swift file: https://github.com/FluuxIO/XMPP/blob/master/Package.swift
So, it is unclear now how to properly set this up. Was the fact that Xcode was building fine the project a bug and what would be the preferred way to build a code depending on libxml2 ?