Coder Social home page Coder Social logo

Cannot compile on Mac OS about sysinfo HOT 5 CLOSED

zcalusic avatar zcalusic commented on August 23, 2024
Cannot compile on Mac OS

from sysinfo.

Comments (5)

zcalusic avatar zcalusic commented on August 23, 2024 1

Thanks @Itxaka for your contributions. Since commit 6782e1f, and thanks to your other contribution in 812ca38 GitHub CI reveals that we now happily compile and run on Mac OS, too. Even some info there, considering this is essentially Linux specific library, I guess not too bad. 😄

{
  "sysinfo": {
    "version": "1.0.0",
    "timestamp": "2023-05-28T17:09:21.898824Z"
  },
  "node": {
    "machineid": "02041e1addf614c549e2b33c64738ac1",
    "hypervisor": "vmware"
  },
  "os": {},
  "kernel": {},
  "product": {},
  "board": {},
  "chassis": {},
  "bios": {},
  "cpu": {
    "threads": 3
  },
  "memory": {}
}

So, I'll close this issue now.

from sysinfo.

zcalusic avatar zcalusic commented on August 23, 2024

Hello @MihaiBojin.

I get where you're going. Even if the library is basically useless on Mac OS, you'd like it to at least compile, so that you can use the same code on multiple platform. Am I right?

Now, even if I would be willing to add some build constraints to help that specific case, the trouble is I don't have access to any Mac OS machine. So, I wouldn't be able to test the changes. Meaning, you or somebody else would need to step in and do the grunt work.

In the meantime, you could do that even in your project, basically having sysinfo_linux.go, and sysinfo_other.go, persuading Go compiler to compile sysinfo_linux on Linux, and sysinfo_other on any other sysinfo unsupported architecture. Then make a real call to GetSysInfo() in the Linux version, and just return nil in the other version. Basically, the same idea, just implemented in your project, where you really need it.

from sysinfo.

MihaiBojin avatar MihaiBojin commented on August 23, 2024

Hi, yes you are correct.

Yup, I can help with testing on a mac.

from sysinfo.

utdrmac avatar utdrmac commented on August 23, 2024

Came here to post on this. Would be nice if the library just compiled on mac to make app writing easier, even if there isn't any mac info to show.

from sysinfo.

Itxaka avatar Itxaka commented on August 23, 2024

Should now compile on Macos 😀

from sysinfo.

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.