Package aktualizr is missing dependencies for the following libraries:

When I tried to compile openwrt with package aktualizr, in the installing stage, an error occurs:

Package aktualizr is missing dependencies for the following libraries:
libboost_atomic.so.1.78.0
libboost_chrono.so.1.78.0
libboost_filesystem.so.1.78.0
libboost_log.so.1.78.0
libboost_log_setup.so.1.78.0
libboost_program_options.so.1.78.0
libboost_regex.so.1.78.0
libboost_system.so.1.78.0
libboost_thread.so.1.78.0

And I have add boost to the dependencies. I try two way here:

define Package/${PKG_NAME}
		SECTION:=libs
		CATEGORY:=Libraries
		TITLE:=aktualizr
		DEPENDS:=+asn1c +libpsl +libcurl +libsodium +ostree +libarchive +libcrypto +libsqlite3  

and

define Package/${PKG_NAME}
		SECTION:=libs
		CATEGORY:=Libraries
		TITLE:=aktualizr
		DEPENDS:=+asn1c +libpsl +libcurl +libsodium +ostree +libarchive +libcrypto +libsqlite3  +libboost_atomic +libboost_chrono +libboost_filesystem +libboost_log +libboost_log_setup +libboost_program_options +libboost_regex +libboost_system +libboost_thread

Neither of them works. The version of my openwrt is 22.03, and there is only boost in my menuconfig.


image
It seems I only need to add boost to the dependencies list. And here is my full Makefile:

include $(TOPDIR)/rules.mk

# Name, version and release number
# The name and version of your package are used to define the variable to point to the build directory of your package: $(PKG_BUILD_DIR)
PKG_NAME:=aktualizr
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/advancedtelematic/aktualizr.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_VERSION:=2020.10

PKG_BUILD_DIR:=$(BUILD_DIR)/${PKG_NAME}
CMAKE_BINARY_SUBDIR:=build

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/${PKG_NAME}
		SECTION:=libs
		CATEGORY:=Libraries
		TITLE:=aktualizr
		DEPENDS:=+asn1c +libpsl +libcurl +libsodium +ostree +libarchive +libcrypto +libsqlite3  +boost
endef

define Package/${PKG_NAME}/description
		This is a FOTA client for embedded systems. It can be used to update the software on a device over-the-air.
endef

define Package/${PKG_NAME}/install
		$(INSTALL_DIR) $(1)/usr/bin
		$(INSTALL_BIN) $(PKG_BUILD_DIR)/ipkg-install/usr/bin/aktualizr ${1}/usr/bin
		$(INSTALL_DIR) $(1)/usr/lib
		$(CP) $(PKG_BUILD_DIR)/ipkg-install/usr/lib/libaktualizr.so ${1}/usr/lib
endef

CMAKE_OPTIONS += \
		-DCMAKE_BUILD_TYPE=Debug \
		-DCMAKE_BUILD_OSTREE=ON \
		-DCMAKE_BUILD_P11=ON

$(eval $(call BuildPackage,${PKG_NAME}))

Related topic: Problem with building a cmake based package using custom way

I have selected these dependencies in menuconfig.

You need to add all the necessary packages in the "DEPENDS" line, so the buildsystem-check knows about them.
With the "+" before the name you automatically select the needed packages when your package gets selected, otherwise your package will only become visible when all depencencies are enabled manually.

Hi, tl71. I have tried to add the packages the error mentioned to the "DEPENDS", as you can see here:

define Package/${PKG_NAME}
		SECTION:=libs
		CATEGORY:=Libraries
		TITLE:=aktualizr
		DEPENDS:=+asn1c +libpsl +libcurl +libsodium +ostree +libarchive +libcrypto +libsqlite3  +libboost_atomic +libboost_chrono +libboost_filesystem +libboost_log +libboost_log_setup +libboost_program_options +libboost_regex +libboost_system +libboost_thread

But still it doesn't work.

It turns out that I need to append these sublibraries in this way: +boost-atomic, instead of +libboost_atomic.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.