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

Xcode cannot find libxml2 #95

Closed
jeffgilbert opened this issue Feb 21, 2020 · 10 comments
Closed

Xcode cannot find libxml2 #95

jeffgilbert opened this issue Feb 21, 2020 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@jeffgilbert
Copy link

I'm trying to add readium to a Swift project using Xcode 11.3.1. I've added the following two lines to my Podfile

  pod 'R2Navigator', :git => 'https://github.com/readium/r2-navigator-swift.git'
  pod 'R2Streamer', :git => 'https://github.com/readium/r2-streamer-swift.git'

When I build the project I get the following error:

R2Streamer Group
Swift Compiler Error Group
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/libxml2/libxml/HTMLparser.h:15:10: 'libxml/xmlversion.h' file not found
Could not build Objective-C module 'libxml2'

How can I get the pod for R2Streamer to find the libxml2 header?

Thanks,
Jeff

@mickael-menu mickael-menu added the help wanted Extra attention is needed label Feb 21, 2020
@mickael-menu
Copy link
Member

Hi,

You need to add $(SDKROOT)/usr/include/libxml2 to the "Header Search Paths" build setting of your project.

@jeffgilbert
Copy link
Author

Thanks!

I looked in the Build Settings for the app after installing the two pods and it already includes $(SDKROOT)/usr/include/libxml2.

I checked the Build Settings for the R2Streamer target in the Pods project, and it was missing $(SDKROOT)/usr/include/libxml2. I added it there and it is building. I gather I'll have to re-add that if the pods are ever updated.

Does the Podfile for the R2Streamer pod need to be updated to include that addition to the header search path?

@mickael-menu
Copy link
Member

I'm not sure actually, I'm only using Carthage.

@aferditamuriqi should know more about the CocoaPods config.

@jeffgilbert
Copy link
Author

It looks like this has been fixed in another fork maintained by @aferditamuriqi (and is not an issue when using Carthage to integrate, instead of CocoaPods).

@mickael-menu
Copy link
Member

I'll keep this opened for now as we still need to fix the issue in this repo.

@mickael-menu mickael-menu reopened this Mar 17, 2020
@aferditamuriqi
Copy link
Member

I’ll be pushing a PR soon for this fix

@mickael-menu
Copy link
Member

Thanks Aferdita, there's also this issue about the Podspec if you want to take a look: #93

@aferditamuriqi
Copy link
Member

@mickael-menu I've added my comment to the mentioned issue, there isn't an issue in the Podspec about GCDWebServer.

@mickael-menu
Copy link
Member

@mickael-menu I've added my comment to the mentioned issue, there isn't an issue in the Podspec about GCDWebServer.

Okay I see, thanks

@mickael-menu
Copy link
Member

CocoaPods is not supported anymore by Readium 2.

@mickael-menu mickael-menu transferred this issue from readium/r2-streamer-swift Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants