# Ic-replica compile multiple definition of ZSTD\_\* error

**URL:** <https://forum.dfinity.org/t/ic-replica-compile-multiple-definition-of-zstd-error/4613>\
**Category:** Getting Started\
**Tags:** Functional-Programming\
**Created:** [June 1, 2021, 11:21am UTC](https://forum.dfinity.org/t/ic-replica-compile-multiple-definition-of-zstd-error/4613 "2021-06-01T11:21:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lyswifter](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lyswifter/32/3706_2.png) [@lyswifter](https://forum.dfinity.org/u/lyswifter)\
**Post date:** [June 1, 2021, 11:21am UTC](https://forum.dfinity.org/t/ic-replica-compile-multiple-definition-of-zstd-error/4613/1 "2021-06-01T11:21:16Z")

</div>

When I compile ic-replica from “cargo build -p ic-replica”, everything goes well,but links error appeared finally, it said "multiple definition of `ZSTD_xxxx`", same like multi reference to the same library function.

os platform: Ubuntu 18.04  
cargo version: cargo 1.52.0 (69767412a 2021-04-21)  
compile method: no usage of Dock, just `cargo build -p ic-replica`

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/f/fd6b82dcb7eef9a45714b4a18699ac334e71ed00.png)

error I encountered:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/f/feb1e545f9be3c1857058536dc8eb15064ed770b.png)

I tried many ways and have no idea about this situation, can you give me some idea?

---

<div class="post-metadata">

**Author:** ![lyswifter](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lyswifter/32/3706_2.png) [@lyswifter](https://forum.dfinity.org/u/lyswifter)\
**Post date:** [June 1, 2021, 11:54am UTC](https://forum.dfinity.org/t/ic-replica-compile-multiple-definition-of-zstd-error/4613/2 "2021-06-01T11:54:41Z")

</div>

Seems the ic project(at least the main branch) has long time no update? what’s the matter,guys?

---

<div class="post-metadata">

**Author:** ![nomeata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nomeata/32/733_2.png) [@nomeata](https://forum.dfinity.org/u/nomeata)\
**Post date:** [June 1, 2021, 3:16pm UTC](https://forum.dfinity.org/t/ic-replica-compile-multiple-definition-of-zstd-error/4613/3 "2021-06-01T15:16:44Z")

</div>

The `dfinity/ic` repository isn’t really “the project”, as the development happens in a private repository. The code should be pushed to `dfinity/ic` whenever the deployed code changes – so don’t worry if `dfinity/ic` doesn’t show much activity.

---

<div class="post-metadata">

**Author:** ![PaulLiu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/paulliu/32/4701_2.png) [@PaulLiu](https://forum.dfinity.org/u/PaulLiu)\
**Post date:** [June 1, 2021, 11:58pm UTC](https://forum.dfinity.org/t/ic-replica-compile-multiple-definition-of-zstd-error/4613/4 "2021-06-01T23:58:11Z")

</div>

Better use docker to compile since dependencies are pinned down in there and guaranteed to work. For example, I think the supported rust compiler version is 1.45.2. Newer versions may have problems.
