The officially official Devuan Forum!

You are not logged in.

#1 2025-10-01 07:43:09

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

[SOLVED] difficulty compiling openssl

I can't compile openssl despite having all the development libraries (build-essential libc6-dev linux-libc-dev). It just won't work. Compilation is always such a shitshow.

gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/home/drm/openssl-3.5.1/install/ssl\"" -DENGINESDIR="\"/home/drm/openssl-3.5.1/install/lib64/engines-3\"" -DMODULESDIR="\"/home/drm/openssl-3.5.1/install/lib64/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF apps/lib/libapps-lib-app_libctx.d.tmp -c -o apps/lib/libapps-lib-app_libctx.o apps/lib/app_libctx.c
In file included from include/limits.h:124,
                 from include/openssl/types.h:26,
                 from apps/include/app_libctx.h:13,
                 from apps/lib/app_libctx.c:9:
/usr/include/limits.h:124:26: error: no include path in which to search for limits.h
  124 | # include_next <limits.h>
      |                          ^
In file included from include/internal/common.h:14,
                 from apps/include/apps.h:13,
                 from apps/lib/app_libctx.c:10:
/usr/include/stdlib.h:98:8: error: unknown type name 'size_t'
   98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
      |        ^~~~~~
/usr/include/stdlib.h:57:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
   56 | #include <bits/floatn.h>
  +++ |+#include <stddef.h>
   57 | 
/usr/include/stdlib.h: In function 'atoi':
/usr/include/stdlib.h:364:42: error: 'NULL' undeclared (first use in this function)
  364 |   return (int) strtol (__nptr, (char **) NULL, 10);

I need openssl to compile nginx with the appropriate build options (support for http/3 and brotli... the second isn't included by default).
It's openssl 3.5.1.

Offline

#2 2025-10-01 10:11:39

RedGreen925
Member
Registered: 2024-12-07
Posts: 179  

Re: [SOLVED] difficulty compiling openssl

It's openssl 3.5.1.

Obviously not using excalibur as it has complied just fine there and is installed on my machine. Couple of options see if it will install from it onto your machine or upgrade to what will soon be the new stable, since trixie went stable in Debian the excalibur essentially is that with little in the way of changes being made in it. Only the normal security and proposed updates that are making their way into Debian's stable version coming through.

zeus@9600k:~$ apt-cache policy openssl
openssl:
  Installed: 3.5.1-1
  Candidate: 3.5.1-1
  Version table:
 *** 3.5.1-1 990
        990 http://gnlug.org/pub/devuan/merged excalibur/main amd64 Packages
        100 /var/lib/dpkg/status

Last edited by RedGreen925 (2025-10-01 10:12:32)

Offline

#3 2025-10-01 14:06:47

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

Installing the binary is no problem, what I need are the headers in order to compile nginx.
Here's the complete script

#!/bin/sh
wget https://www.openssl.org/source/openssl-3.5.1.tar.gz
tar xzf openssl-3.5.1.tar.gz
cd openssl-3.5.1
 ./config --prefix=/home/drm/openssl-3.5.1/install
make -j $(nproc)
sudo make install
cd ../
wget https://nginx.org/download/nginx-1.29.1.tar.gz
tar zxvf nginx-1.29.1.tar.gz
cd nginx-1.29.1
./configure \
  --prefix=/etc/nginx \
  --sbin-path=/usr/sbin/nginx \
  --conf-path=/etc/nginx/nginx.conf \
  --pid-path=/var/run/nginx.pid \
  --lock-path=/var/run/nginx.lock \
  --error-log-path=/var/log/nginx/error.log \
  --http-log-path=/var/log/nginx/access.log \
  --modules-path=/usr/lib/nginx/modules \
  --with-compat \
  --with-http_ssl_module \
  --with-http_v2_module \
  --with-http_v3_module \
  --with-http_addition_module \
  --with-http_random_index_module \
  --with-http_slice_module \
  --with-http_stub_status_module \
  --with-threads \
  --with-file-aio \
  --add-dynamic-module=../ngx_brotli \
  --with-openssl=../openssl-3.5.1 \
  --with-openssl-opt="enable-tls1_3 enable-quic" \
  --with-cc-opt="-I ../openssl-3.5.1/include" \
  --with-ld-opt="-L ../openssl-3.5.1/lib"
make -j $(nproc)
sudo make install

Last edited by evanescente~ondine (2025-10-01 14:52:35)

Offline

#4 2025-10-02 11:48:04

RedGreen925
Member
Registered: 2024-12-07
Posts: 179  

Re: [SOLVED] difficulty compiling openssl

Installing the binary is no problem, what I need are the headers in order to compile nginx.
Here's the complete script

Well the ssl compiled here on an excalibur system. Here is what it gives me when doing it skipping the actual installing of the nginx.

zeus@8400:~/src/openssl-3.5.1$ ./config --prefix=/home/zeus/src/openssl-3.5.1/install
Configuring OpenSSL version 3.5.1 for target linux-x86_64
Using os-specific seed configuration
Created configdata.pm
Running configdata.pm
Created Makefile.in
Created Makefile
Created include/openssl/configuration.h

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL.md file first)      ***
***                                                                ***
**********************************************************************

