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

Does not build with Swift 5.0 on Ubuntu 18.10 #3

Closed
jgh- opened this issue Mar 31, 2019 · 4 comments
Closed

Does not build with Swift 5.0 on Ubuntu 18.10 #3

jgh- opened this issue Mar 31, 2019 · 4 comments

Comments

@jgh-
Copy link

jgh- commented Mar 31, 2019

I'm looking at the issue now, here's the error:

/home/james/dev/proj/deps/SwiftGLib/.build/gir2swift/.build/checkouts/SwiftLibXML/Sources/SwiftLibXML/XMLAttribute.swift:14:12: error: no such module 'libxml2'
    import libxml2
           ^

It seems to involve this statement here:

#if swift(>=4.1)
    import libxml2
#else
    import CLibXML2
#endif

So I'm wondering if something relating to libxml2 was removed in swift 5, i'm trying to track it down now but if you're more familiar with the internals of the frameworks maybe you already know where to look. I think an easy fix would be to just check that it's less than 5 but then I wonder if they've replaced libxml2 with something that would be better to use...

@jgh-
Copy link
Author

jgh- commented Mar 31, 2019

Just quickly replacing libxml2 with CLibXML2 it looks like getting this running with Swift 5 may be a bigger job than simply getting that import statement right

@rhx
Copy link
Owner

rhx commented Apr 5, 2019

Can you try again (just committed a fix to CLibXML2). I just tested this and it works fine for me.

@mag911
Copy link

mag911 commented Apr 5, 2019

Confirmed as working with Swift 5 under Debian buster, however, only using swift build. Using ./build.sh throws an error error: unknown option -lxml2; use --help to list available options

@mag911
Copy link

mag911 commented Apr 5, 2019

I can confirm that downstream of SwiftLibXML, gir2swift now successfully completes its build, as does SwiftHelloGTK. I'll be closing issue #2. Cheers.

@rhx rhx closed this as completed Dec 26, 2021
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