# Difficulties building a statically-linked agent.

**URL:** <https://community.netdata.cloud/t/difficulties-building-a-statically-linked-agent/4128>\
**Category:** Help\
**Tags:** agent\
**Created:** [May 4, 2023, 4:11pm UTC](https://community.netdata.cloud/t/difficulties-building-a-statically-linked-agent/4128 "2023-05-04T16:11:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewym](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/drewym/32/2803_2.png) [@drewym](https://community.netdata.cloud/u/drewym)\
**Post date:** [May 4, 2023, 4:11pm UTC](https://community.netdata.cloud/t/difficulties-building-a-statically-linked-agent/4128/1 "2023-05-04T16:11:55Z")

</div>

Hi all. New to Netdata and I’m running into something I can’t seem to get around. Curious if anybody has any pointers. My overall goal is to build a statically-linked binary of the agent that I can install on a tinycore linux vm/guest

## Problem/Question

I’ve got a buildhost with docker installed. I execute the build instructions and it fails with:

```auto
checking ACLK Next Generation can be built... no
configure: error: You have requested --with-cloud but ACLK can't be built. See reasons in lines above
 FAILED ''
 ABORTED Failed to configure Netdata sources. 
 ABORTED Netdata failed to build for an unknown reason. 
Build failed.[root@voidbuild netdata]# 

```

## Relevant docs you followed/actions you took to solve the issue

The static build directions located athttps://learn.netdata.cloud/docs/installation/installation-methods/static-binary-packages.

I also found this post which seems relevant in some manner, but I’m not positive.

> [@ACLK-NG Heads Up For Maintainers](https://community.netdata.cloud/t/aclk-ng-heads-up-for-maintainers/939):
>
> Hi, this post is meant as heads-up for package maintainers. As the Cloud connectivity component called ACLK has been disabled in most packages due to us bundling libraries we have been working on a new implementation of this component. The new implementation of ACLK relies only on JSON-C and OpenSSL (both as shared libs, not bundled). This should remove blockers preventing ACLK/Cloud functionality to find it’s way to 3rd party/distribution packages. Please be aware that even with the ACLK co…

## Environment/Browser/Agent’s version etc

Void Linux buildhost. Netdata agent v1.38.1 (also new to git, but I assume my ‘clone’ command grabbed the latest as I didn’t specify)

## What I expected to happen

I expected the build to finish and create a .run file I could copy to my tinycore guest and execute.

Any thoughts or pointers appreciated. Thx!

::AndyM::

---

<div class="post-metadata">

**Author:** ![Manolis\_Vasilakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/manolis_vasilakis/32/820_2.png) [@Manolis\_Vasilakis](https://community.netdata.cloud/u/Manolis_Vasilakis)\
**Post date:** [May 10, 2023, 6:22am UTC](https://community.netdata.cloud/t/difficulties-building-a-statically-linked-agent/4128/2 "2023-05-10T06:22:24Z")

</div>

Hi @drewym !

A couple of questions, are you using our `packaging/makeself/build-static.sh` script to do it?

Also, since you mentioned that you cloned the repository, then after the clone, have you done a `git submodule update --init --recursive` ? This is required to fetch and build some dependencies, like e.g. protobuf which is required for ACLK.

If you continue having issues, please post the whole part of the configure output.

Thank you!

---

<div class="post-metadata">

**Author:** ![drewym](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/drewym/32/2803_2.png) [@drewym](https://community.netdata.cloud/u/drewym)\
**Post date:** [May 11, 2023, 4:46am UTC](https://community.netdata.cloud/t/difficulties-building-a-statically-linked-agent/4128/3 "2023-05-11T04:46:50Z")

</div>

Hi Manolis. Thank you for the response. I thought I closed this thread off, but I guess not. Yes, I’m using the provided build-static.sh script.

It also turns out I’m a noob with git. 😉_Once I ran the ‘submodule’ command to git that you mentioned in your response above the deps installed everyting built just fine._

I’m onto a different issue getting the agent to install, but this is something funky in the tinycore distro. Using my manually built agent on voidlinux it runs just fine. I’m still triaging this issue and I’ll open a new thread here when I get further. Thx again! 😄

---

<div class="post-metadata">

**Author:** ![Manolis\_Vasilakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/manolis_vasilakis/32/820_2.png) [@Manolis\_Vasilakis](https://community.netdata.cloud/u/Manolis_Vasilakis)\
**Post date:** [May 11, 2023, 11:24am UTC](https://community.netdata.cloud/t/difficulties-building-a-statically-linked-agent/4128/4 "2023-05-11T11:24:41Z")

</div>

No problem, glad it helped! Indeed, do let us know if you need any more help!

---

<div class="post-metadata">

**Author:** ![jiangxiaobai](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/jiangxiaobai/32/3772_2.png) [@jiangxiaobai](https://community.netdata.cloud/u/jiangxiaobai)\
**Post date:** [July 9, 2024, 7:27am UTC](https://community.netdata.cloud/t/difficulties-building-a-statically-linked-agent/4128/5 "2024-07-09T07:27:41Z")

</div>

> [@Manolis\_Vasilakis](#):
>
> git submodule update --init --recursive

The source package ([https://github.com/netdata/netdata/archive/refs/tags/v1.46.1.tar.gz](https://github.com/netdata/netdata/archive/refs/tags/v1.46.1.tar.gz)) that I downloaded directly also reported a similar error when compiling, but it can’t be done (git submodule update --init --recursive), how to solve it?
