I'm trying to cross compile libwebsockets for arm. I put OpenSSL and Zlib path in CMakefiles.txt.
But after command "make", it makes error.
OpenSSL and Zlib path setting in CMakefiles.txt
SET(ZLIB_INCLUDE_DIR /home/jacob/Workspace/lib/zlib/include)
SET(ZLIB_LIBRARY /home/jacob/Workspace/lib/zlib/lib/libz.so)
set(OPENSSL_ROOT_DIR /home/jacob/Workspace/lib/openssl/)
set(OPENSSL_CRYPTO_LIBRARY /home/jacob/Workspace/lib/openssl/lib/libcrypto.so)
set(OPENSSL_INCLUDE_DIR /home/jacob/Workspace/lib/openssl/include/)
set(OPENSSL_LIBRARIES /home/jacob/Workspace/lib/openssl/lib/)
set(OPENSSL_SSL_LIBRARY /home/jacob/Workspace/lib/openssl/lib/libssl.so)
The error when I enter "make" command
jacob@ubuntu:~/Workspace/Github/libwebsockets/build$ make
Scanning dependencies of target GENHDR
[ 1%] Creating build include dir
[ 1%] Built target GENHDR
Scanning dependencies of target websockets
[ 2%] Building C object lib/CMakeFiles/websockets.dir/plat/unix/unix-caps.c.o
In file included from /home/jacob/Workspace/Github/libwebsockets/include/libwebsockets.h:632,
from /home/jacob/Workspace/Github/libwebsockets/lib/core/./private-lib-core.h:140,
from /home/jacob/Workspace/Github/libwebsockets/lib/plat/unix/unix-caps.c:28:
/home/jacob/Workspace/Github/libwebsockets/include/libwebsockets/lws-genhash.h:85:18: error: field ‘ctx’ has incomplete type
85 | HMAC_CTX ctx;
| ^~~
lib/CMakeFiles/websockets.dir/build.make:62: recipe for target 'lib/CMakeFiles/websockets.dir/plat/unix/unix-caps.c.o' failed
make[2]: *** [lib/CMakeFiles/websockets.dir/plat/unix/unix-caps.c.o] Error 1
CMakeFiles/Makefile2:1068: recipe for target 'lib/CMakeFiles/websockets.dir/all' failed
make[1]: *** [lib/CMakeFiles/websockets.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…