Giter Site home page Giter Site logo

Comments (2)

deniszh avatar deniszh commented on May 28, 2024
  1. Install make and golang on mac, e.g. with manual on https://go.dev/doc/install
  2. cd to project directory and run
make clean && make

It will print you a build command, like

go build -mod vendor --ldflags '-X main.BuildVersion=v0.17.3-7-g1159' github.com/go-graphite/go-carbon

and produce go-carbon binary in current directory.

$ file go-carbon
go-carbon: Mach-O 64-bit executable arm64
  1. Remove go-carbon binary and prepend go command above with flags to build linux binary (GOOS=linux GOARCH=amd64) instead:
GOOS=linux GOARCH=amd64 go build -mod vendor --ldflags '-X main.BuildVersion=v0.17.3-7-g1159' github.com/go-graphite/go-carbon

Now you have linux binary instead:

$ file go-carbon
go-carbon: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=... with debug_info, not stripped

from go-carbon.

interfan7 avatar interfan7 commented on May 28, 2024

@deniszh
I think the explenation just couldn't be any better!! 👏🏻🙏🏻

from go-carbon.

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.