Code Monkey home page Code Monkey logo

Comments (13)

twpayne avatar twpayne commented on May 10, 2024 1

It does work when you compile directly, but I'm cross-compiling as I'm using GoReleaser to build chezmoi's release binaries. The GoReleaser job runs on Linux (on GitHub Actions) and cross-compiles binaries for other operating systems and doesn't support cgo.

In practice I think zalando/go-keyring has done all that it's possible to reasonably do here. In chezmoi, I've used build tags to activate the GNOME Keyring functionality when it is available. twpayne/chezmoi#1919 contains the gory details if you're interested.

from go-keyring.

szuecs avatar szuecs commented on May 10, 2024

@torculus can you test it?
Do you think we just need to create a build target?

from go-keyring.

torculus avatar torculus commented on May 10, 2024

Yeah, I'm willing to test it. I'm not much of a go programmer, but I think the Linux target should work well as a template

from go-keyring.

szuecs avatar szuecs commented on May 10, 2024

@torculus can you try to build #68 on your system?
I just checked https://github.com/vmactions/freebsd-vm and it's a bit weird to run a VM inside macos and then I have to figure what ports I need to install (maybe you want to create a PR for the GH actions?).

from go-keyring.

szuecs avatar szuecs commented on May 10, 2024

@torculus we merged the change and it should built also on *BSD.

from go-keyring.

torculus avatar torculus commented on May 10, 2024

So, I attempted to build on my machine and it's complaining about u_int and uintptr_t being invalid types

Long story short, upsteam godbus had an issue with compiling on FreeBSD that was fixed back in 2020 (godbus version 5.0.4). Unfortunately, go-keyring is pulling godbus version 5.0.3, which is unpatched

I don't know if the requirement could be updated, but that would fix this issue

from go-keyring.

mikkeloscar avatar mikkeloscar commented on May 10, 2024

@torculus Could you try with this PR? #70

from go-keyring.

torculus avatar torculus commented on May 10, 2024

@mikkeloscar yes! It compiles perfectly without error!

I tried building the example module (on the README), but unfortunately my proficiency with Go is too limited to get it working as a local module. If it gets merged into master and released (go-keyring v0.1.2), I will re-test it

from go-keyring.

twpayne avatar twpayne commented on May 10, 2024

Note that github.com/godbus/dbus currently does not compile on freebsd/386. See godbus/dbus#315.

from go-keyring.

twpayne avatar twpayne commented on May 10, 2024

Ah, so the problem is in fact that godbus/gobus relies on cgo and cgo is not easily available when cross-compiling. This may be tricky.

from go-keyring.

mikkeloscar avatar mikkeloscar commented on May 10, 2024

@torculus We have released version v0.2.0 with the update you can try!

from go-keyring.

mikkeloscar avatar mikkeloscar commented on May 10, 2024

@twpayne From where do you cross-compile? Does it not work to compile directly on the target?

We were able to add a CI step running in freebsd VM which works: #71 (I don't know too many details about *BSD so maybe it's different from what you mean?)

from go-keyring.

mikkeloscar avatar mikkeloscar commented on May 10, 2024

Thanks for the information.

I will close this issue as it seems like we have done what we could from go-keyring side and support FreeBSD under the right conditions

from go-keyring.

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.