zeus@8400:~/src/openssl-3.5.1$ make -j $(nproc)
/usr/bin/perl util/mkinstallvars.pl PREFIX=. BINDIR=apps APPLINKDIR=ms LIBDIR= INCLUDEDIR=include "INCLUDEDIR=./include" ENGINESDIR=engines MODULESDIR=providers "VERSION=3.5.1" "LDLIBS=-ldl -pthread " > builddata.pm
/usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
/usr/bin/perl util/mkinstallvars.pl "PREFIX=/home/zeus/src/openssl-3.5.1/install" BINDIR=bin "LIBDIR=lib64" "libdir=/home/zeus/src/openssl-3.5.1/install/lib64" INCLUDEDIR=include APPLINKDIR=include/openssl "ENGINESDIR=/home/zeus/src/openssl-3.5.1/install/lib64/engines-3" "MODULESDIR=/home/zeus/src/openssl-3.5.1/install/lib64/ossl-modules" "PKGCONFIGDIR=/home/zeus/src/openssl-3.5.1/install/lib64/pkgconfig" "CMAKECONFIGDIR=/home/zeus/src/openssl-3.5.1/install/lib64/cmake/OpenSSL" "LDLIBS=-ldl -pthread " "VERSION=3.5.1" > installdata.pm
/usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
/usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
/usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/internal/param_names.h.in > include/internal/param_names.h
DEBUG: all keys: APPLINKDIR, BINDIR, CMAKECONFIGDIR, ENGINESDIR, INCLUDEDIR, LDLIBS, LIBDIR, MODULESDIR, PKGCONFIGDIR, PREFIX, VERSION, libdir
No value given for CMAKECONFIGDIR
No value given for PKGCONFIGDIR
No value given for libdir
DEBUG: PREFIX = . => PREFIX = /home/zeus/src/openssl-3.5.1
DEBUG: libdir = . => libdir = /home/zeus/src/openssl-3.5.1
DEBUG: BINDIR = apps => BINDIR = /home/zeus/src/openssl-3.5.1/apps, BINDIR_REL_PREFIX = apps
DEBUG: LIBDIR =  => LIBDIR = /home/zeus/src/openssl-3.5.1, LIBDIR_REL_PREFIX = 
DEBUG: INCLUDEDIR = [ include, ./include ] => INCLUDEDIR = [ /home/zeus/src/openssl-3.5.1/include, /home/zeus/src/openssl-3.5.1/include ], INCLUDEDIR_REL_PREFIX = [ include, ./include ]
DEBUG: APPLINKDIR = ms => APPLINKDIR = /home/zeus/src/openssl-3.5.1/ms, APPLINKDIR_REL_PREFIX = ms
snip...

