Updating OpenSSL 1.1.0f to 1.1.1 from source, missing header error

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
SirSkorpan
Posts: 3
Joined: Sun Oct 07, 2018 1:13 pm

Updating OpenSSL 1.1.0f to 1.1.1 from source, missing header error

Post by SirSkorpan »

I'm not sure if this is the place to ask, but I'll give it a shot.

I've installed DietPi on a Raspberry Pi 3B+, to use as a web- and nextcloud server. I'd like to use HTTPS/SSL and wanted to update to the latest version of OpenSSL, the raspian repository doesn't seem to have a later version than 1.1.0f and the latest LTS version is 1.1.1, released last month.

Here is what I did:

Code: Select all

apt install make
apt install gcc
apt install ssllib-dev
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz
tar -xvzf openssl-1.1.1.tar.gz
cd openssl-1.1.1/
./config --prefix=/usr
make
And this is the output I get:
make depend && make _all
make[1]: Entering directory '/root/openssl-1.1.1'
make[1]: Leaving directory '/root/openssl-1.1.1'
make[1]: Entering directory '/root/openssl-1.1.1'
gcc -I. -Iinclude -fPIC -pthread -march=armv7-a -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/ssl\"" -DENGINESDIR="\"/usr//lib/engines-1.1\"" -DNDEBUG -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c
In file included from /usr/lib/gcc/arm-linux-gnueabihf/6/include-fixed/syslimits.h:7:0,
from /usr/lib/gcc/arm-linux-gnueabihf/6/include-fixed/limits.h:34,
from ./e_os.h:13,
from apps/apps.h:13,
from apps/app_rand.c:10:
/usr/lib/gcc/arm-linux-gnueabihf/6/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
#include_next <limits.h> /* recurse down to the real one */
^
compilation terminated.
Makefile:728: recipe for target 'apps/app_rand.o' failed
make[1]: *** [apps/app_rand.o] Error 1
make[1]: Leaving directory '/root/openssl-1.1.1'
Makefile:171: recipe for target 'all' failed
make: *** [all] Error 2
So I understand that I'm missing `limits.h` (or at least a path to it). I'm not very at home with compiling software from source so I'm a bit at a loss here. Which `limits.h` am I missing? Is there some other package I need to install or can I create a link to is in some lib directory?
Last edited by SirSkorpan on Sun Oct 07, 2018 2:38 pm, edited 1 time in total.
SirSkorpan
Posts: 3
Joined: Sun Oct 07, 2018 1:13 pm

Re: Updating OpenSSL 1.1.0f to 1.1.1 from source, missing header error

Post by SirSkorpan »

Seems I was missing some build tools for gcc, running:

Code: Select all

 apt install build-essential -y 
helped with that. Then running:

Code: Select all

make
make install
went without errors. However I encountered:
openssl: /usr/lib/arm-linux-gnueabihf/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)
openssl: /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)
Not sure where I get these libraries from, any suggestions?
Post Reply