Compiling Statically linked binaries not possible ?
Compiling Static binaries not possible ?
Hi, I'm trying to compile SSLproxy to a statically linked binary via the command PCFLAGS='--static' CFLAGS='-static' LDFLAGS='-static' make -j$(nproc) however this method fails with the error detailed below. But if I compile via the make -j$(nproc) the program compiles successfully.
Is it not possible to compile SSLproxy as a statically linked binary?
Requested information:
- OS: Ubuntu 22.04.2 LTS
- Output of
uname -a: Linux UbuntuBox 5.15.0-75-generic #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux - Full output of failed
makeincluding the header:
User1457@UbuntuBox:~/Compile_Drop/SSLproxy$ PCFLAGS='--static' CFLAGS='-static' LDFLAGS='-static' make -j$(nproc)
make -C src
make[1]: Entering directory '/home/User1457/Compile_Drop/SSLproxy/src'
------------------------------------------------------------------------------
SSLproxy v0.9.4
------------------------------------------------------------------------------
Report bugs at https://github.com/sonertari/SSLproxy/issues/new
Please supply this header for diagnostics when reporting build issues
Before reporting bugs, make sure to try the latest develop branch first:
% git clone -b develop https://github.com/sonertari/SSLproxy.git
------------------------------------------------------------------------------
Via pkg-config: openssl libevent libevent_openssl libevent_pthreads libpcap sqlite3
LIBNET_BASE: /usr
Build options: -DHAVE_NETFILTER
Build info: V:GIT
uname -a: Linux UbuntuBox 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
------------------------------------------------------------------------------
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o base64.o base64.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -D"BUILD_PKGNAME=\"sslproxy\"" -D"BUILD_VERSION=\"v0.9.4\"" -D"BUILD_DATE=\"2023-06-30\"" -D"BUILD_INFO=\"V:GIT\"" -D"BUILD_FEATURES=\"-DHAVE_NETFILTER\"" -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o build.o build.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o cache.o cache.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o cachedsess.o cachedsess.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o cachefkcrt.o cachefkcrt.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o cachemgr.o cachemgr.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o cachessess.o cachessess.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o cachetgcrt.o cachetgcrt.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o cert.o cert.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o dynbuf.o dynbuf.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o filter.o filter.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o log.o log.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o logbuf.o logbuf.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o logger.o logger.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o logpkt.o logpkt.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o main.o main.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o nat.o nat.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o opts.o opts.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o privsep.o privsep.c
opts.c: In function ‘conn_opts_free’:
opts.c:210:17: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
210 | DH_free(conn_opts->dh);
| ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from opts.h:35,
from opts.c:30:
/usr/include/openssl/dh.h:200:28: note: declared here
200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
| ^~~~~~~
opts.c: In function ‘opts_set_dh’:
opts.c:1601:17: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
1601 | DH_free(conn_opts->dh);
| ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from opts.h:35,
from opts.c:30:
/usr/include/openssl/dh.h:200:28: note: declared here
200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
| ^~~~~~~
opts.c: In function ‘opts_set_ecdhcurve’:
opts.c:1631:9: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
1631 | EC_KEY_free(ec);
| ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from opts.h:35,
from opts.c:30:
/usr/include/openssl/ec.h:1003:28: note: declared here
1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o proc.o proc.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o protoautossl.o protoautossl.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o protohttp.o protohttp.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o protopassthrough.o protopassthrough.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o protopop3.o protopop3.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o protosmtp.o protosmtp.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o protossl.o protossl.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o prototcp.o prototcp.c
protossl.c: In function ‘protossl_srcsslctx_create’:
protossl.c:402:17: warning: ‘SSL_CTX_set_tmp_dh_callback’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
402 | SSL_CTX_set_tmp_dh_callback(sslctx, ssl_tmp_dh_callback);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ssl.h:35,
from opts.h:35,
from proxy.h:32,
from pxyconn.h:37,
from protossl.h:33,
from protossl.c:30:
/usr/include/openssl/ssl.h:2216:6: note: declared here
2216 | void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
protossl.c:409:17: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
409 | EC_KEY_free(ecdh);
| ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from opts.h:35,
from proxy.h:32,
from pxyconn.h:37,
from protossl.h:33,
from protossl.c:30:
/usr/include/openssl/ec.h:1003:28: note: declared here
1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
protossl.c:413:17: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
413 | EC_KEY_free(ecdh);
| ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from opts.h:35,
from proxy.h:32,
from pxyconn.h:37,
from protossl.h:33,
from protossl.c:30:
/usr/include/openssl/ec.h:1003:28: note: declared here
1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o proxy.o proxy.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o pxyconn.o pxyconn.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o pxythr.o pxythr.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o pxythrmgr.o pxythrmgr.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o ssl.o ssl.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o sys.o sys.c
ssl.c: In function ‘ssl_engine’:
ssl.c:530:9: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
530 | engine = ENGINE_by_id(name);
| ^~~~~~
In file included from ssl.c:44:
/usr/include/openssl/engine.h:336:31: note: declared here
336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
| ^~~~~~~~~~~~
ssl.c:534:9: warning: ‘ENGINE_set_default’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
534 | if (!ENGINE_set_default(engine, ENGINE_METHOD_ALL))
| ^~
In file included from ssl.c:44:
/usr/include/openssl/engine.h:708:27: note: declared here
708 | OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default(ENGINE *e, unsigned int flags);
| ^~~~~~~~~~~~~~~~~~
ssl.c: In function ‘ssl_tmp_dh_callback’:
ssl.c:743:9: warning: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
743 | if (!(dh = DH_new())) {
| ^~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/dh.h:199:27: note: declared here
199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
| ^~~~~~
ssl.c:749:17: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
749 | rv = DH_set0_pqg(dh,
| ^~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/dh.h:255:27: note: declared here
255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
| ^~~~~~~~~~~
ssl.c:755:17: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
755 | rv = DH_set0_pqg(dh,
| ^~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/dh.h:255:27: note: declared here
255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
| ^~~~~~~~~~~
ssl.c:761:17: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
761 | rv = DH_set0_pqg(dh,
| ^~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/dh.h:255:27: note: declared here
255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
| ^~~~~~~~~~~
ssl.c:767:17: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
767 | rv = DH_set0_pqg(dh,
| ^~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/dh.h:255:27: note: declared here
255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
| ^~~~~~~~~~~
ssl.c:776:17: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
776 | DH_free(dh);
| ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/dh.h:200:28: note: declared here
200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
| ^~~~~~~
ssl.c:781:17: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
781 | DH_free(dh);
| ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/dh.h:200:28: note: declared here
200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
| ^~~~~~~
ssl.c: In function ‘ssl_dh_load’:
ssl.c:803:9: warning: ‘PEM_read_DHparams’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
803 | dh = PEM_read_DHparams(fh, NULL, NULL, NULL);
| ^~
In file included from /usr/include/openssl/ssl.h:36,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/pem.h:469:1: note: declared here
469 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
| ^~~~~~~~~~~~~~~~~~~
ssl.c: In function ‘ssl_ec_by_name’:
ssl.c:825:9: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
825 | return EC_KEY_new_by_curve_name(nid);
| ^~~~~~
In file included from /usr/include/openssl/x509.h:33,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/ec.h:998:31: note: declared here
998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
| ^~~~~~~~~~~~~~~~~~~~~~~~
ssl.c: In function ‘ssl_key_genrsa’:
ssl.c:1375:9: warning: ‘RSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
1375 | rsa = RSA_new();
| ^~~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/rsa.h:201:28: note: declared here
201 | OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
| ^~~~~~~
ssl.c:1378:9: warning: ‘RSA_generate_key_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
1378 | rv = RSA_generate_key_ex(rsa, keysize, bn, NULL);
| ^~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/rsa.h:260:27: note: declared here
260 | OSSL_DEPRECATEDIN_3_0 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
| ^~~~~~~~~~~~~~~~~~~
ssl.c:1381:17: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
1381 | RSA_free(rsa);
| ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/rsa.h:293:28: note: declared here
293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
| ^~~~~~~~
ssl.c:1390:9: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
1390 | EVP_PKEY_assign_RSA(pkey, rsa); /* does not increment refcount */
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:29,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/evp.h:1328:5: note: declared here
1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
| ^~~~~~~~~~~~~~~
ssl.c: In function ‘ssl_dh_refcount_inc’:
ssl.c:1511:9: warning: ‘DH_up_ref’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
1511 | DH_up_ref(dh);
| ^~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ssl.h:35,
from ssl.c:29:
/usr/include/openssl/dh.h:201:27: note: declared here
201 | OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh);
| ^~~~~~~~~
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o thrqueue.o thrqueue.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o url.o url.c
cc -c -isystem/usr/include -D_GNU_SOURCE -D"PKGLABEL=\"SSLproxy\"" -DHAVE_NETFILTER -static -g -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -O2 -o util.o util.c
cc -static -L/usr/lib -pthread -pthread -o sslproxy base64.o build.o cache.o cachedsess.o cachefkcrt.o cachemgr.o cachessess.o cachetgcrt.o cert.o dynbuf.o filter.o log.o logbuf.o logger.o logpkt.o main.o nat.o opts.o privsep.o proc.o protoautossl.o protohttp.o protopassthrough.o protopop3.o protosmtp.o protossl.o prototcp.o proxy.o pxyconn.o pxythr.o pxythrmgr.o ssl.o sys.o thrqueue.o url.o util.o -lnet -lssl -lcrypto -ldl -levent_openssl -lssl -lcrypto -levent_pthreads -levent -lpcap -ldbus-1 -lsqlite3 -lm -lz
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function `dlfcn_globallookup':
(.text+0x17): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-sysdeps-unix.o): in function `fill_user_info':
(.text+0x2cf): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: sys.o: in function `sys_privdrop':
/home/User1457/Compile_Drop/SSLproxy/src/sys.c:105: warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/User1457/Compile_Drop/SSLproxy/src/sys.c:86: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/User1457/Compile_Drop/SSLproxy/src/sys.c:150: warning: Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: sys.o: in function `sys_group_str':
/home/User1457/Compile_Drop/SSLproxy/src/sys.c:385: warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: sys.o: in function `sys_privdrop':
/home/User1457/Compile_Drop/SSLproxy/src/sys.c:95: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/User1457/Compile_Drop/SSLproxy/src/sys.c:147: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-sysdeps-unix.o): in function `fill_user_info':
(.text+0x1d0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: sys.o: in function `sys_user_str':
/home/User1457/Compile_Drop/SSLproxy/src/sys.c:332: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-bio_addr.o): in function `BIO_lookup_ex':
(.text+0xd7f): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libnet.a(libnet_resolve.o): in function `libnet_addr2name4':
(.text+0xd4): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libnet.a(libnet_resolve.o): in function `libnet_name2addr4':
(.text+0x340): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libnet.a(libnet_resolve.o): in function `libnet_name2addr6':
(.text+0x549): warning: Using 'gethostbyname2' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libpcap.a(nametoaddr.o): in function `pcap_nametonetaddr':
(.text+0x101): warning: Using 'getnetbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libevent.a(evutil.o): in function `evutil_getaddrinfo_common_':
(.text+0x1c44): warning: Using 'getprotobynumber' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libpcap.a(nametoaddr.o): in function `pcap_nametoproto':
(.text+0x583): warning: Using 'getprotobyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libevent.a(evutil.o): in function `evutil_getaddrinfo_common_':
(.text+0x1baf): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-sysdeps-unix.o): in function `_dbus_listen_systemd_sockets':
(.text+0x200e): undefined reference to `sd_listen_fds'
/usr/bin/ld: (.text+0x204f): undefined reference to `sd_is_socket'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:16: sslproxy] Error 1
make[1]: Leaving directory '/home/User1457/Compile_Drop/SSLproxy/src'
make: *** [GNUmakefile:10: sslproxy] Error 2
- Version and origin of OpenSSL used: Origin: Ubuntu package manager (apt/aptitude package: libssl-dev) Version: OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
- Version and origin of libevent used: Origin: Ubuntu package manager (apt/aptitude package: libevent-dev) Version: 2.1.12-stable-1build3
Kind regards
I've tried to compile using your command line, and I get the same errors. Honestly I had never tried to build a statically linked sslproxy binary before. I will try again, but no promises. Let me know if you succeed yourself.
I'm also getting the same error with SSLsplit as well Since this is based on SSLsplit I'll open an issue over there and see if the good folks over there have any idea since the command that I use is derived from an issue there.
Edit: change sslstrip to sslsplit typo
I think no need for that, because I am the maintainer of SSLsplit too :).
On second thought, SSLsplit has more than 100 watchers, perhaps they can help, so by all means submit an issue there too.
Issue submited over at SSLSplit
For those that absolutely need this binary to be static right now there is a temporary sticky tape solution: The binary can be made static using the packer staticx, However this is not a true solution and may introduce instability in the future.