# Version 6.0.0 when building from scratch

**URL:** <https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253>\
**Category:** Beats\
**Created:** [January 11, 2017, 4:55pm UTC](https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253 "2017-01-11T16:55:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoidberg8e](https://avatars.discourse-cdn.com/v4/letter/z/a698b9/32.png) [@zoidberg8e](https://discuss.elastic.co/u/zoidberg8e)\
**Post date:** [January 11, 2017, 4:55pm UTC](https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253/1 "2017-01-11T16:55:52Z")

</div>

Hi there,

I just checked out the 5.1 branch of beats, and built filebeat there.  
The filebeat.template.json clearly says it is version 5.1.1, but filebeat, when started with the -version flag always says it is version 6.0.0

> ./filebeat -version  
> filebeat version 6.0.0-alpha1 (amd64), libbeat 6.0.0-alpha1

i really don't want to use prebuilt binaries, but if I do on my testing system the filebeat tells me its version 5.1.1 as it should be.

> ./filebeat -version  
> filebeat version 5.1.1 (amd64), libbeat 5.1.1

what am I doing wrong?

Thank you

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [January 12, 2017, 1:55pm UTC](https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253/2 "2017-01-12T13:55:03Z")

</div>

What is the commit id you are on? If you checked out the 5.2 branch I would expect it to show `5.1.2`. Just quickly tested it locally and it seems to work. How did you build the binary?

---

<div class="post-metadata">

**Author:** ![zoidberg8e](https://avatars.discourse-cdn.com/v4/letter/z/a698b9/32.png) [@zoidberg8e](https://discuss.elastic.co/u/zoidberg8e)\
**Post date:** [January 12, 2017, 2:16pm UTC](https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253/3 "2017-01-12T14:16:44Z")

</div>

Hi there,  
I got the 5.1 branch via

> git archive --format=tar --prefix=beats-5.1/ origin/5.1 | gzip \>beats-5.1.tar.gz

I built the binary by running the makefile in filebeat, and before that I ran go get for all dependencies of filebeat in the beats folder.

Is there any documentation howto just build the binary, I don't want it to get packaged, as I am doing this myself.

Also there is a

> ## Building Beats from the Source

section in the readme which isn't telling anything, but to look into the contributing which doesn't contain any information how to build from source.

Thank you

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [January 12, 2017, 2:23pm UTC](https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253/4 "2017-01-12T14:23:07Z")

</div>

Hm, I think with the above you get a mix of master libbeat and 5.1 version of filebeat. The following should work:

```auto
go get github.com/elastic/beats
cd $GOPATH/src/github.com/elastic/beats/filebeat
git checkout 5.1
make

```

---

<div class="post-metadata">

**Author:** ![zoidberg8e](https://avatars.discourse-cdn.com/v4/letter/z/a698b9/32.png) [@zoidberg8e](https://discuss.elastic.co/u/zoidberg8e)\
**Post date:** [January 12, 2017, 2:42pm UTC](https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253/5 "2017-01-12T14:42:17Z")

</div>

Ah, because I "go got" the libbeat in Master?

this helped a lot Thank you.

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [January 16, 2017, 2:27pm UTC](https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253/6 "2017-01-16T14:27:24Z")

</div>

yes. go get fetches master.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 1, 2017, 4:56pm UTC](https://discuss.elastic.co/t/version-6-0-0-when-building-from-scratch/71253/7 "2017-02-01T16:56:22Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
