nomoresat / DPITunnel-cli

GNU General Public License v3.0
216 stars 29 forks source link

I can't compile under ubuntu #5

Open whakru opened 2 months ago

whakru commented 2 months ago

I'm a newbie and I'm trying to assemble it for the first time. I can't do it... Here are my steps:

curl https://curl.se/ca/cacert.pem --output /cacert.pem
git clone https://github.com/nomoresat/DPITunnel-cli.git /source
cd /source && nproc=4
apt update && apt install build-essential cmake openssl libssl-dev linux-headers-generic
cmake -B./build -DCMAKE_BUILD_TYPE=RELEASE -DSTATIC_BINARY=true .
make -C ./build -j $(nproc)

I get an error:

[ 91%] Building CXX object RawSocket/CMakeFiles/RawSocket.dir/CheckSum.cpp.o
[ 92%] Linking CXX static library libRawSocket.a
make[2]: Leaving directory '/source/build'
[ 92%] Built target RawSocket
make[2]: Entering directory '/source/build'
make[2]: Leaving directory '/source/build'
make[2]: Entering directory '/source/build'
[ 92%] Building CXX object CMakeFiles/DPITunnel-cli-exec.dir/autoconf.cpp.o
/source/autoconf.cpp: In function 'int run_autoconf()':
/source/autoconf.cpp:486:29: warning: 'int ERR_load_BIO_strings()' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  486 |         ERR_load_BIO_strings();
      |         ~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/openssl/cryptoerr.h:17,
                 from /usr/include/openssl/crypto.h:38,
                 from /usr/include/openssl/comp.h:22,
                 from /usr/include/openssl/ssl.h:28,
                 from /source/include/ssl.h:4,
                 from /source/autoconf.cpp:7:
/usr/include/openssl/cryptoerr_legacy.h:31:27: note: declared here
   31 | OSSL_DEPRECATEDIN_3_0 int ERR_load_BIO_strings(void);
      |                           ^~~~~~~~~~~~~~~~~~~~
[ 93%] Building CXX object CMakeFiles/DPITunnel-cli-exec.dir/desync.cpp.o
[ 94%] Building CXX object CMakeFiles/DPITunnel-cli-exec.dir/dns.cpp.o
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h: In function 'std::string httplib::detail::MD5(const string&)':
/source/cpp-httplib/include/cpp-httplib/httplib.h:4036:37: warning: 'int MD5_Init(MD5_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4036 |   return message_digest<MD5_CTX>(s, MD5_Init, MD5_Update, MD5_Final,
      |                                     ^~~~~~~~
In file included from /source/cpp-httplib/include/cpp-httplib/httplib.h:213,
                 from /source/dns.cpp:23:
/usr/include/openssl/md5.h:49:27: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
      |                           ^~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4036:47: warning: 'int MD5_Update(MD5_CTX*, const void*, size_t)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4036 |   return message_digest<MD5_CTX>(s, MD5_Init, MD5_Update, MD5_Final,
      |                                               ^~~~~~~~~~
In file included from /source/cpp-httplib/include/cpp-httplib/httplib.h:213,
                 from /source/dns.cpp:23:
/usr/include/openssl/md5.h:50:27: note: declared here
   50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
      |                           ^~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4036:59: warning: 'int MD5_Final(unsigned char*, MD5_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4036 |   return message_digest<MD5_CTX>(s, MD5_Init, MD5_Update, MD5_Final,
      |                                                           ^~~~~~~~~
In file included from /source/cpp-httplib/include/cpp-httplib/httplib.h:213,
                 from /source/dns.cpp:23:
/usr/include/openssl/md5.h:51:27: note: declared here
   51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
      |                           ^~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4036:33: warning: 'int MD5_Init(MD5_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4036 |   return message_digest<MD5_CTX>(s, MD5_Init, MD5_Update, MD5_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4037 |                                  MD5_DIGEST_LENGTH);
      |                                  ~~~~~~~~~~~~~~~~~~
In file included from /source/cpp-httplib/include/cpp-httplib/httplib.h:213,
                 from /source/dns.cpp:23:
/usr/include/openssl/md5.h:49:27: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
      |                           ^~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4036:33: warning: 'int MD5_Update(MD5_CTX*, const void*, size_t)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4036 |   return message_digest<MD5_CTX>(s, MD5_Init, MD5_Update, MD5_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4037 |                                  MD5_DIGEST_LENGTH);
      |                                  ~~~~~~~~~~~~~~~~~~
In file included from /source/cpp-httplib/include/cpp-httplib/httplib.h:213,
                 from /source/dns.cpp:23:
/usr/include/openssl/md5.h:50:27: note: declared here
   50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
      |                           ^~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4036:33: warning: 'int MD5_Final(unsigned char*, MD5_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4036 |   return message_digest<MD5_CTX>(s, MD5_Init, MD5_Update, MD5_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4037 |                                  MD5_DIGEST_LENGTH);
      |                                  ~~~~~~~~~~~~~~~~~~
In file included from /source/cpp-httplib/include/cpp-httplib/httplib.h:213,
                 from /source/dns.cpp:23:
