KarthikRIyer / swiftplot

Swift library for Data Visualization :bar_chart:
Apache License 2.0
398 stars 36 forks source link

Build failure on Swift 5.4 #127

Closed fwcd closed 3 years ago

fwcd commented 3 years ago

swiftplot fails to build on Swift 5.4 (Ubuntu 20.04):

$ swift build
:
:

.
:
:

:
:

.../swiftplot/Sources/AGGRenderer/CPPAGGRenderer/CPPAGGRenderer.cpp:6:10: fatal error: could not build module 'AGG'
#include "agg_basics.h"
 ~~~~~~~~^~~~~~~~~~~~~~
.
[38/73] Compiling AGG agg_font_freetype.cpp
mizhkeao commented 3 years ago

I'm getting a similar error when importing AGGRenderer on MacOS 11.3.1:

Screen Shot 2021-05-25 at 23 35 24

Here is my package manifest:

// 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: "sw",
    products: [
            // Products define the executables and libraries a package produces, and make them visible to other packages.
            .library(
                name: "sw",
                targets: ["sw"])
        ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
        .package(name: "SwiftImage", url: "https://github.com/koher/swift-image.git", from: "0.7.0"),
        .package(name: "SwiftPlot", url: "https://github.com/KarthikRIyer/swiftplot", .branch("master")) 
    ],

    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: "sw",
            dependencies: ["SwiftImage"]),
        .testTarget(
            name: "swTests",
            dependencies: ["sw", "SwiftPlot"]),
    ]
)

When will #128 get merged?

KarthikRIyer commented 3 years ago

Apologies for the delay. I've updated the CI to use Swift 5.4. Once #128 is rebased to the latest master and the CI passes, I'll merge it.

KarthikRIyer commented 3 years ago

@mizhkeao #128 is merged now. It builds on Swift 5.4. There's a test failure on Ubuntu which will need some investigation. It seems you're on mac, so you're issue should get resolved. Please let me know if it's fixed.