# Make command fails when trying to compile new metricset in metricbeat

**URL:** <https://discuss.elastic.co/t/make-command-fails-when-trying-to-compile-new-metricset-in-metricbeat/223418>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [March 12, 2020, 9:51pm UTC](https://discuss.elastic.co/t/make-command-fails-when-trying-to-compile-new-metricset-in-metricbeat/223418 "2020-03-12T21:51:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Carmel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_carmel/32/64365_2.png) [@Daniel\_Carmel](https://discuss.elastic.co/u/Daniel_Carmel)\
**Post date:** [March 12, 2020, 9:51pm UTC](https://discuss.elastic.co/t/make-command-fails-when-trying-to-compile-new-metricset-in-metricbeat/223418/1 "2020-03-12T21:51:20Z")

</div>

I installed all the dependencies for creating new metricset with metricbeat(include Bison\Yacc).  
After running the "Make create-metricset" and "Make collect" successfully I tried to compile the beat with the "Make" command but it fails with the following errors:

`y.tab.c:2405:7: warning: implicit declaration of function ‘yyerror’; did you mean ‘yyerrok’? [-Wimplicit-function-declaration] ../vendor/github.com/yuin/gopher-lua/parse/parser.go.y: At top level: ../vendor/github.com/yuin/gopher-lua/parse/parser.go.y:516:1: error: unknown type name ‘func’ func TokenName(c int) string { ^~~~../vendor/github.com/yuin/gopher-lua/parse/parser.go.y:516:16: error: unknown type name ‘c’ func TokenName(c int) string { ^ <builtin>: recipe for target '../vendor/github.com/yuin/gopher-lua/parse/parser.go.o' failed make: *** [../vendor/github.com/yuin/gopher-lua/parse/parser.go.o] Error 1 rm ../vendor/github.com/yuin/gopher-lua/parse/parser.go.c`

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [March 13, 2020, 8:23am UTC](https://discuss.elastic.co/t/make-command-fails-when-trying-to-compile-new-metricset-in-metricbeat/223418/2 "2020-03-13T08:23:39Z")

</div>

Can you try to run "make update-yacc-vendor"?

---

<div class="post-metadata">

**Author:** ![Daniel\_Carmel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_carmel/32/64365_2.png) [@Daniel\_Carmel](https://discuss.elastic.co/u/Daniel_Carmel)\
**Post date:** [March 13, 2020, 8:49pm UTC](https://discuss.elastic.co/t/make-command-fails-when-trying-to-compile-new-metricset-in-metricbeat/223418/3 "2020-03-13T20:49:29Z")

</div>

Thank you! It did the work and fixed my problem!

---

<div class="post-metadata">

**Author:** ![Michael\_Madden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_madden/32/46640_2.png) [@Michael\_Madden](https://discuss.elastic.co/u/Michael_Madden)\
**Post date:** [March 14, 2020, 2:08am UTC](https://discuss.elastic.co/t/make-command-fails-when-trying-to-compile-new-metricset-in-metricbeat/223418/4 "2020-03-14T02:08:08Z")

</div>

Is this a new issue @mtojek? I was trying to build filebeat from the `master` branch, and I hit the same issue. I don't recall running into this issue in the past.

---

<div class="post-metadata">

**Author:** ![Daniel\_Carmel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_carmel/32/64365_2.png) [@Daniel\_Carmel](https://discuss.elastic.co/u/Daniel_Carmel)\
**Post date:** [March 14, 2020, 2:22am UTC](https://discuss.elastic.co/t/make-command-fails-when-trying-to-compile-new-metricset-in-metricbeat/223418/5 "2020-03-14T02:22:52Z")

</div>

I have to mention that I had to install yacc/bison manually before I ran the "make" command

---

<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:** [April 11, 2020, 2:31am UTC](https://discuss.elastic.co/t/make-command-fails-when-trying-to-compile-new-metricset-in-metricbeat/223418/6 "2020-04-11T02:31:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
