stargieg / bacnet-feed

OpenWRT SDK feed for bacnet server, client and routing apps with luci frontend for configuration and monitoring alarms
5 stars 1 forks source link

libwebsockets issue when trying to build for a Teltonika RUT906 #3

Open conalllaverty opened 1 day ago

conalllaverty commented 1 day ago

Hi, Getting the error below when trying to build for a Teltonika RUT906 (see SDK here https://wiki.teltonika-networks.com/view/Software_Development_Kit).

I've tried using both Ubuntu 22 and 24.

make[2]: Entering directory '/home/ubuntu/rutos-ramips-rut9m-sdk/feeds/bacnet/bacnet-stack'
rm -f /home/ubuntu/rutos-ramips-rut9m-sdk/build_dir/target-mipsel_24kc_musl/bacnet-stack-1.3.8/.configured_*
rm -f /home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/target-mipsel_24kc_musl/stamp/.bacnet-stack_installed
mkdir -p /home/ubuntu/rutos-ramips-rut9m-sdk/build_dir/target-mipsel_24kc_musl/bacnet-stack-1.3.8
(cd /home/ubuntu/rutos-ramips-rut9m-sdk/build_dir/target-mipsel_24kc_musl/bacnet-stack-1.3.8; CFLAGS="-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/ubuntu/rutos-ramips-rut9m-sdk/build_dir/target-mipsel_24kc_musl/bacnet-stack-1.3.8=bacnet-stack-1.3.8 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -DRUT9M_PLATFORM=1 -DTLT_PLATFORM_NAME=RUT9M" CXXFLAGS="-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/ubuntu/rutos-ramips-rut9m-sdk/build_dir/target-mipsel_24kc_musl/bacnet-stack-1.3.8=bacnet-stack-1.3.8 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -mips16 -minterlink-mips16 " LDFLAGS="-L/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/lib -L/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -Wl,-rpath-link,/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -znow -zrelro " cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=mipsel -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_C_COMPILER_LAUNCHER="" -DCMAKE_C_COMPILER="/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-gcc" -DCMAKE_CXX_COMPILER_LAUNCHER="" -DCMAKE_CXX_COMPILER="/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-g++" -DCMAKE_ASM_COMPILER_LAUNCHER="" -DCMAKE_ASM_COMPILER="/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-gcc" -DCMAKE_EXE_LINKER_FLAGS:STRING="-L/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/lib -L/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -Wl,-rpath-link,/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -znow -zrelro" -DCMAKE_MODULE_LINKER_FLAGS:STRING="-L/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/lib -L/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -Wl,-rpath-link,/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -znow -zrelro -Wl,-Bsymbolic-functions" -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/lib -L/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -Wl,-rpath-link,/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -znow -zrelro -Wl,-Bsymbolic-functions" -DCMAKE_AR="/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-gcc-ar" -DCMAKE_NM="/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-gcc-nm" -DCMAKE_RANLIB="/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-gcc-ranlib" -DCMAKE_FIND_ROOT_PATH="/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/target-mipsel_24kc_musl/usr;/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_STRIP=: -DCMAKE_INSTALL_PREFIX=/usr -DDL_LIBRARY=/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/target-mipsel_24kc_musl -DCMAKE_PREFIX_PATH=/home/ubuntu/rutos-ramips-rut9m-sdk/staging_dir/target-mipsel_24kc_musl -DCMAKE_SKIP_RPATH=TRUE -DCMAKE_EXPORT_PACKAGE_REGISTRY=FALSE -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE -DCMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE -DCMAKE_POLICY_DEFAULT_CMP0054=NEW -DBACDL_ARCNET:BOOL=ON -DBACDL_BIP:BOOL=ON -DBACDL_BIP6:BOOL=ON -DBACDL_BSC:BOOL=ON -DBACDL_ETHERNET:BOOL=ON -DBACDL_MSTP:BOOL=ON -DBAC_ROUTING:BOOL=ON -DUCI:BOOL=ON -DSERVER_UCI:BOOL=ON -DBACNET_PROTOCOL_REVISION=24 -DBACNET_STACK_DEPRECATED_DISABLE:BOOL=ON -DCMAKE_BUILD_TYPE="Release" /home/ubuntu/rutos-ramips-rut9m-sdk/build_dir/target-mipsel_24kc_musl/bacnet-stack-1.3.8 )
-- Maximum optimization for speed
CMake Error at CMakeLists.txt:203 (find_package):
  Could not find a package configuration file provided by "libwebsockets"
  with any of the following names:

    libwebsocketsConfig.cmake
    libwebsockets-config.cmake

  Add the installation prefix of "libwebsockets" to CMAKE_PREFIX_PATH or set
  "libwebsockets_DIR" to a directory containing one of the above files.  If
  "libwebsockets" provides a separate development package or SDK, be sure it
  has been installed.

-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/rutos-ramips-rut9m-sdk/build_dir/target-mipsel_24kc_musl/bacnet-stack-1.3.8/CMakeFiles/CMakeOutput.log".
make[2]: *** [Makefile:256: /home/ubuntu/rutos-ramips-rut9m-sdk/build_dir/target-mipsel_24kc_musl/bacnet-stack-1.3.8/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
make[2]: Leaving directory '/home/ubuntu/rutos-ramips-rut9m-sdk/feeds/bacnet/bacnet-stack'
time: package/feeds/bacnet/bacnet-stack/compile#0.19#0.15#0.32
    ERROR: package/feeds/bacnet/bacnet-stack failed to build.
make[1]: *** [package/Makefile:128: package/feeds/bacnet/bacnet-stack/compile] Error 1
make[1]: Leaving directory '/home/ubuntu/rutos-ramips-rut9m-sdk'
make: *** [/home/ubuntu/rutos-ramips-rut9m-sdk/include/toplevel.mk:249: package/feeds/bacnet/bacnet-stack/compile] Error 2
stargieg commented 1 day ago

libcap and libmbedtls is missing in the rut sdk. Please ask the Teltonika to fix it.

I make a option to build with out BacnetSC that depends on libwebsockets.

#rutos-ramips-rut9m-sdk$ scripts/feeds install -p packages libwebsockets
Installing package 'libwebsockets' from packages
WARNING: Not overriding core package 'libcap'; use -f to force
WARNING: Not overriding core package 'libcap'; use -f to force
WARNING: No feed for package 'libmbedtls' found
WARNING: Not overriding core package 'libcap'; use -f to force
conalllaverty commented 1 day ago

Ok. I will ask them.

Guessing I could just use the version from https://git.openwrt.org/openwrt/openwrt.git and build against that instead?

On Tue, 12 Nov 2024 at 14:32, Patrick Grimm @.***> wrote:

libcap and libmbedtls is missing in the rut sdk. Please ask the Teltonika to fix it.

I make a option to build with out BacnetSC that depends on libwebsockets.

rutos-ramips-rut9m-sdk$ scripts/feeds install -p packages libwebsockets

Installing package 'libwebsockets' from packages WARNING: Not overriding core package 'libcap'; use -f to force WARNING: Not overriding core package 'libcap'; use -f to force WARNING: No feed for package 'libmbedtls' found WARNING: Not overriding core package 'libcap'; use -f to force

— Reply to this email directly, view it on GitHub https://github.com/stargieg/bacnet-feed/issues/3#issuecomment-2470693944, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPHXH3E2YMYGCFDZKBX3432AIGOXAVCNFSM6AAAAABRUBQMLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZQGY4TGOJUGQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Conall Laverty Founder & CEO at Wia http://www.wia.io

Follow us on Twitter at @wiaio http://twitter.com/wiaio

CONFIDENTIALITY The contents of this email message and any attachments are intended solely for the named recipient(s) and may contain confidential and/or privileged information. If you have received it in error, please notify us immediately. Do not copy or disclose its contents to any person or body, and delete it from your computer systems.

-- CONFIDENTIALITYThe contents of this email message and any attachments are intended solely for the named recipient(s) and may contain confidential and/or privileged information. If you have received it in error, please notify us immediately. Do not copy or disclose its contents to any person or body, and delete it from your computer systems.

stargieg commented 1 day ago

That dosent work. teltonika use openssl and has wipe out mbedtls from the sdk. Orig: https://github.com/openwrt/openwrt/tree/openwrt-21.02/package/libs/mbedtls

rutos-ramips-rut9m-sdk$ ls package/libs/mbedtls
ls: cannot access 'package/libs/mbedtls': No such file or directory
conalllaverty commented 1 day ago

Ok. Is there anything I can do while I wait for them to add it to the SDK?

stargieg commented 1 day ago

you can try force install

scripts/feeds install -f -p packages libwebsockets
echo 'CONFIG_PACKAGE_libwebsockets-full=m' >> .config