# Making Mender client binary file

**URL:** <https://hub.mender.io/t/making-mender-client-binary-file/559>\
**Category:** General Discussions\
**Created:** [May 14, 2019, 7:36am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559 "2019-05-14T07:36:20Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 7:36am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/1 "2019-05-14T07:36:20Z")

</div>

when i execute this command go get [github.com/mendersoftware/mender](http://github.com/mendersoftware/mender) am getting terminated pls help me pls find image

 ![Screenshot%20from%202019-05-14%2013-02-35](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/99643f638ed1a1747042c8cd211922efacfe236b.png)

---

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [May 14, 2019, 7:50am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/2 "2019-05-14T07:50:23Z")

</div>

Please update the mender sources. This issue got fixed in the latest branch as mentioned [here](https://hub.mender.io/t/how-to-test-mender-2-0-0-in-existing-sumo/499/8)

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 14, 2019, 8:02am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/3 "2019-05-14T08:02:37Z")

</div>

Hi @gpram,

As you are installing from source, see requirements in README file: [https://github.com/mendersoftware/mender#requirements](https://github.com/mendersoftware/mender#requirements)

If you are using a Debian based distribution, you need to install `liblzma-dev` package. You can also opt-out the dependency as it is explained in the README to not depend on such package.

---

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 9:50am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/4 "2019-05-14T09:50:25Z")

</div>

when am execute this command  
go get [github.com/mendersoftware/mender](http://github.com/mendersoftware/mender)  
still am getting error some differenet… pls check image attachement

 ![Screenshot%20from%202019-05-14%2015-20-01](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/9c6b1d55a790b5a4ba815256e81c84d06e7d8d2d.png)

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 14, 2019, 10:22am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/5 "2019-05-14T10:22:19Z")

</div>

Hello,

Please use text logs and avoid pictures when possible.

It seems like you are executing `github.com/mendersoftware/mender`, which should be a directory. I don’t know what is happening, I think there must be something strange in your golang setup.

Try with the following commands and post here the output.

```auto
go get -d github.com/mendersoftware/mender
cd ~/go/src/github.com/mendersoftware/mender/
make
./mender

```

**Note:** if you have a set GOPATH, then cd into `$GOPATH/src/github.com/mendersoftware/mender/` instead.

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 14, 2019, 10:26am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/6 "2019-05-14T10:26:58Z")

</div>

Okay, I think I know your output! The “#” symbols there are from the `go get` output, not your prompt as I originally thought.

Anyway, please try with `make` and copy us the logs.

---

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 10:27am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/7 "2019-05-14T10:27:29Z")

</div>

thank u but when execute make command am getting error see bellow

```auto
go build -ldflags "-X main.Version=1.7.1"  
go build: when using gccgo toolchain, please pass linker flags using -gccgoflags, not -ldflags
# github.com/mendersoftware/mender/vendor/github.com/bmatsuo/lmdb-go/lmdb
mdb.c: In function ‘mdb_cursor_put’:
mdb.c:6535:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
      if (SIZELEFT(fp) < offset) {
         ^
mdb.c:6540:5: note: here
     case MDB_CURRENT:
     ^~~~
# github.com/mendersoftware/mender
/usr/bin/ld: $WORK/b001/_pkg1_.a(_x011.o): undefined reference to symbol 'pthread_mutexattr_setrobust@@GLIBC_2.12'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:37: recipe for target 'build' failed
make: *** [build] Error 2

```

Edit: @mirzak: prettify code

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 14, 2019, 11:07am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/8 "2019-05-14T11:07:09Z")

</div>

The `gccgoflags` warning is very suspicious. Which version of GO are you using?

Post the output of `go version` and `go env`.

---

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 11:11am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/9 "2019-05-14T11:11:47Z")

</div>

go version go1.10.3 gccgo (Ubuntu 8.3.0-6ubuntu1~18.04) 8.3.0 linux/amd64

---

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 11:12am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/10 "2019-05-14T11:12:52Z")

</div>

```auto
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/pram/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/pram/go"
GORACE=""
GOROOT="/usr"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/gcc/x86_64-linux-gnu/8"
GCCGO="/usr/bin/x86_64-linux-gnu-gccgo-8"
CC="x86_64-linux-gnu-gcc-8"
CXX="x86_64-linux-gnu-g++-8"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build832412992=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

```

Edit: @mirzak: prettify output

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 14, 2019, 11:36am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/11 "2019-05-14T11:36:31Z")

</div>

Hi,

Okey, I was finally able to reproduce your problem 🙂 So I don’t know exactly why the linker is failing, there must be something missing in the flags. But I can see that you are using `gcc-go` compiler instead of the most common `gc`. Any special reason for it?

If you don’t have a good reason, change to the standard compiler and your problem will be gone.

If using Ubuntu:

```auto
apt remove gccgo gccgo-go
apt autoremove
apt install golang

```

Lluís

---

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 11:58am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/12 "2019-05-14T11:58:47Z")

</div>

thank you bro your rocking…thank u so much i removed gccgo and gccgo-go  
then i installed golang …its working now tthank you

---

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 11:59am UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/13 "2019-05-14T11:59:42Z")

</div>

After compilation has finished, the Mender binary is located at where …  
may i know where i have to find Mender binary file

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 14, 2019, 12:02pm UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/14 "2019-05-14T12:02:09Z")

</div>

If you used the first approach (go get…), the mender binary will be in `~/go/bin/`

If you used the second approach (go get -d … + cd… + make), the binary will be in `~/go/src/github.com/mendersoftware/mender/`

---

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 12:05pm UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/15 "2019-05-14T12:05:21Z")

</div>

i found out mender file in /go/src/github.com/mendersoftware/mender

is it mender file is binary file ?

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 14, 2019, 12:07pm UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/16 "2019-05-14T12:07:05Z")

</div>

That is correct!

---

<div class="post-metadata">

**Author:** ![gpram](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gpram](https://hub.mender.io/u/gpram)\
**Post date:** [May 14, 2019, 12:07pm UTC](https://hub.mender.io/t/making-mender-client-binary-file/559/17 "2019-05-14T12:07:59Z")

</div>

ok thank you for supporting me … keep in touch bro …
