[iOS] Failed to build SwiftGen
See original GitHub issueOverview (Required)
- Failed to build SwiftGen.
Steps To Reproduce
- Go to
ios_base
directory. - Run
make init
Failed to build SwiftGen 6.1.0 with SPM
Expected behavior the build to be success.
Env:
- OS: MacOS 10.15.3
- Xcode 11.3.1
- master branch / 2bedc70e496d3abc207754cd2a178e96b626d86e
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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Xcode SwiftGen: build fails in project with multiple targets
I have a project with two targets (MyProject and MyProject Dev) which has SwiftGen integrated with Cocoapods. I can build the first target...
Read more >SwiftGen Build Tool Plugin buildCommand issue in Xcode 13.3
I am trying to get SwiftGen working at a buildCommand Build Tool ... coach-ios/NoomOnboardingUI/SwiftGenPlugin/SwiftGenOutputs/Strings.swift ...
Read more >Xcode Cloud is not able to access swift-gen generated file
I am using swiftgen as a prebuild command plugin in one of my internal swift ... When using Xcode cloud to build the...
Read more >SwiftGen on CocoaPods.org
A collection of Swift tools to generate Swift code for your assets, storyboards, strings, …
Read more >SwiftGen on iOS Dev Tools
SwiftGen is a tool to automatically generate Swift code for resources of your ... Starting with SwiftGen 6.2.1, if you get an error...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
SwiftGen’s README said
After installed libxml2 by manually, the SwiftGen build will succeed.
@roana0229 thank you!