/usr/include/openssl/md5.h:51:27: note: declared here
   51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
      |                           ^~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h: In function 'std::string httplib::detail::SHA_256(const string&)':
/source/cpp-httplib/include/cpp-httplib/httplib.h:4041:40: warning: 'int SHA256_Init(SHA256_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4041 |   return message_digest<SHA256_CTX>(s, SHA256_Init, SHA256_Update, SHA256_Final,
      |                                        ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:73:27: note: declared here
   73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
      |                           ^~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4041:53: warning: 'int SHA256_Update(SHA256_CTX*, const void*, size_t)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4041 |   return message_digest<SHA256_CTX>(s, SHA256_Init, SHA256_Update, SHA256_Final,
      |                                                     ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:74:27: note: declared here
   74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
      |                           ^~~~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4041:68: warning: 'int SHA256_Final(unsigned char*, SHA256_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4041 |   return message_digest<SHA256_CTX>(s, SHA256_Init, SHA256_Update, SHA256_Final,
      |                                                                    ^~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:76:27: note: declared here
   76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
      |                           ^~~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4041:36: warning: 'int SHA256_Init(SHA256_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4041 |   return message_digest<SHA256_CTX>(s, SHA256_Init, SHA256_Update, SHA256_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4042 |                                     SHA256_DIGEST_LENGTH);
      |                                     ~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:73:27: note: declared here
   73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
      |                           ^~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4041:36: warning: 'int SHA256_Update(SHA256_CTX*, const void*, size_t)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4041 |   return message_digest<SHA256_CTX>(s, SHA256_Init, SHA256_Update, SHA256_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4042 |                                     SHA256_DIGEST_LENGTH);
      |                                     ~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:74:27: note: declared here
   74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
      |                           ^~~~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4041:36: warning: 'int SHA256_Final(unsigned char*, SHA256_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4041 |   return message_digest<SHA256_CTX>(s, SHA256_Init, SHA256_Update, SHA256_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4042 |                                     SHA256_DIGEST_LENGTH);
      |                                     ~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:76:27: note: declared here
   76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
      |                           ^~~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h: In function 'std::string httplib::detail::SHA_512(const string&)':
/source/cpp-httplib/include/cpp-httplib/httplib.h:4046:40: warning: 'int SHA512_Init(SHA512_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4046 |   return message_digest<SHA512_CTX>(s, SHA512_Init, SHA512_Update, SHA512_Final,
      |                                        ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:123:27: note: declared here
  123 | OSSL_DEPRECATEDIN_3_0 int SHA512_Init(SHA512_CTX *c);
      |                           ^~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4046:53: warning: 'int SHA512_Update(SHA512_CTX*, const void*, size_t)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4046 |   return message_digest<SHA512_CTX>(s, SHA512_Init, SHA512_Update, SHA512_Final,
      |                                                     ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:124:27: note: declared here
  124 | OSSL_DEPRECATEDIN_3_0 int SHA512_Update(SHA512_CTX *c,
      |                           ^~~~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4046:68: warning: 'int SHA512_Final(unsigned char*, SHA512_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4046 |   return message_digest<SHA512_CTX>(s, SHA512_Init, SHA512_Update, SHA512_Final,
      |                                                                    ^~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:126:27: note: declared here
  126 | OSSL_DEPRECATEDIN_3_0 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
      |                           ^~~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4046:36: warning: 'int SHA512_Init(SHA512_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4046 |   return message_digest<SHA512_CTX>(s, SHA512_Init, SHA512_Update, SHA512_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4047 |                                     SHA512_DIGEST_LENGTH);
      |                                     ~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:123:27: note: declared here
  123 | OSSL_DEPRECATEDIN_3_0 int SHA512_Init(SHA512_CTX *c);
      |                           ^~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4046:36: warning: 'int SHA512_Update(SHA512_CTX*, const void*, size_t)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4046 |   return message_digest<SHA512_CTX>(s, SHA512_Init, SHA512_Update, SHA512_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4047 |                                     SHA512_DIGEST_LENGTH);
      |                                     ~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:124:27: note: declared here
  124 | OSSL_DEPRECATEDIN_3_0 int SHA512_Update(SHA512_CTX *c,
      |                           ^~~~~~~~~~~~~
In file included from /source/dns.cpp:23:
/source/cpp-httplib/include/cpp-httplib/httplib.h:4046:36: warning: 'int SHA512_Final(unsigned char*, SHA512_CTX*)' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4046 |   return message_digest<SHA512_CTX>(s, SHA512_Init, SHA512_Update, SHA512_Final,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4047 |                                     SHA512_DIGEST_LENGTH);
      |                                     ~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
                 from /usr/include/openssl/ssl.h:31,
                 from /source/include/ssl.h:4,
                 from /source/dns.cpp:4:
/usr/include/openssl/sha.h:126:27: note: declared here
  126 | OSSL_DEPRECATEDIN_3_0 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
      |                           ^~~~~~~~~~~~
txtsd commented 2 months ago

Consider using https://github.com/txtsd/DPITunnel which addresses these issues.

There are even released static binaries which should run on your system without having to compile it yourself.