GithubHelp home page GithubHelp logo

Comments (10)

ludwigmuench avatar ludwigmuench commented on June 12, 2024 17

For anyone getting errors with VS Code on macOS:

add the following line to settings.json and restart the editor:

"go.toolsEnvVars": {"GOOS" : "linux"},

from containers-from-scratch.

lizrice avatar lizrice commented on June 12, 2024 12

Sorry, I don't know how I missed this. You need to build with GOOS=linux. I should add that to the README

from containers-from-scratch.

derekbassett avatar derekbassett commented on June 12, 2024 11

@Lucier2603 If you put // +build linux before the package main
like so:

// +build linux

package main

GoLand will stop reporting the error.
Given that this must be built in Linux anyway it really doesn't matter.

from containers-from-scratch.

Lucier2603 avatar Lucier2603 commented on June 12, 2024

I work on Mac with GoLand. And set GOOS=linux. But still got this error. Is there somewhere else I have to set?

from containers-from-scratch.

lizrice avatar lizrice commented on June 12, 2024

I'm afraid I'm not familiar with GoLand, but you should have these defined OK in the Linux version of syscall. What version of Go are you using?

from containers-from-scratch.

Lucier2603 avatar Lucier2603 commented on June 12, 2024

I use Go 1.9. It works fine in Linux.
I guess it is mac that causes the error? Mac OS does not support those sys flags although I set GOOS=Linux.

from containers-from-scratch.

jimenezfer avatar jimenezfer commented on June 12, 2024

Anyone has any clue on how to get the flags set for mac OS?

from containers-from-scratch.

lizrice avatar lizrice commented on June 12, 2024

@jebuscraisp if you look at the comments for SysProcAttr you'll see that CloneFlags (and some other fields) are only supported on Linux. To try this on a Mac or Windows machine, you can run Linux in a Virtual Machine.

from containers-from-scratch.

neerajjain92 avatar neerajjain92 commented on June 12, 2024

@ludwigmuench Doesn't work on mac

from containers-from-scratch.

m1n9o avatar m1n9o commented on June 12, 2024

If you use IDEA, go to Languages & Frameworks->Go->Build Tags Vendoring to set OS as linux.

from containers-from-scratch.

Related Issues (10)

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.