rm -f test/tls13groupselection_test
rm -f test/tls13secretstest
${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L.   \
	-o test/tls13groupselection_test \
	test/helpers/tls13groupselection_test-bin-ssltestlib.o \
	test/tls13groupselection_test-bin-tls13groupselection_test.o \
	-lssl test/libtestutil.a -lcrypto -ldl -pthread 
${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L.   \
	-o test/tls13secretstest \
	crypto/tls13secretstest-bin-packet.o \
	crypto/tls13secretstest-bin-quic_vlint.o \
	ssl/tls13secretstest-bin-tls13_enc.o \
	test/tls13secretstest-bin-tls13secretstest.o \
	-lssl test/libtestutil.a -lcrypto -ldl -pthread 
rm -f test/uitest
${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L.   \
	-o test/uitest \
	apps/lib/uitest-bin-apps_ui.o test/uitest-bin-uitest.o \
	-lssl test/libtestutil.a -lcrypto -ldl -pthread 
make[1]: Leaving directory '/home/zeus/src/openssl-3.5.1'

zeus@8400:~/src/openssl-3.5.1$ sudo make install
[sudo] password for zeus: 
zeus is not in the sudoers file.
This incident has been reported to the administrator.

root@8400:~# cd /home/zeus/src/openssl-3.5.1/
root@8400:/home/zeus/src/openssl-3.5.1# make install
"make" depend && "make" _build_libs
make[1]: Entering directory '/home/zeus/src/openssl-3.5.1'
make[1]: Leaving directory '/home/zeus/src/openssl-3.5.1'
make[1]: Entering directory '/home/zeus/src/openssl-3.5.1'
make[1]: Nothing to be done for '_build_libs'.
make[1]: Leaving directory '/home/zeus/src/openssl-3.5.1'
created directory `/home/zeus/src/openssl-3.5.1/install'
created directory `/home/zeus/src/openssl-3.5.1/install/lib64'
*** Installing runtime libraries
install libcrypto.so.3 -> /home/zeus/src/openssl-3.5.1/install/lib64/libcrypto.so.3
install libssl.so.3 -> /home/zeus/src/openssl-3.5.1/install/lib64/libssl.so.3
*** Installing development files
created directory `/home/zeus/src/openssl-3.5.1/install/include'
created directory `/home/zeus/src/openssl-3.5.1/install/include/openssl'
snip...
install doc/html/man7/provider-signature.html -> /home/zeus/src/openssl-3.5.1/install/share/doc/openssl/html/man7/provider-signature.html
install doc/html/man7/provider-skeymgmt.html -> /home/zeus/src/openssl-3.5.1/install/share/doc/openssl/html/man7/provider-skeymgmt.html
install doc/html/man7/provider-storemgmt.html -> /home/zeus/src/openssl-3.5.1/install/share/doc/openssl/html/man7/provider-storemgmt.html
install doc/html/man7/provider.html -> /home/zeus/src/openssl-3.5.1/install/share/doc/openssl/html/man7/provider.html
install doc/html/man7/proxy-certificates.html -> /home/zeus/src/openssl-3.5.1/install/share/doc/openssl/html/man7/proxy-certificates.html
install doc/html/man7/x509.html -> /home/zeus/src/openssl-3.5.1/install/share/doc/openssl/html/man7/x509.html

Onto the nginx.

zeus@8400:~/src$ cd nginx-1.29.1/
zeus@8400:~/src/nginx-1.29.1$ ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --modules-path=/usr/lib/nginx/modules --with-compat --with-http_ssl_module --with-http_v3_module --with-http_addition_module --with-http_random_index_module --with-http_slice_module --with-http_stub_status_module --with-threads --with-file-aio --with-openssl=../openssl-3.5.1 --with-openssl-opt="enable-tls1_3 enable-quic" --with-cc-opt="-I ../openssl-3.5.1/include" --with-ld-opt="-L ../openssl-3.5.1/lib"
checking for OS
 + Linux 6.12.48+deb13-amd64 x86_64
checking for C compiler ... found
 + using GNU C compiler
snip....
checking for PCRE2 library ... not found
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found
checking for PCRE library in /opt/homebrew/ ... not found

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

There I went without the libpre as the libpcre3-dev does not exist.

zeus@8400:~/src/nginx-1.29.1$ ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --modules-path=/usr/lib/nginx/modules --with-compat --with-http_ssl_module --with-http_v3_module --with-http_addition_module --with-http_random_index_module --with-http_slice_module --with-http_stub_status_module --with-threads --with-file-aio --with-openssl=../openssl-3.5.1 --with-openssl-opt="enable-tls1_3 enable-quic" --with-cc-opt="-I ../openssl-3.5.1/include" --with-ld-opt="-L ../openssl-3.5.1/lib" --without-http_rewrite_module
checking for OS
 + Linux 6.12.48+deb13-amd64 x86_64
checking for C compiler ... found
 + using GNU C compiler
snip...
checking for zlib library ... not found

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.

The zlib1g-dev however does exist.

root@8400:~# apt install zlib1g-dev
The following package was automatically installed and is no longer required:
  tdelibs-trinity
Use 'apt autoremove' to remove it.

Installing:
  zlib1g-dev

Summary:
  Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0
  Download size: 920 kB
  Space needed: 1,349 kB / 19.5 GB available

Get:1 http://gnlug.org/pub/devuan/merged excalibur/main amd64 zlib1g-dev amd64 1:1.3.dfsg+really1.3.1-1+b1 [920 kB]
Fetched 920 kB in 1s (1,119 kB/s)  
Selecting previously unselected package zlib1g-dev:amd64.
(Reading database ... 226008 files and directories currently installed.)
Preparing to unpack .../zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1+b1_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1+b1) ...
Setting up zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1+b1) ...
Processing triggers for man-db (2.13.1-1) ...

zeus@8400:~/src/nginx-1.29.1$ ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --modules-path=/usr/lib/nginx/modules --with-compat --with-http_ssl_module --with-http_v3_module --with-http_addition_module --with-http_random_index_module --with-http_slice_module --with-http_stub_status_module --with-threads --with-file-aio --with-openssl=../openssl-3.5.1 --with-openssl-opt="enable-tls1_3 enable-quic" --with-cc-opt="-I ../openssl-3.5.1/include" --with-ld-opt="-L ../openssl-3.5.1/lib" --without-http_rewrite_module
checking for OS
 + Linux 6.12.48+deb13-amd64 x86_64
checking for C compiler ... found
snip...
checking for zlib library ... found
creating objs/Makefile

Configuration summary
  + using threads
  + PCRE library is not used
  + using OpenSSL library: ../openssl-3.5.1
  + using system zlib library

  nginx path prefix: "/etc/nginx"
  nginx binary file: "/usr/sbin/nginx"
  nginx modules path: "/usr/lib/nginx/modules"
  nginx configuration prefix: "/etc/nginx"
  nginx configuration file: "/etc/nginx/nginx.conf"
  nginx pid file: "/var/run/nginx.pid"
  nginx error log file: "/var/log/nginx/error.log"
  nginx http access log file: "/var/log/nginx/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"

Which results in a makefile creation.

zeus@8400:~/src/nginx-1.29.1$ make -j $(nproc)
make -f objs/Makefile
make[1]: Entering directory '/home/zeus/src/nginx-1.29.1'
cd ../openssl-3.5.1 \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config --prefix=/home/zeus/src/nginx-1.29.1/../openssl-3.5.1/.openssl no-shared no-threads enable-tls1_3 enable-quic \
&& make \
&& make install_sw LIBDIR=lib
sed -e "s|%%PREFIX%%|/etc/nginx|" \
	-e "s|%%PID_PATH%%|/var/run/nginx.pid|" \
	-e "s|%%CONF_PATH%%|/etc/nginx/nginx.conf|" \
	-e "s|%%ERROR_LOG_PATH%%|/var/log/nginx/error.log|" \
	< man/nginx.8 > objs/nginx.8
make[2]: Entering directory '/home/zeus/src/openssl-3.5.1'
rm -f libcrypto.so.3
rm -f libcrypto.so
rm -f libssl.so.3
rm -f libssl.so
rm -f apps/libapps.a libcrypto.a libssl.a providers/libcommon.a providers/libdefault.a providers/liblegacy.a providers/libtemplate.a test/libtestutil.a
rm -f *.ld
snip...

objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
objs/src/http/modules/ngx_http_upstream_random_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/src/http/modules/ngx_http_upstream_zone_module.o \
objs/src/http/modules/ngx_http_stub_status_module.o \
objs/ngx_modules.o \
-L ../openssl-3.5.1/lib -lpthread -lcrypt ../openssl-3.5.1/.openssl/lib/libssl.a ../openssl-3.5.1/.openssl/lib/libcrypto.a -lpthread -lz \
-Wl,-E
make[1]: Leaving directory '/home/zeus/src/nginx-1.29.1'

Seems straight forward enough to get done on an excalibur system. I would make certain you have the absolute latest openssl 3.5.1 code when doing it as there was major bugs patched just yesterday I think it was I seen those security updates for it get installed.

Offline

#5 2025-10-02 13:46:01

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

No change. Maybe the problem is elsewhere, on other packages.

In file included from include/openssl/types.h:26,
                 from apps/include/app_libctx.h:13,
                 from apps/lib/app_libctx.c:9:
/usr/include/limits.h:124:26: error: no include path in which to search for limits.h
  124 | # include_next <limits.h>
      |                          ^
In file included from include/internal/common.h:14,
                 from apps/include/apps.h:13,
                 from apps/lib/app_provider.c:10:
/usr/include/stdlib.h:32:10: fatal error: stddef.h: No such file or directory
   32 | #include <stddef.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from include/internal/e_os.h:13,
                 from apps/lib/app_rand.c:10:
/usr/include/limits.h:124:26: error: no include path in which to search for limits.h
  124 | # include_next <limits.h>

What does this mean ? What is lacking ? I noticed stddef.h was in /usr/include/linux instead of usr/include/. So I create a symbolic link there with all the content of this folder, and the error message changed. Now I have:

/usr/include/stdlib.h:959:59: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/time.h:100:47: error: unknown type name 'size_t'
  100 | extern size_t strftime (char *__restrict __s, size_t __maxsize,
      |                                               ^~~~~~
/usr/include/time.h:100:47: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:466:40: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/stdlib.h:587:
/usr/include/alloca.h:32:22: error: unknown type name 'size_t'
   32 | extern void *alloca (size_t __size) __THROW;
      |                      ^~~~~~
/usr/include/time.h:116:8: error: unknown type name 'size_t'
  116 | extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
      |        ^~~~~~
/usr/include/alloca.h:1:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
  +++ |+#include <stddef.h>
    1 | /* Copyright (C) 1992-2022 Free Software Foundation, Inc.
/usr/include/time.h:116:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/time.h:116:49: error: unknown type name 'size_t'
  116 | extern size_t strftime_l (char *__restrict __s, size_t __maxsize,

Same reference to stddef.h dozens of time. But this time it went very quickly, I don't know if it's a progress or not.

Do I even need to compile openssl ?

Last edited by evanescente~ondine (2025-10-02 14:00:59)

Offline

#6 2025-10-02 16:22:45

RedGreen925
Member
Registered: 2024-12-07
Posts: 179  

Re: [SOLVED] difficulty compiling openssl

Do I even need to compile openssl ?

Yes I tried without doing it and it error-ed about not finding libssl.a and libcrypto.a if my memory serves me well. What kind of system you trying to compile this on? All I did was take a clone of my excalibur system and installed the build-essential got the ssl and nginx  tar files and followed the commands other than the libpcre3 I skipped everything went well.

Last edited by RedGreen925 (2025-10-02 16:23:34)

Offline

#7 2025-10-02 20:31:17

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

My system was devuan stable originally, but now with a lot of more recent debian bullseye packages. You'd have to be more specific.

Offline

#8 2025-10-02 21:25:46

RedGreen925
Member
Registered: 2024-12-07
Posts: 179  

Re: [SOLVED] difficulty compiling openssl

My system was devuan stable originally, but now with a lot of more recent debian bullseye packages. You'd have to be more specific.

You are trying to compile modern code on at this point at least a near five year old system. As you have discovered this will not work. Upgrading to the excalibur will bring you success in what you want to do.

From the Debian Security Announcement I get in my RSS reader.

For the oldstable distribution (bookworm), these problems have been fixed
in version 3.0.17-1~deb12u3.

For the stable distribution (trixie), these problems have been fixed in
version 3.5.1-1+deb13u1.

Bullseye will be using even older versions of everything including the compiler.

Offline

#9 2025-10-02 22:23:37

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

Huh. I see. Sorry I was really not clear on the devuan release system or codenames. I'll upgrade everything and see what happens.

Offline

#10 2025-10-02 22:56:22

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,486  

Re: [SOLVED] difficulty compiling openssl

The Devuan imperative has always been: do not use stable, oldstable. or oldoldstable as release codenames!

Those codenames have individual meanings for the forked packages and the Debian packages., so there is always this period of time when Debian has "moved" its meanings (e.g. it's stbale packages are in the trixie release) while the Devuan forked packages have note so "moved" (e.g., its "stable" packages are still in the "daedalus" release).

The reason may be of some complexity to digest, but the rule is simple:
do not use stable, oldstable. or oldoldstable as release codenames!

Offline

#11 2025-10-03 03:55:53

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

Let me telll you, upgrading to excalibur was a pain in the bottom.
... And then, the compilation still fails.
Feel free to look into the errors here.

Offline

#12 2025-10-03 04:17:14

RedGreen925
Member
Registered: 2024-12-07
Posts: 179  

Re: [SOLVED] difficulty compiling openssl

And then, the compilation still fails.
Feel free to look into the errors here.

So why the 4.0.0-dev version and not the 3.5.1? This has been shown above to work and is included/built in an excalibur system.

Edit: Oh non-mangled link to the pastebin.

https://pastebin.com/zTPZeV6b

Last edited by RedGreen925 (2025-10-03 04:18:21)

Offline

#13 2025-10-03 15:32:04

g4sra
Member
Registered: 2018-12-12
Posts: 49  

Re: [SOLVED] difficulty compiling openssl

That error is caused by a missing system header file.
Ensure you have installed the package corresponding to your compiler version,

gcc -v 2>&1 | tail -1
gcc version 12.2.0 (Debian 12.2.0-14+deb12u1)

for me that is

apt install libgcc-12-dev

Offline

#14 2025-10-03 15:39:16

g4sra
Member
Registered: 2018-12-12
Posts: 49  

Re: [SOLVED] difficulty compiling openssl

As it is unclear to me why you are compiling OpenSSL (my fault TL;DR;)

g4sra@localhost:# apt-file search libssl.a
libssl-dev: /usr/lib/x86_64-linux-gnu/libssl.a
g4sra@localhost:# apt-file search libcrypto.a
libssl-dev: /usr/lib/x86_64-linux-gnu/libcrypto.a

So installing the libssl-dev package would satisfy both those previously mentioned libraries (for me)

Offline

#15 2025-10-03 15:45:44

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

I want to compile nginx with the http/3 and brotli compression support. The default build doesn't have the second. That requires, among other things, an SSL implementation, and openssl seemed the most secure and straightforward to compile. Or so I thought.

Offline

#16 2025-10-03 16:29:22

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

I want to compile nginx with the http/3 and brotli compression support. The default build doesn't have the second. That requires, among other things, an SSL implementation,

I installed both packages you mentioned and made some progress. Until it blocks again. I really hate compilations, they're the quintessence of all the nonsense in computers.

rm@84-47-09-37-40-35 /u/l/s/nginx-1.29.1 [2]> make -j (nproc)
make -f objs/Makefile
make[1]: Entering directory '/usr/local/src/nginx-1.29.1'
cd /home/drm/openssl-3.5.1 \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config --prefix=/home/drm/openssl-3.5.1/.openssl no-shared no-threads enable-tls1_3 enable-quic \
&& make \
&& make install_sw LIBDIR=lib
/bin/sh: 3: ./config: not found
make[1]: *** [objs/Makefile:1703: /home/drm/openssl-3.5.1/.openssl/include/openssl/ssl.h] Error 127
make[1]: Leaving directory '/usr/local/src/nginx-1.29.1'
make: *** [Makefile:10: build] Error 2

Here's the structure of openssl-3.5.1

/home/drm/openssl-3.5.1
└──􀀂  install
    ├──􀀂  bin
    │  ├──􀀀  c_rehash
    │  └──􀀀  openssl
    ├──􀀂  include
    │  └──􀀂  openssl
    │     ├──􀂴  asn1.h
    │     ├──􀂴  asn1err.h
    │     ├──􀂴  asn1t.h
    │     ├──􀂴  async.h
    │     ├──􀂴  asyncerr.h
    │     ├──􀂴  bio.h
    │     ├──􀂴  bioerr.h
    │     └──􀂴  135 unlisted
    ├──􀀂  lib64
    │  ├──􀀂  cmake
    │  │  └──􀀂  OpenSSL …
    │  ├──􀀂  engines-4
    │  │  ├──􀂖  afalg.so
    │  │  ├──􀂖  capi.so
    │  │  ├──􀂖  loader_attic.so
    │  │  └──􀂖  padlock.so
    │  ├──􀂖  libcrypto.a
    │  ├──🔗  libcrypto.so -> /home/drm/openssl-3.5.1/install/lib64/libcrypto.so.4
    │  ├──􀀀  libcrypto.so.4
    │  ├──􀂖  libssl.a
    │  ├──🔗  libssl.so -> /home/drm/openssl-3.5.1/install/lib64/libssl.so.4
    │  ├──􀀀  libssl.so.4
    │  ├──􀀂  ossl-modules
    │  │  └──􀂖  legacy.so
    │  └──􀀂  pkgconfig
    │     ├──􀀀  libcrypto.pc
    │     ├──􀀀  libssl.pc
    │     └──􀀀  openssl.pc
    ├──􀀂  share
    │  ├──􀀂  doc
    │  │  └──􀀂  openssl …
    │  └──􀀂  man
    │     ├──􀀂  man1 …
    │     ├──􀀂  man3 …
    │     ├──􀀂  man5 …
    │     └──􀀂  man7 …
    └──􀀂  ssl
       ├──􀀂  certs
       ├──􀀀  ct_log_list.cnf
       ├──􀀀  ct_log_list.cnf.dist
       ├──􀀂  misc
       │  ├──􀀀  CA.pl
       │  ├──🔗  tsget -> /home/drm/openssl-3.5.1/install/ssl/misc/tsget.pl
       │  └──􀀀  tsget.pl
       ├──􀀀  openssl.cnf
       ├──􀀀  openssl.cnf.dist
       └──􀀂  private

Offline

#17 2025-10-03 16:33:05

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

this was the build options:

./configure \
  --prefix=/etc/nginx \
  --sbin-path=/usr/sbin/nginx \
  --conf-path=/etc/nginx/nginx.conf \
  --pid-path=/var/run/nginx.pid \
  --lock-path=/var/run/nginx.lock \
  --error-log-path=/var/log/nginx/error.log \
  --http-log-path=/var/log/nginx/access.log \
  --modules-path=/usr/lib/nginx/modules \
  --with-compat \
  --with-http_ssl_module \
  --with-http_v2_module \
  --with-http_v3_module \
  --with-http_addition_module \
  --with-http_random_index_module \
  --with-http_slice_module \
  --with-http_stub_status_module \
  --with-threads \
  --with-file-aio \
  --add-dynamic-module=/home/drm/ngx_brotli \
  --with-openssl=/home/drm/openssl-3.5.1 \
  --with-openssl-opt="enable-tls1_3 enable-quic" \
  --with-cc-opt="-I /home/drm/openssl-3.5.1/include" \
  --with-ld-opt="-L /home/drm/openssl-3.5.1/lib"

Offline

#18 2025-10-03 17:07:59

g4sra
Member
Registered: 2018-12-12
Posts: 49  

Re: [SOLVED] difficulty compiling openssl

nginx is still trying to compile OpenSSL (which looks like it requires 'cmake' not 'make' anyway).
Where did these come from, they look suspicious to me ?

--with-cc-opt="-I /home/drm/openssl-3.5.1/include" \
  --with-ld-opt="-L /home/drm/openssl-3.5.1/lib"

Shoudn't the paths be

/home/drm/openssl-3.5.1/install/include
/home/drm/openssl-3.5.1/install/lib64

Your guide is

./configure --help

Offline

#19 2025-10-03 17:45:27

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

.Yes it should, but I corrected it: no change.
cd /home/drm/openssl-3.5.1/ \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config --prefix=/home/drm/openssl-3.5.1//.openssl no-shared no-threads enable-tls1_3 enable-quic \
&& make \
&& make install_sw LIBDIR=lib
/bin/sh: 3: ./config: not found
make[1]: *** [objs/Makefile:1703: /home/drm/openssl-3.5.1//.openssl/include/openssl/ssl.h] Error 127
make[1]: Leaving directory '/usr/local/src/nginx-1.29.1'
make: *** [Makefile:13: install] Error 2

I do not know why it uses cmake or not make, config, or whatever else, and "./configure --help" reads like Chinese to me.

Last edited by evanescente~ondine (2025-10-03 17:53:19)

Offline

#20 2025-10-03 17:54:30

g4sra
Member
Registered: 2018-12-12
Posts: 49  

Re: [SOLVED] difficulty compiling openssl

This is absolutely, mindboggingly complicated for no reason

One reason it is absolutely mindboggingly complicated is that you are compiling outside of the packaging system.
I would not even attempt it this way, my approach would be to

apt-get source openssl
apt-get source nginx

*Build them both without modification*
Once that works, for each package modify the compilation options (most likely debian/rules) to achieve the desired result.

Offline

#21 2025-10-03 18:54:00

g4sra
Member
Registered: 2018-12-12
Posts: 49  

Re: [SOLVED] difficulty compiling openssl

Ha, just tried it for fun and even that fails

Offline

#22 2025-10-03 20:16:01

g4sra
Member
Registered: 2018-12-12
Posts: 49  

Re: [SOLVED] difficulty compiling openssl

Just done a quick google, as of Jan 2024 brotli is an external module and not part of nginx (so will unlikely be in daedelus sources).
You build brotli on its own, no need to build OpenSSL or nginx

I googled for a solution and hit this, there may be better options out there...
https://thelinuxcode.com/enable-brotli- … ion-nginx/

Offline

#23 2025-10-03 21:25:23

evanescente~ondine
Member
Registered: 2025-09-12
Posts: 26  

Re: [SOLVED] difficulty compiling openssl

Done !
I just took time to think and study the source !

Offline

Board footer