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

'libxml/xmlversion.h' file not found #104

Open
1 task
Parabak opened this issue Nov 11, 2019 · 5 comments
Open
1 task

'libxml/xmlversion.h' file not found #104

Parabak opened this issue Nov 11, 2019 · 5 comments

Comments

@Parabak
Copy link

Parabak commented Nov 11, 2019

Hi guys,

maybe you can help me to resolve my issue.

I'm using Fuzi in my framework for at least a year, it works great. I even did one PR previously.

Now I struggle with the following thing. Using cocoapods I integrate my framework compiled with Xcode 11.0 Swift 5.1 with the enabled flag 'Build Libraries for Distribution' to project written in Xcode 11.2 Swift 5.1.2. I expect that it should work because we have an ABI stability released. However, I have an error:

Showing All Messages
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.2.sdk/usr/include/libxml2/libxml/HTMLparser.h:15:10: 'libxml/xmlversion.h' file not found

Could not build Objective-C module 'libxml2'

My Framework compiled in Xcode 11.2 with Swift 5.1.2 doesn't produce errors.
Part of my podspec:

s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' }

s.dependency "Starscream" , '> 3.0.6'
s.dependency "SwiftyXML", '
> 1.7.0'
s.dependency 'Fuzi', '> 3.1.1'
s.dependency 'Sentry', '
> 4.2.1'
s.dependency 'ReachabilitySwift', '= 4.3.0'
s.dependency 'CryptoSwift', '~> 0.14.0'

The testing project has:
Other linker flags: -l"xml2"
Header Search Path: $(SDKROOT)/usr/include/libxml2

I can't understand the issue. Why it works for one version and doesn't work with another. Previously it was complaining that module was built with another Swift version, but 'Build Libraries for Distribution' flag looks like resolve it.

I also tried to find any hint in thread opened by @thebluepotato here: https://forums.swift.org/t/referring-to-libxml2-in-swift-package-description/28880 but failed.

I will appreciate any help. Thanks in advance!

Best regards,
Alex.

Environment

  • Package Manager:

    • CocoaPods, version: 1.8.3
  • Fuzi version: 3.1.1

  • Xcode version: 11.2

@RomanPodymov
Copy link

RomanPodymov commented Nov 13, 2019

Hello @Parabak
I'm getting the same error using Fuzi 3.1.1, macOS 10.15.1, Carthage 0.34.0 and Xcode 11.2.1.

@Parabak
Copy link
Author

Parabak commented Nov 13, 2019

@RomanPodymov, So far I didn't find a workaround. So please share solution, in case you find one.

@cezheng
Copy link
Owner

cezheng commented Nov 19, 2019

ABI compatibility is really just ensured by Apple that Fuzi does not really know about. Why is it absolutely necessary to use a binary built with earlier versions of Xcode with a project with newer Xcode version, given that you have all the source code and it only takes a few seconds to do a fresh build?

@Parabak
Copy link
Author

Parabak commented Nov 19, 2019

Hi @cezheng, thanks for the reply!
The problem is that our framework is distributed as binary and it was a company decision. So this fact most likely is not going to be changed. However, it's not only about building the binary with an older version of Xcode and also vice versa:
Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler:
Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.1 compiler:

It there anything we can do about it? How Fuzi can be improved and is it possible at all?
I can try to make PR if you can point me what should be improved or where I can read about it?

@cezheng
Copy link
Owner

cezheng commented Nov 21, 2019

I don't think this is a Fuzi bug, but you should probably file a bug to Apple if this is important to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants