Overview (Required)
Steps To Reproduce
ios_base directory.make initFailed to build SwiftGen 6.1.0 with SPMExpected behavior
the build to be success.
Env:
Error Log
mint run swiftgen swiftgen
馃尡 Using SwiftGen/SwiftGen 6.1.0 from Mintfile.
馃尡 Cloning SwiftGen 6.1.0
馃尡 Resolving package
馃尡 Building package
[1/10] Compiling writer.c
[2/10] Compiling scanner.c
[3/10] Compiling reader.c
[4/10] Compiling parser.c
[5/10] Compiling emitter.c
[6/10] Compiling api.c
[7/11] Compiling Kanna CSS.swift
/private/var/folders/r9/d3j1xpps38q2h51974d_hvgw0000gn/T/mint/github.com_SwiftGen_SwiftGen/.build/checkouts/Kanna/Modules/libxml2-kanna.h:1:9: note: while building module 'libxml2' imported from /private/var/folders/r9/d3j1xpps38q2h51974d_hvgw0000gn/T/mint/github.com_SwiftGen_SwiftGen/.build/checkouts/Kanna/Modules/libxml2-kanna.h:1:
#import <libxml2/libxml/HTMLtree.h>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "libxml/HTMLparser.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/libxml2/libxml/HTMLparser.h:15:10: error: 'libxml/xmlversion.h' file not found
#include <libxml/xmlversion.h>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "libxml2-kanna.h"
^
/private/var/folders/r9/d3j1xpps38q2h51974d_hvgw0000gn/T/mint/github.com_SwiftGen_SwiftGen/.build/checkouts/Kanna/Modules/libxml2-kanna.h:1:9: error: could not build module 'libxml2'
#import <libxml2/libxml/HTMLtree.h>
^
/private/var/folders/r9/d3j1xpps38q2h51974d_hvgw0000gn/T/mint/github.com_SwiftGen_SwiftGen/.build/checkouts/Kanna/Sources/Kanna/CSS.swift:27:8: error: could not build Objective-C module 'libxmlKanna'
import libxmlKanna
^
'SwiftClibxml2' /private/var/folders/r9/d3j1xpps38q2h51974d_hvgw0000gn/T/mint/github.com_SwiftGen_SwiftGen/.build/checkouts/SwiftClibxml2: warning: system packages are deprecated; use system library targets instead
馃尡 Encountered error during "swift build -c release -Xswiftc -target -Xswiftc x86_64-apple-macosx10.15". Use --verbose to see full output
馃尡 Failed to build SwiftGen 6.1.0 with SPM
make: *** [swiftgen] Error 1
Thank you for report.
swiftgen require libxml2. see SwiftGen README
SwiftGen's README said
Installation
To install SwiftGen via Mint, simply use:
$ brew install libxml2
$ mint install SwiftGen/SwiftGen
After installed libxml2 by manually, the SwiftGen build will succeed.
@roana0229 thank you!
I think it is good to add it to ios-base/README.md!
馃檱
Most helpful comment
SwiftGen's README said
After installed libxml2 by manually, the SwiftGen build will succeed.