On the system libxml2-dev package is installed, and
/usr/include/libxml -> /usr/include/libxml2/libxml symlinked and
/usr/include/libxml2/module.modulemap exists with the following content:
If I create a template swift package with Fuzi as a dependency in it:
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "spm-test",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "spm-test",
targets: ["spm-test"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/cezheng/Fuzi.git", from: "3.1.2"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "spm-test",
dependencies: ["Fuzi"]),
.testTarget(
name: "spm-testTests",
dependencies: ["spm-test"]),
]
)
Compilation is failing on the following code snippet:
Do you by any chance have an example file which requires this code path? Then I can add this to my PR #117. Currently that PR just disables this code path on Linux.
On the system
libxml2-dev
package is installed, and/usr/include/libxml -> /usr/include/libxml2/libxml
symlinked and/usr/include/libxml2/module.modulemap
exists with the following content:If I create a template swift package with Fuzi as a dependency in it:
Compilation is failing on the following code snippet:
https://github.com/cezheng/Fuzi/blob/f08c8323da21e985f3772610753bcfc652c2103f/Sources/Document.swift#L34-L42
The error message I get is this:
I saw that Kanna has something to patch this behavior but I am not sure how to implement it:
https://github.com/tid-kijyun/Kanna/blob/c657fb9f5827ef138068215c76ad0bb62bbc92da/Sources/Kanna/libxmlHTMLDocument.swift#L29