Building ZincObserve from Source Documentation

TLDR SteveLauC encountered build issues and raised the need for documentation. Hengfei and Ashish provided guidance and agreed to add more details to the `CONTRIBUTING.md`.

Photo of SteveLauC
SteveLauC
Wed, 12 Apr 2023 03:22:19 UTC

Do we have documents on how to build zincobserve from source? I have `protoc` installed and still can not build it with the following error message: ``` Compiling zincobserve v0.1.0 (/home/steve/Documents/workspace/zincobserve) error: failed to run custom build command for `zincobserve v0.1.0 (/home/steve/Documents/workspace/zincobserve)` note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation. Caused by: process didn't exit successfully: `/home/steve/Documents/workspace/zincobserve/target/debug/build/zincobserve-4572835c3aec3700/build-script-build` (exit status: 1) --- stdout cargo:rerun-if-changed=proto/cluster/common.proto cargo:rerun-if-changed=proto/cluster/event.proto cargo:rerun-if-changed=proto/cluster/search.proto cargo:rerun-if-changed=proto --- stderr Error: Custom { kind: Other, error: "protoc failed: google/protobuf/descriptor.proto: File not found.\ngogoproto/gogo.proto:32:1: Import \"google/protobuf/descriptor.proto\" was not found or had errors.\ngogoproto/gogo.proto:38:8: \"google.protobuf.EnumOptions\" is not defined.\ngogoproto/gogo.proto: \"google.protobuf.EnumOptions\" is not defined ...```

Photo of Hengfei
Hengfei
Wed, 12 Apr 2023 03:25:18 UTC

Photo of Hengfei
Hengfei
Wed, 12 Apr 2023 03:25:32 UTC

You can checkout our release script how to install protoc.

Photo of SteveLauC
SteveLauC
Wed, 12 Apr 2023 03:37:10 UTC

Thanks for the quick response, I installed `protoc` from my packager manager, which unfortunately does not include those files under `include/google/protobuf` :melting_face:

Photo of Hengfei
Hengfei
Wed, 12 Apr 2023 03:42:18 UTC

and, before build rust, you need build UI first: ```cd web npm install npm run build```

Photo of Ashish
Ashish
Wed, 12 Apr 2023 03:55:08 UTC

Photo of SteveLauC
SteveLauC
Wed, 12 Apr 2023 05:56:07 UTC

It seems that the instructions on how to install `protoc` and its `include` files are missing in that `CONTRIBUTING.md`, perhaps we should add it under the section `Time to build the rust application now` ?

Photo of Ashish
Ashish
Wed, 12 Apr 2023 05:58:35 UTC

sure

Photo of SteveLauC
SteveLauC
Wed, 12 Apr 2023 06:01:20 UTC

Alright, let't me file a PR for this