Failed to build libwebsockets

Hi everyone,

I’m encountering an issue with using MQTT (mosquitto) on a RUT360 router. The broker works perfectly over the MQTT protocol, but it doesn’t support Websockets, which is necessary if you want to publish messages from a web page.

I edited the /etc/mosquitto/mosquitto.conf file to enable Websockets support, but when I run the command mosquitto -c /etc/mosquitto/mosquitto.conf, I get the following error message:

1724916990: Error: Websockets support not available.
1724916990: Error found at /etc/mosquitto/mosquitto.conf:284.

After searching through several posts, I found recommendations to add the libwebsockets library. Since this library isn’t available via opkg, I decided to recompile the image. I’ve done this before without any issues, so I followed the same process with the following additional steps:

  1. Ran ./scripts/feeds install libwebsockets
  2. Opened make menuconfig, checked the box for libwebsockets-full, and saved the configuration
  3. Ran make

However, during the build process, I encountered the following error:

make[6]: Entering directory '/home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0'
[  0%] Building C object CMakeFiles/websockets_shared.dir/lib/core/alloc.c.o
/home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin/mips-openwrt-linux-musl-gcc -Dwebsockets_shared_EXPORTS -I/home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0/include -I/home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0/plugins -I/home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0 -I/home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0/lib -Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -fvisibility=hidden -Wundef  -O3 -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -fmacro-prefix-map=/home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0=libwebsockets-3.1.0 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -DRUT360_PLATFORM=1 -DTLT_PLATFORM_NAME=RUT360  -DNDEBUG -fPIC -o CMakeFiles/websockets_shared.dir/lib/core/alloc.c.o -c /home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0/lib/core/alloc.c
In file included from /home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0/include/libwebsockets.h:425,
                 from /home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0/lib/core/private.h:134,
                 from /home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0/lib/core/alloc.c:1:
/home/abc/Downloads/RUT36X_R_GPL_00.07.08.2/rutos-ath79-rut36x-sdk/build_dir/target-mips_24kc_musl/libwebsockets-full/libwebsockets-3.1.0/include/libwebsockets/lws-genrsa.h:55:2: error: unknown type name 'RSA'
  RSA *rsa;

I’m not sure how to resolve this issue. Any insights or suggestions would be greatly appreciated!

This topic was automatically closed after 15 days. New replies are no longer allowed.