[Libwebsockets] Openssl is too old to support lws_tls_vhost_cert_info

Kyle Dias kyledias at vurbox.com
Fri Mar 4 05:06:24 CET 2022


Hi Andy,

I have since tried everything. After nuking
build/CMakeFiles/CMakeError.log, I also tried on a fresh Ubuntu install on
a VM and same Error it could not find the openssl files:
/include/libwebsockets/lws-genhash.h:85:18: error: field ‘ctx’ has
incomplete type
   85 |         HMAC_CTX ctx;
      |                  ^~~

Maybe I am building openssl incorrectly? But I don't see how. It is failing
including when it is looking in the correct directory.

This is my process if I am doing something incorrect (Building for armv7l):

   - Built openssl for linux-generic32 && install into
   /media/diask5/NVMe/Cross_Builds/cross-root-generic32
   - Cloned libwebsockets master
   - cd into libwebsockets
   - mkdir armv7l
   - cmake .. -DLWS_WITHOUT_EXTENSIONS=1 -DLWS_WITH_SHARED=OFF
   -DLWS_WITH_ZIP_FOPS=OFF -DLWS_WITH_ZLIB=OFF -DLWS_WITH_SSL=ON
   -DLWS_OPENSSL_LIBRARIES="/media/diask5/NVMe/Cross_Builds/cross-root-generic32/usr/local/lib/libssl.a;/media/diask5/NVMe/Cross_Builds/cross-root-generic32/usr/local/lib/libcrypto.a"
   -DLWS_OPENSSL_INCLUDE_DIRS='/media/diask5/NVMe/Cross_Builds/cross-root-generic32/usr/local/include'
   -DCMAKE_TOOLCHAIN_FILE='/media/diask5/NVMe/Test_Builds/Test_Scripts/WebSockets_Test_Scripts/libwebsockets/contrib/cross-arm-linux-gnueabihf.cmake'
   - make

I have tried everything I could think of. I don't know why I cannot build
for 32bit arm. Maybe my cmake file (attached) is incorrect? Or could it be
something in the CMakeLists.txt, but from looking at it I don't think so?
Are there any prebuilt libwebsocket libraries available for 32 bit arm?

-Kyle



On Wed, Mar 2, 2022 at 1:04 AM Andy Green <andy at warmcat.com> wrote:

>
>
> On 3/2/22 05:52, Kyle Dias wrote:
> >     Is that disk really mounted at "/media/di**a**sk5/..." ?  Seems so.
> >
> >
> > Yes when installed made it an external linux drive when prompted and
> > Ubuntu mounted it there.
> >
> >     Does
> >
>  /media/diask5/NVMe/Cross_Builds/cross-root-generic32/usr/local/include/openssl/ecdh.h
> >     exist on the disk?
> >
> >
> > Screenshot from 2022-03-02 00-36-59.png
> >
> > When I vim however it only shows this but other files are full.
> >   /*
> >   * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
> >   *
> >   * Licensed under the OpenSSL license (the "License").  You may not use
> >   * this file except in compliance with the License.  You can obtain a
> copy
> >   * in the file LICENSE in the source distribution or at
> >   * https://www.openssl.org/source/license.html
> > <https://www.openssl.org/source/license.html>
> >   */
> >
> > #include <openssl/ec.h>
>
> I think it's OK.
>
> >     The toolchain files I provide are just whatever worked for me in my
> >     situation, you need to adapt them for your situation.  That one
> seems to
> >     want something like
> >
> >     set(CROSS_PATH /media/diask5/NVMe/Cross_Builds/cross-root-generic32)
> >
> >     in your case, and set(CMAKE_C[XX]_COMPILER to whereever that lives.
> >
> >
> > I did this if this is wrong? will look in usr/bin
> >
> > set(CMAKE_C_COMPILER "arm-linux-gnueabihf-gcc")
> > set(CMAKE_CXX_COMPILER "arm-linux-gnueabihf-g++")
>
> No I think those are OK, or it would fail noisily.
>
> It thinks it did find openssl in your cross-root, I guess all this must
> be okay.
>
> Delete build/CMakeFiles/CMakeError.log, rebuild and look in that file
> for what happened when cmake tried to test for, eg, HMAC_CTX_new.
>
> -Andy
>
> > -Kyle
>


-- 
Kyle Dias
CEO & Founder
kyledias at vurbox.com



VurBox Inc.
Suite 201, 1300 Cornwall Rd. Oakville, ON | L6J 7W5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20220303/f7a93677/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross-arm-linux-gnueabihf.cmake
Type: text/x-cmake
Size: 2227 bytes
Desc: not available
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20220303/f7a93677/attachment.bin>


More information about the Libwebsockets mailing list