# Compile fails on ubuntu 18.04

**URL:** <https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180>\
**Category:** Installation\
**Created:** [December 7, 2018, 8:12pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180 "2018-12-07T20:12:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmordkof](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jmordkof](https://dmap-community.ductus.global/u/jmordkof)\
**Post date:** [December 7, 2018, 8:12pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/1 "2018-12-07T20:12:45Z")

</div>

We have been using confd on Ubuntu 16.04 for a while. On Ubuntu 18.04 I get this error:

```
gcc -DHAVE_DYNAMIC_CRYPTO_LIB -g -I. -Wall -fpic -O2 -c crypto.c
crypto.c:110:10: fatal error: openssl/chacha.h: No such file or directory
#include 
^ ~~~~~~~~~~~~~~~~~
compilation terminated.
../src/include.mk:49: recipe for target 'crypto.o' failed
```

libssl-dev is installed, but apparently chacha.h has been removed. Has anyone compiled it for Ubuntu 18.04 using openssl 1.1?

---

<div class="post-metadata">

**Author:** ![jmordkof](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jmordkof](https://dmap-community.ductus.global/u/jmordkof)\
**Post date:** [December 7, 2018, 8:14pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/2 "2018-12-07T20:14:49Z")

</div>

similar issue – url munged to get around the “new users can only post 2 links” error from the web site ☹

https :// [github.com/asdf-vm/asdf/issues/195#issuecomment-301354356](http://github.com/asdf-vm/asdf/issues/195#issuecomment-301354356)

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [December 7, 2018, 8:52pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/3 "2018-12-07T20:52:35Z")

</div>

On Ubuntu 18.04 try:  
`apt-get update && apt-get install -y libssl-dev libssl1.0.0`

Getting just the libssl-dev package does not work with Ubuntu anymore since the 1.0.0 version is not shipped with that package nowadays. Only the 1.1 version is included. Hence you need to add the libssl1.0.0 package too.

---

<div class="post-metadata">

**Author:** ![per](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@per](https://dmap-community.ductus.global/u/per)\
**Post date:** [December 8, 2018, 12:23pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/4 "2018-12-08T12:23:04Z")

</div>

Well, you can definitely use OpenSSL up to and including version 1.0.2 with current ConfD releases, which enables a few additional cipher suites for SSL/TLS compared to 1.0.0. However OpenSSL-1.1.x has many non-backward-compatible API changes from 1.0.x, and thus cannot be used by the Erlang/OTP version (18 - predates OpenSSL-1.1.0) that is included in current ConfD. At some point ConfD will of course start shipping with a newer version of Erlang/OTP, that _does_ support the use of OpenSSL-1.1.x.

---

<div class="post-metadata">

**Author:** ![jmordkof](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jmordkof](https://dmap-community.ductus.global/u/jmordkof)\
**Post date:** [December 13, 2018, 9:26pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/5 "2018-12-13T21:26:26Z")

</div>

Thanks. That worked.

---

<div class="post-metadata">

**Author:** ![jmordkof](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jmordkof](https://dmap-community.ductus.global/u/jmordkof)\
**Post date:** [December 27, 2018, 8:14pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/6 "2018-12-27T20:14:34Z")

</div>

Well, it kind of works. Now the rest of the build is borked because (for instance) python3 xmlsec needs package xmlsec1 which needs libssl-dev 1.1

I understand that I can have both libraries at runtime, but now I need two development environments … one for confd and one for everything else. Not a big deal for CI, but a real pain for developers.

How do I go about making an official request that they upgrade to 1.1 ?

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [December 27, 2018, 9:43pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/7 "2018-12-27T21:43:51Z")

</div>

As far as I am know if you on Ubuntu 18.04 run:  
`apt-get update && apt-get install -y libssl-dev libssl1.0.0`  
libssl-dev will install openssl 1.1.0g for you while libssl1.0.0 will install openssl 1.0.2n.  
Hence you will then have both 1.1 and 1.0 installed and everyone should be happy.

For an official request of a feature, if you have ConfD Premium, you make feature requests through your Tail-f support account.

---

<div class="post-metadata">

**Author:** ![jmordkof](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jmordkof](https://dmap-community.ductus.global/u/jmordkof)\
**Post date:** [December 28, 2018, 1:23am UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/8 "2018-12-28T01:23:44Z")

</div>

no, I need libssl1.0-dev to compile confd. otherwise I get

```
crypto.c:110:10: fatal error: openssl/chacha.h: No such file or directory
 #include <openssl/chacha.h>
          ^ ~~~~~~~~~~~~~~~~~
compilation terminated.
../src/include.mk:49: recipe for target 'crypto.o' failed
make[8]: *** [crypto.o] Error 1
```

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [December 28, 2018, 8:50am UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/9 "2018-12-28T08:50:48Z")

</div>

There should be no need to rebuild crypto.so or libconfd.so / libconfd.a after installing the “libssl1.0.0” package.

---

<div class="post-metadata">

**Author:** ![jmordkof](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jmordkof](https://dmap-community.ductus.global/u/jmordkof)\
**Post date:** [December 31, 2018, 5:17pm UTC](https://dmap-community.ductus.global/t/compile-fails-on-ubuntu-18-04/2180/10 "2018-12-31T17:17:07Z")

</div>

thank you, thank you. I had no idea that the crypto module was optional. I guess at some point we needed it, so it was coded in our CMake files. Sorry I was so slow figuring this out.
