Git Product home page Git Product logo

Comments (3)

gen2brain avatar gen2brain commented on August 26, 2024

So looks like the bazel doesn't support pkg-config? Not sure what I can do here. You do have an option to not use pkg-config, or not use an external library at all?

from go-fitz.

mgenov avatar mgenov commented on August 26, 2024

gazelle seem working fine with cgo as it generates the following build:

load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go-fitz",
    srcs = [
        "fitz.go",
        "fitz_cgo.go",
    ],
    cgo = True,
    clinkopts = select({
        "@io_bazel_rules_go//go/platform:android_386": [
            "-Llibs -lmupdf_linux_386 -lmupdfthird_linux_386 -lm",
        ],
        "@io_bazel_rules_go//go/platform:android_amd64": [
            "-Llibs -lmupdf_linux_amd64 -lmupdfthird_linux_amd64 -lm",
        ],
        "@io_bazel_rules_go//go/platform:android_arm": [
            "-Llibs -lmupdf_android_arm -lmupdfthird_android_arm -lm -llog",
        ],
        "@io_bazel_rules_go//go/platform:android_arm64": [
            "-Llibs -lmupdf_android_arm64 -lmupdfthird_android_arm64 -lm -llog",
        ],
        "@io_bazel_rules_go//go/platform:darwin_amd64": [
            "-Llibs -lmupdf_darwin_amd64 -lmupdfthird_darwin_amd64 -lm",
        ],
        "@io_bazel_rules_go//go/platform:ios_amd64": [
            "-Llibs -lmupdf_darwin_amd64 -lmupdfthird_darwin_amd64 -lm",
        ],
        "@io_bazel_rules_go//go/platform:linux_386": [
            "-Llibs -lmupdf_linux_386 -lmupdfthird_linux_386 -lm",
        ],
        "@io_bazel_rules_go//go/platform:linux_amd64": [
            "-Llibs -lmupdf_linux_amd64 -lmupdfthird_linux_amd64 -lm",
        ],
        "@io_bazel_rules_go//go/platform:linux_arm": [
            "-Llibs -lmupdf_linux_arm -lmupdfthird_linux_arm -lm",
        ],
        "@io_bazel_rules_go//go/platform:linux_arm64": [
            "-Llibs -lmupdf_linux_arm64 -lmupdfthird_linux_arm64 -lm",
        ],
        "@io_bazel_rules_go//go/platform:windows_386": [
            "-Llibs -lmupdf_windows_386 -lmupdfthird_windows_386 -lm -lcomdlg32 -lgdi32 -lmsvcr90",
        ],
        "@io_bazel_rules_go//go/platform:windows_amd64": [
            "-Llibs -lmupdf_windows_amd64 -lmupdfthird_windows_amd64 -lm -lcomdlg32 -lgdi32",
        ],
        "//conditions:default": [],
    }),
    copts = ["-Iinclude"],
    importpath = "github.com/gen2brain/go-fitz",
    visibility = ["//visibility:public"],
)

alias(
    name = "go_default_library",
    actual = ":go-fitz",
    visibility = ["//visibility:public"],
)

go_test(
    name = "go-fitz_test",
    srcs = [
        "example_test.go",
        "fitz_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":go-fitz"],
)

Maybe avoiding usage of pkg-config could do the trick.

from go-fitz.

gen2brain avatar gen2brain commented on August 26, 2024

By default, the library is built with included static libraries. With -tags extlib enabled it links to an external library, and only with both -tags 'extlib pkgconfig' it will use pkg-config, so it is already avoided and must be explicitly enabled.

from go-fitz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.