I have managed to build file beat and base modules from source found at https://github.com/elastic/beats . When I try to build the modules in beats/x-pack/filebeat I receive the following error with build launched at src/github.com/elastic/beats/x-pack/filebeat
mage build
>> build: Building filebeat
../libbeat/cmd/inject.go:17:2: build constraints exclude all Go files in /root/go/src/github.com/elastic/beats/x-pack/libbeat/processors/add_cloudfoundry_metadata
Error: running "go build -o filebeat -ldflags -s -X github.com/elastic/beats/v7/libbeat/version.buildTime=2020-04-01T21:26:46Z -X github.com/elastic/beats/v7/libbeat/version.commit=0ef472268ea41881f81accabe2af6cfb72eef682" failed with exit code 1
I have little experience with Go and so am lost as far as troubleshooting this goes. The one things that I notice is the reference to the github.com/elastic/beats/v7 which does not exists in the source tree.
Hi Chris thanks for your reply. I am on freebsd 11.3 which could be a difference. Is there a solid set of instructions for setting up the build environment? I feel like I may just be missing something simple that's killing me.
@blaker Thanks for the tip, but neither of those files exist in my source tree. In fact there is no blob folder at all. find /root/go/src/ -name blob returns nothing and the metadata files are not in the path you proposed. Did I miss a step in generating?
@blaker Ah strange it was showing as failing when I posted. And yes removing that line has fixed the build. Thanks so much for your help I thought I was going crazy or just missing something very simple!
@Mike_Waremage build in the directory should produce an output in build/. From there you can just use the binary, can move it to /usr/local/bin if you would like.
I have a fix going in to remove those lines so you do not need the modifications.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.