<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>With -DCMAKE_BUILD_TYPE=RELEASE libwebsockets.so.16 is well
      reduced from 398,2kB to 364,6kB but libwebsockets.so.17 stays
      unchanged.</p>
    <p>I tried removing HTTP2 support with -DLWS_WITH_HTTP2=OFF and
      libwebsockets.so.17 decreases from 3.1MB to 2.8MB. This confirms
      options are taken into account.<br>
    </p>
    <p>In case it helps here my last compilation logs:</p>
    <p>cmake .. -DCMAKE_INSTALL_PREFIX:PATH=./
      -DCMAKE_TOOLCHAIN_FILE=../cross-arm-linux-apf28.cmake
-DOPENSSL_ROOT_DIR=/home/thomas/Armadeus/armadeus-7.0-linux3.19.8-noUboot/buildroot/output/build/libopenssl-1.1.1o
-DOPENSSL_INCLUDE_DIR=/home/thomas/Armadeus/armadeus-7.0-linux3.19.8-noUboot/buildroot/output/build/libopenssl-1.1.1o/include/
-DOPENSSL_LIBRARIES=/home/thomas/Armadeus/armadeus-7.0-linux3.19.8-noUboot/buildroot/output/build/libopenssl-1.1.1o/
      -DLWS_WITHOUT_DAEMONIZE=ON -DCMAKE_BUILD_TYPE=RELEASE<br>
      -- Compiled with LWS_WITH_DIR and LWS_WITH_LEJP_CONF<br>
      Git commit hash: 22d043a<br>
      -- CMAKE_TOOLCHAIN_FILE='../cross-arm-linux-apf28.cmake'<br>
      Compiling with SSL support<br>
      -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so  <br>
      OpenSSL include dir:
/home/thomas/Armadeus/armadeus-7.0-linux3.19.8-noUboot/buildroot/output/build/libopenssl-1.1.1o/include<br>
      OpenSSL libraries:
/usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;ssl;crypto<br>
      Searching for OpenSSL executable and dlls<br>
      OpenSSL executable: /usr/bin/openssl<br>
       GENCERTS = 1<br>
      Generating SSL Certificates for the test-server...<br>
      Generating a RSA private key<br>
      ......+++++<br>
      ..................................+++++<br>
      writing new private key to
'/home/thomas/workspace/Varuna4/0_librairies_sources/libwebsockets/libwebsockets-4.1-stable-20200922/libwebsockets-test-server.key.pem'<br>
      -----<br>
      You are about to be asked to enter information that will be
      incorporated<br>
      into your certificate request.<br>
      What you are about to enter is what is called a Distinguished Name
      or a DN.<br>
      There are quite a few fields but you can leave some blank<br>
      For some fields there will be a default value,<br>
      If you enter '.', the field will be left blank.<br>
      -----<br>
      Country Name (2 letter code) [AU]:State or Province Name (full
      name) [Some-State]:Locality Name (eg, city) []:Organization Name
      (eg, company) [Internet Widgits Pty Ltd]:Organizational Unit Name
      (eg, section) []:Common Name (e.g. server FQDN or YOUR name)
      []:Email Address []:SUCCESSFULLY generated SSL certificate<br>
      DIR
/home/thomas/workspace/Varuna4/0_librairies_sources/libwebsockets/libwebsockets-4.1-stable-20200922
      CMP
/home/thomas/workspace/Varuna4/0_librairies_sources/libwebsockets/libwebsockets-4.1-stable-20200922/cmake<br>
      -- Configuring done<br>
      -- Generating done<br>
      -- Build files have been written to:
/home/thomas/workspace/Varuna4/0_librairies_sources/libwebsockets/libwebsockets-4.1-stable-20200922<br>
      -- Cache values<br>
      BUILD_TESTING:BOOL=ON<br>
      CMAKE_BUILD_TYPE:STRING=RELEASE<br>
      CMAKE_INSTALL_PREFIX:PATH=.<br>
      DISABLE_WERROR:BOOL=OFF<br>
