cezheng / Fuzi

A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
MIT License
1.06k stars 151 forks source link

Libxml2 Build issue on Linux #113

Open gazsiazasz opened 3 years ago

gazsiazasz commented 3 years ago

Description:

// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "apro_swift",
    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 which this package depends on.
        .target(
            name: "apro_swift",
            dependencies: ["Fuzi"]),
        .testTarget(
            name: "apro_swiftTests",
            dependencies: ["apro_swift"]),
    ]
)

Try to bulid

pi@raspberrypi:~/devel/apro_swift $ swift build
/home/pi/devel/apro_swift/.build/checkouts/Fuzi/Sources/Document.swift:23:8: error: no such module 'libxml2'
import libxml2
       ^
/home/pi/devel/apro_swift/.build/checkouts/Fuzi/Sources/Document.swift:23:8: error: no such module 'libxml2'
import libxml2
       ^
/home/pi/devel/apro_swift/.build/checkouts/Fuzi/Sources/Document.swift:23:8: error: no such module 'libxml2'
import libxml2
       ^
/home/pi/devel/apro_swift/.build/checkouts/Fuzi/Sources/Document.swift:23:8: error: no such module 'libxml2'
import libxml2
       ^
/home/pi/devel/apro_swift/.build/checkouts/Fuzi/Sources/Document.swift:23:8: error: no such module 'libxml2'
import libxml2
       ^
/home/pi/devel/apro_swift/.build/checkouts/Fuzi/Sources/Document.swift:23:8: error: no such module 'libxml2'
import libxml2
       ^
/home/pi/devel/apro_swift/.build/checkouts/Fuzi/Sources/Document.swift:23:8: error: no such module 'libxml2'
import libxml2
nighthawk commented 2 years ago

Linux isn't yet supported, see #46.

gazsiazasz commented 2 years ago

Actually I could make it work somehow, but don't remember the exact steps.