[Libwebsockets] Cross-OpenWrt-makefile - Build Error: Pkg libwebsockets is missing dependencies for the following libraries: libuv.so.1

Andy Green andy at warmcat.com
Tue Aug 9 13:11:50 CEST 2016


On Tue, 2016-08-09 at 11:18 +0200, Seroega Petrov wrote:
> Hello,
> I am trying to build libwebsockets v2.0-stable for openwrt with the
> Cross-OpenWrt-makefile. lws v1.7.5 is building succesfully and the
> ipkg packages are generated.
> I noticed that all Cross-Openwrt-makefiles are the same, no matter
> what version, 1.7.5 or 2.0-stable. So I edited the makefile. Perhaps
> the Problem is here.

The makefile was contributed and the version we got is all we were
given.

> The lib libwebsockets.so is generated and also the examples are
> build, but further the process stops with the failure:
>  
> find /home/seko/carambola/carambola2/build_dir/target-mips_34kc_musl-
> 1.1.14/libwebsockets-2016-07-11/ipkg-ar71xx/libwebsockets -name 'CVS'
> -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
> Package libwebsockets is missing dependencies for the following
> libraries: libuv.so.1

By default, lws doesn't enable any dep on libuv.  So you must be using
a cmake define like LWS_WITH_LIBUV or something else that requires it,
like LWS_WITH_LWSWS.

If that isn't what you think you're doing, make sure you use a fresh
build dir each time, cmake likes to cache previously-used options until
they are explicitly countermanded, which can be confusing.  Blowing
away the build dir and using a fresh one guarantees you're not
suffering from that.

> Makefile:113: recipe for target
> '/home/seko/carambola/carambola2/bin/ar71xx/packages/packages/libwebs
> ockets_2016-07-11-
> f0789545e72da4ec2c54805ce0169718a0092bc0_ar71xx.ipk' failed
>  
> So no ipkg-packages are generated and so on. Any Hints?

Fundamentally it's saying it wants libuv in the crossbuild env.  Either
stop it wanting that if it's unintentional, or provide it.

-Andy

