Closed SantosLV closed 1 year ago
Hi @SantosLV, thank you for reporting the issue. It might be due to setting boringssl to true as seen in here.
You might want to pass
-DLWS_WITH_BORINGSSL=OFF
to turn it off or change the CMakeLists file to turn it off explicitly.
It is little weird that it didn't work with boring ssl though, would you be able to share the command you have used to build? Does it resemble something like
cmake -S . -B build -DLWS_OPENSSL_LIBRARIES="<boringssl_-ocation>/libssl.a;<boringssl-location>/libcrypto.a" -DLWS_OPENSSL_INCLUDE_DIRS=<ssl-header-location> -DCMAKE_TOOLCHAIN_FILE="./cmake/toolchains/LinuxClang.cmake"
?
We'll update the documentation as well to explicitly state this.
Yeap,
the command I used was
cmake -S . -B build -DLWS_OPENSSL_LIBRARIES="boringssl/build/ssl/libssl.a;boringssl/build/crypto/libcrypto.a" -DLWS_OPENSSL_INCLUDE_DIRS=boringssl/include/openssl -DCMAKE_TOOLCHAIN_FILE="./cmake/toolchains/LinuxClang.cmake"
and I get the same errors.
Also-DLWS_WITH_BORINGSSL=OFF
does not solve the issue.
What solves the issue for me was when I disable the option in CMakeLists.txt.
Thanks for your support @hokyungh .
Hi glad changing the CMakeLists solved the issue. For DLWS_OPENSSL_INCLUDE_DIRS
could you pass boringssl/include/
? without openssl
Yeap, boringssl/include/
, solves the issue.
But then I got a linking error:
Linking C shared library libwebsockets.so
/usr/bin/ld: boringssl/build/crypto/libcrypto.a(bcm.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Would you be able to provide OS/version you are running and how you installed boringssl? As seen in the demo, we directly uses boringssl from webRTC built artifacts.
I am using Ubuntu 20.04.5 LTS. As for boringssl, I clone it from here https://github.com/google/boringssl
That's very interesting. Could you add -fPIC
flag when building boringssl or use the one from WebRTC as described in the demo?
Adding -fPIC flag solves the issue!! :)
Thanks for your support!!
cool glad it worked! Will close the issue. Feel free to open issues if you experience any problem.
Hi guys,
I am getting the following compilation errors:
I am on Linux x86_64 machine running Ubuntu 20.04.5 LTS. Both libssl and libcrypto are from Ubuntu repos.
However, I am able to build the sdk without any issue if I disable the following option:
#define LWS_WITH_BORINGSSL -> in file lws_config.h line 145
I even tried to use BoringSSL, but I get the same results.
Is this behaviour expected, or is something that I am missing? Some missing configuration? Is there any issue if I use the sdk with
#define LWS_WITH_BORINGSSL
disabled?Thanks