LIBWEBSOCKETS_INCLUDE_DIRS:PATH=/home/thomas/workspace/Varuna4/0_librairies_sources/libwebsockets/libwebsockets-4.1-stable-20200922/lib;/home/thomas/workspace/Varuna4/0_librairies_sources/libwebsockets/libwebsockets-4.1-stable-20200922<br>
      LIBWEBSOCKETS_LIBRARIES:STRING=websockets;websockets_shared<br>
      LIBWEBSOCKETS_LIBRARIES_SHARED:STRING=websockets_shared<br>
      LIBWEBSOCKETS_LIBRARIES_STATIC:STRING=websockets<br>
      LWS_AVOID_SIGPIPE_IGN:BOOL=OFF<br>
      LWS_CLIENT_HTTP_PROXYING:BOOL=ON<br>
      LWS_CTEST_INTERNET_AVAILABLE:BOOL=ON<br>
      LWS_EXT_PTHREAD_INCLUDE_DIR:PATH=<br>
      LWS_EXT_PTHREAD_LIBRARIES:PATH=<br>
      LWS_FALLBACK_GETHOSTBYNAME:BOOL=OFF<br>
      LWS_FOR_GITOHASHI:BOOL=OFF<br>
      LWS_HTTP_HEADERS_ALL:BOOL=OFF<br>
      LWS_INSTALL_BIN_DIR:PATH=bin<br>
      LWS_INSTALL_CMAKE_DIR:PATH=lib/cmake/libwebsockets<br>
      LWS_INSTALL_EXAMPLES_DIR:PATH=bin<br>
      LWS_INSTALL_INCLUDE_DIR:PATH=include<br>
      LWS_INSTALL_LIB_DIR:PATH=lib<br>
      LWS_IPV6:BOOL=OFF<br>
      LWS_LIBMOUNT_INCLUDE_DIRS:PATH=<br>
      LWS_LIBMOUNT_LIBRARIES:PATH=<br>
      LWS_LINK_TESTAPPS_DYNAMIC:BOOL=OFF<br>
      LWS_LOGGING_BITFIELD_CLEAR:STRING=0<br>
      LWS_LOGGING_BITFIELD_SET:STRING=0<br>
      LWS_LOGS_TIMESTAMP:BOOL=ON<br>
      LWS_OPENSSL_CLIENT_CERTS:PATH=../share<br>
      LWS_OPENSSL_INCLUDE_DIRS:PATH=<br>
      LWS_OPENSSL_LIBRARIES:PATH=<br>
      LWS_PLAT_ANDROID:BOOL=OFF<br>
      LWS_PLAT_FREERTOS:BOOL=OFF<br>
      LWS_PLAT_OPTEE:BOOL=OFF<br>
      LWS_REPRODUCIBLE:BOOL=ON<br>
      LWS_ROLE_DBUS:BOOL=OFF<br>
      LWS_ROLE_H1:BOOL=ON<br>
      LWS_ROLE_MQTT:BOOL=OFF<br>
      LWS_ROLE_RAW_<a class="moz-txt-link-freetext" href="FILE:BOOL=ON">FILE:BOOL=ON</a><br>
      LWS_ROLE_RAW_PROXY:BOOL=OFF<br>
      LWS_ROLE_<a class="moz-txt-link-freetext" href="WS:BOOL=ON">WS:BOOL=ON</a><br>
      LWS_SQLITE3_INCLUDE_DIRS:PATH=<br>
      LWS_SQLITE3_LIBRARIES:PATH=<br>
      LWS_SSL_CLIENT_USE_OS_CA_CERTS:BOOL=ON<br>
      LWS_SSL_SERVER_WITH_ECDH_CERT:BOOL=OFF<br>
      LWS_STATIC_PIC:BOOL=OFF<br>
      LWS_UNIX_SOCK:BOOL=ON<br>
      LWS_WITHOUT_BUILTIN_GETIFADDRS:BOOL=OFF<br>
      LWS_WITHOUT_BUILTIN_SHA1:BOOL=OFF<br>
      LWS_WITHOUT_CLIENT:BOOL=OFF<br>
      LWS_WITHOUT_DAEMONIZE:BOOL=ON<br>
      LWS_WITHOUT_EXTENSIONS:BOOL=ON<br>
      LWS_WITHOUT_SERVER:BOOL=OFF<br>
      LWS_WITHOUT_TESTAPPS:BOOL=OFF<br>
      LWS_WITHOUT_TEST_CLIENT:BOOL=OFF<br>
      LWS_WITHOUT_TEST_PING:BOOL=OFF<br>
      LWS_WITHOUT_TEST_SERVER:BOOL=OFF<br>
      LWS_WITHOUT_TEST_SERVER_EXTPOLL:BOOL=OFF<br>
      LWS_WITH_ACCESS_LOG:BOOL=OFF<br>
      LWS_WITH_ACME:BOOL=OFF<br>
      LWS_WITH_ALSA:BOOL=OFF<br>
      LWS_WITH_ASAN:BOOL=OFF<br>
      LWS_WITH_BORINGSSL:BOOL=OFF<br>
      LWS_WITH_BUNDLED_ZLIB:BOOL=OFF<br>
      LWS_WITH_CGI:BOOL=OFF<br>
      LWS_WITH_CUSTOM_HEADERS:BOOL=ON<br>
      LWS_WITH_CYASSL:BOOL=OFF<br>
      LWS_WITH_DEPRECATED_THINGS:BOOL=OFF<br>
      LWS_WITH_DETAILED_LATENCY:BOOL=OFF<br>
      LWS_WITH_DIR:BOOL=ON<br>
      LWS_WITH_DISKCACHE:BOOL=OFF<br>
      LWS_WITH_DISTRO_RECOMMENDED:BOOL=OFF<br>
      LWS_WITH_DRIVERS:BOOL=OFF<br>
      LWS_WITH_ESP32:BOOL=OFF<br>
      LWS_WITH_EVLIB_PLUGINS:BOOL=ON<br>
      LWS_WITH_EXPORT_LWSTARGETS:BOOL=ON<br>
      LWS_WITH_EXTERNAL_POLL:BOOL=OFF<br>
      LWS_WITH_FANALYZER:BOOL=OFF<br>
      LWS_WITH_FILE_OPS:BOOL=ON<br>
      LWS_WITH_FSMOUNT:BOOL=OFF<br>
      LWS_WITH_FTS:BOOL=OFF<br>
      LWS_WITH_GCOV:BOOL=OFF<br>
      LWS_WITH_GENCRYPTO:BOOL=OFF<br>
      LWS_WITH_GLIB:BOOL=OFF<br>
      LWS_WITH_GTK:BOOL=OFF<br>
      LWS_WITH_HTTP2:BOOL=ON<br>
      LWS_WITH_HTTP_BASIC_AUTH:BOOL=ON<br>
      LWS_WITH_HTTP_BROTLI:BOOL=OFF<br>
      LWS_WITH_HTTP_PROXY:BOOL=OFF<br>
      LWS_WITH_HTTP_STREAM_COMPRESSION:BOOL=OFF<br>
      LWS_WITH_HTTP_UNCOMMON_HEADERS:BOOL=ON<br>
      LWS_WITH_HUBBUB:BOOL=OFF<br>
      LWS_WITH_JOSE:BOOL=OFF<br>
      LWS_WITH_LEJP:BOOL=ON<br>
      LWS_WITH_LEJP_CONF:BOOL=ON<br>
      LWS_WITH_LIBEV:BOOL=OFF<br>
      LWS_WITH_LIBEVENT:BOOL=OFF<br>
      LWS_WITH_LIBUV:BOOL=OFF<br>
      LWS_WITH_LWSAC:BOOL=ON<br>
      LWS_WITH_LWSWS:BOOL=OFF<br>
      LWS_WITH_LWS_DSH:BOOL=OFF<br>
      LWS_WITH_MBEDTLS:BOOL=OFF<br>
      LWS_WITH_MINIMAL_EXAMPLES:BOOL=OFF<br>
      LWS_WITH_MINIZ:BOOL=OFF<br>
      LWS_WITH_NETWORK:BOOL=ON<br>
      LWS_WITH_NO_LOGS:BOOL=OFF<br>
      LWS_WITH_PEER_LIMITS:BOOL=OFF<br>
      LWS_WITH_PLUGINS:BOOL=OFF<br>
      LWS_WITH_PLUGINS_API:BOOL=OFF<br>
      LWS_WITH_RANGES:BOOL=OFF<br>
      LWS_WITH_SECURE_STREAMS:BOOL=OFF<br>
      LWS_WITH_SECURE_STREAMS_PROXY_API:BOOL=OFF<br>
      LWS_WITH_SECURE_STREAMS_STATIC_POLICY_ONLY:BOOL=OFF<br>
      LWS_WITH_SECURE_STREAMS_SYS_AUTH_API_AMAZON_COM:BOOL=OFF<br>
      LWS_WITH_SELFTESTS:BOOL=OFF<br>
      LWS_WITH_SEQUENCER:BOOL=ON<br>
      LWS_WITH_SERVER_STATUS:BOOL=OFF<br>
      LWS_WITH_SHARED:BOOL=ON<br>
      LWS_WITH_SOCKS5:BOOL=OFF<br>
      LWS_WITH_SPAWN:BOOL=OFF<br>
      LWS_WITH_SQLITE3:BOOL=OFF<br>
      LWS_WITH_SSL:BOOL=ON<br>
      LWS_WITH_STATIC:BOOL=ON<br>
      LWS_WITH_STATS:BOOL=OFF<br>
      LWS_WITH_STRUCT_JSON:BOOL=OFF<br>
      LWS_WITH_STRUCT_SQLITE3:BOOL=OFF<br>
      LWS_WITH_SUL_DEBUGGING:BOOL=OFF<br>
      LWS_WITH_SYS_ASYNC_DNS:BOOL=OFF<br>
      LWS_WITH_SYS_DHCP_CLIENT:BOOL=OFF<br>
      LWS_WITH_SYS_NTPCLIENT:BOOL=OFF<br>
      LWS_WITH_SYS_SMD:BOOL=ON<br>
      LWS_WITH_SYS_STATE:BOOL=ON<br>
      LWS_WITH_THREADPOOL:BOOL=OFF<br>
      LWS_WITH_UDP:BOOL=ON<br>
      LWS_WITH_WOLFSSL:BOOL=OFF<br>
      LWS_WITH_ZIP_FOPS:BOOL=OFF<br>
      LWS_WITH_ZLIB:BOOL=OFF<br>
      LWS_WOLFSSL_INCLUDE_DIRS:PATH=<br>
      LWS_WOLFSSL_LIBRARIES:PATH=<br>
      LWS_ZLIB_INCLUDE_DIRS:PATH=<br>
      LWS_ZLIB_LIBRARIES:PATH=<br>
      <br>
    </p>
    <p>Cmake - L  cache values seem also similar between LWS 4.0 and LWS
      4.1. Here below the one of LWS4.0. I highlighted in bold the
      differences:</p>
    <p>LWS_WITH_STATIC = ON<br>
       LWS_WITH_SHARED = ON<br>
       LWS_WITH_SSL = ON (SSL Support)<br>
       LWS_SSL_CLIENT_USE_OS_CA_CERTS = 1<br>
       LWS_WITH_WOLFSSL = OFF (wolfSSL/CyaSSL replacement for OpenSSL)<br>
       LWS_WITH_MBEDTLS = OFF (mbedTLS replacement for OpenSSL)<br>
       LWS_WITHOUT_BUILTIN_SHA1 = OFF<br>
       LWS_WITHOUT_BUILTIN_GETIFADDRS = OFF<br>
       LWS_WITHOUT_CLIENT = OFF<br>
       LWS_WITHOUT_SERVER = OFF<br>
       LWS_LINK_TESTAPPS_DYNAMIC = OFF<br>
       LWS_WITHOUT_TESTAPPS = OFF<br>
       LWS_WITHOUT_TEST_SERVER = OFF<br>
       LWS_WITHOUT_TEST_SERVER_EXTPOLL = OFF<br>
       LWS_WITHOUT_TEST_PING = OFF<br>
       LWS_WITHOUT_TEST_CLIENT = OFF<br>
       LWS_WITHOUT_EXTENSIONS = ON<br>
       LWS_WITHOUT_DAEMONIZE = ON<br>
       LWS_WITH_LIBEV = OFF<br>
       LWS_WITH_LIBUV = OFF<br>
       LWS_WITH_LIBEVENT = OFF<br>
       LWS_WITH_GLIB = OFF<br>
       LWS_IPV6 = OFF<br>
      <b> </b><b>LWS_UNIX_SOCK</b><b> = OFF</b><br>
       LWS_WITH_HTTP2 = 1<br>
       LWS_ROLE_MQTT = OFF<br>
       LWS_SSL_SERVER_WITH_ECDH_CERT = OFF<br>
       LWS_MAX_SMP = 1<br>
      <b> LWS_HAVE_PTHREAD_H = 1</b><br>
       LWS_WITH_CGI = OFF<br>
      <b> LWS_HAVE_OPENSSL_ECDH_H = 1</b><b><br>
      </b><b> LWS_HAVE_SSL_CTX_set1_param = 1</b><br>
      <b> LWS_HAVE_RSA_SET0_KEY = 1</b><br>
       LWS_WITH_HTTP_PROXY = OFF<br>
       LIBHUBBUB_LIBRARIES = <br>
       PLUGINS = <br>
       LWS_WITH_ACCESS_LOG = OFF<br>
       LWS_WITH_SERVER_STATUS = OFF<br>
       LWS_WITH_LEJP = ON<br>
       LWS_WITH_LEJP_CONF = ON<br>
      <b> LWS_WITH_GENERIC_SESSIONS = OFF</b><br>
       LWS_STATIC_PIC = OFF<br>
       LWS_WITH_RANGES = OFF<br>
       LWS_PLAT_OPTEE = OFF<br>
       LWS_PLAT_FREERTOS = OFF<br>
       LWS_WITH_ZIP_FOPS = OFF<br>
       LWS_AVOID_SIGPIPE_IGN = OFF<br>
       LWS_WITH_STATS = OFF<br>
       LWS_WITH_SOCKS5 = OFF<br>
      <b> LWS_HAVE_SYS_CAPABILITY_H = </b><b><br>
      </b><b> LWS_HAVE_LIBCAP = </b><br>
       LWS_WITH_PEER_LIMITS = OFF<br>
      <b> LWS_HAVE_ATOLL = 1</b><b><br>
      </b><b> LWS_HAVE__ATOI64 = </b><b><br>
      </b><b> LWS_HAVE_STAT32I64 = </b><b><br>
      </b><b> LWS_HAS_INTPTR_T = 1</b><br>
       LWS_WITH_EXPORT_LWSTARGETS = ON<br>
      <b> LWS_WITH_ABSTRACT = </b><br>
      <br>
      I hope this could help...<br>
    </p>
    <p>Best regards,</p>
    <p>Thomas<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 29/09/2020 14:30, <a class="moz-txt-link-abbreviated" href="mailto:andy@warmcat.com">andy@warmcat.com</a>
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:157E9883-3828-47C3-919A-5B90DC800797@warmcat.com">
      <pre class="moz-quote-pre" wrap="">

On September 29, 2020 12:23:57 PM UTC, <a class="moz-txt-link-rfc2396E" href="mailto:thomas.spitz@hestia-france.com">"thomas.spitz@hestia-france.com"</a> <a class="moz-txt-link-rfc2396E" href="mailto:thomas.spitz@hestia-france.com"><thomas.spitz@hestia-france.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Hello everyone, hello Andy,

Using the same compilation directive, libwebsockets 4.1 stable creates 
lib that is almost ten times bigger than libwebsockets 4.0.
Respectively 
3.1MB instead of 398,2 kB
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Size of the elf is pretty meaningless metric, since debug sections go in there if you build with -g, (on old or newer versions), try -DCMAKE_BUILD_TYPE=RELEASE.

Debug sections don't get loaded into memory with the code and data sections but stay on disk...

-Andy
</pre>
    </blockquote>
    <div class="moz-signature"><br>
    </div>
  </body>
</html>