> The lines edited:
> --------------------
> PKG_VERSION:=2016-07-11
> PKG_SOURCE_VERSION:=f0789545e72da4ec2c54805ce0169718a0092bc0
> CMAKE_OPTIONS += -DLWS_WITH_LWSWS=1
> CMAKE_OPTIONS += -DLWS_WITH_PLUGINS=1
> CMAKE_OPTIONS += -DLWS_WITH_LIBUV=1
>  
> Here the complete cross-openwrt-makefile:
> ------------------------------------------------------
> #
> # libwebsockets makefile for openwrt
> #
> include $(TOPDIR)/rules.mk
> PKG_NAME:=libwebsockets
> PKG_VERSION:=2016-07-11
> PKG_RELEASE=$(PKG_SOURCE_VERSION)
> PKG_SOURCE_PROTO:=git
> PKG_SOURCE_URL:=https://github.com/warmcat/libwebsockets.git
> PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
> PKG_SOURCE_VERSION:=f0789545e72da4ec2c54805ce0169718a0092bc0
> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
> CMAKE_INSTALL:=1
> include $(INCLUDE_DIR)/package.mk
> include $(INCLUDE_DIR)/cmake.mk
> CMAKE_OPTIONS += -DLWS_WITH_LWSWS=1
> CMAKE_OPTIONS += -DLWS_WITH_PLUGINS=1
> CMAKE_OPTIONS += -DLWS_WITH_LIBUV=1
> CMAKE_OPTIONS += -DLWS_OPENSSL_CLIENT_CERTS=/etc/ssl/certs
> CMAKE_OPTIONS += -DLWS_OPENSSL_SUPPORT=ON
> CMAKE_OPTIONS += -DLWS_WITH_SSL=ON
> CMAKE_OPTIONS += -DLWS_WITHOUT_TESTAPPS=$(if
> $(CONFIG_PACKAGE_libwebsockets-examples),"OFF","ON")
>  
> # for wolfssl, define these in addition to LWS_OPENSSL_SUPPORT and
> # edit package/libs/wolfssl/Makefile to include --enable-opensslextra
> # CMAKE_OPTIONS += -DLWS_USE_WOLFSSL=ON
> # CMAKE_OPTIONS +=
> -DLWS_WOLFSSL_LIBRARIES=$(STAGING_DIR)/usr/lib/libwolfssl.so
> # CMAKE_OPTIONS +=
> -DLWS_WOLFSSL_INCLUDE_DIRS=$(STAGING_DIR)/usr/include
> # for cyassl, define these in addition to LWS_OPENSSL_SUPPORT and
> # edit package/libs/wolfssl/Makefile to include --enable-opensslextra
> # CMAKE_OPTIONS += -DLWS_USE_CYASSL=ON
> # CMAKE_OPTIONS +=
> -DLWS_CYASSL_LIBRARIES=$(STAGING_DIR)/usr/lib/libcyassl.so
> # CMAKE_OPTIONS +=
> -DLWS_CYASSL_INCLUDE_DIRS=$(STAGING_DIR)/usr/include
> # other options worth noting
>  CMAKE_OPTIONS += -DLWS_WITHOUT_EXTENSIONS=OFF
>  CMAKE_OPTIONS += -DLWS_WITHOUT_DAEMONIZE=OFF
>  CMAKE_OPTIONS += -DLWS_WITHOUT_SERVER=OFF
>  CMAKE_OPTIONS += -DLWS_WITHOUT_DEBUG=OFF
> 
> define Package/libwebsockets/Default
>     SECTION:=libs
>     CATEGORY:=Libraries
>     TITLE:=libwebsockets
>     DEPENDS:=+zlib +libopenssl
> #libc.so
> #libcrypto.so.1.0.0
> #libgcc_s.so.1
> #libssl.so.1.0.0
> #libwebsockets.so
> #libwebsockets.so.4.0.0
> #libz.so
> #libz.so.1
> #libz.so.1.2.8
> endef
> define Package/libwebsockets
>     $(call Package/libwebsockets/Default)
>     TITLE+= (libraries)
> endef
> define Package/libwebsockets/description
>     libwebsockets
>     This package contains libwebsocket libraries
> endef
> define Package/libwebsockets-examples
>     $(call Package/libwebsockets/Default)
>     DEPENDS:=libwebsockets
>     TITLE+= (examples)
> endef
> define Package/libwebsockets-examples/description
>     libwebsockets examples
>     This package contains libwebsockets examples
> endef
> define Package/libwebsockets/install
>     $(INSTALL_DIR) $(1)/usr/lib
>     $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebsockets.so* $(1)/usr/lib/
> endef
> define Package/libwebsockets-examples/install
>     $(INSTALL_DIR) $(1)/usr/bin
>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libwebsockets-test-
> client $(1)/usr/bin/
>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libwebsockets-test-echo 
> $(1)/usr/bin/
>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libwebsockets-test-
> fraggle $(1)/usr/bin/
>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libwebsockets-test-ping 
> $(1)/usr/bin/
>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libwebsockets-test-
> server $(1)/usr/bin/
>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libwebsockets-test-
> server-extpoll $(1)/usr/bin/
>     $(INSTALL_DIR) $(1)/usr/share/libwebsockets-test-server
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libwebsockets-test-
> server/favicon.ico $(1)/usr/share/libwebsockets-test-server/
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libwebsockets-test-
> server/leaf.jpg $(1)/usr/share/libwebsockets-test-server/
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libwebsockets-test-
> server/libwebsockets.org-logo.png $(1)/usr/share/libwebsockets-test-
> server/
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libwebsockets-test-
> server/libwebsockets-test-server.key.pem
> $(1)/usr/share/libwebsockets-test-server/
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libwebsockets-test-
> server/libwebsockets-test-server.pem $(1)/usr/share/libwebsockets-
> test-server/
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libwebsockets-test-
> server/test.html $(1)/usr/share/libwebsockets-test-server/
> endef
> $(eval $(call BuildPackage,libwebsockets))
> $(eval $(call BuildPackage,libwebsockets-examples))
>  
>  
>  
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> http://libwebsockets.org/mailman/listinfo/libwebsockets



More information about the Libwebsockets mailing list