Conference-app-2020: [iOS] Failed to build SwiftGen

Created on 30 Jan 2020  路  5Comments  路  Source: DroidKaigi/conference-app-2020

Overview (Required)

  • Failed to build SwiftGen.

Steps To Reproduce

  1. Go to ios_base directory.
  2. Run make init
  3. 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
bug welcome contribute

Most helpful comment

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.

All 5 comments

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!

馃檱

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rkonno picture rkonno  路  5Comments

takahirom picture takahirom  路  8Comments

roana0229 picture roana0229  路  6Comments

takahirom picture takahirom  路  6Comments

takahirom picture takahirom  路  5Comments