Failed to add host in db47 package

make[2]: Entering directory '/home/open/armsr/feeds/packages/libs/db47'
. /home/open/armsr/include/shell.sh; /home/open/armsr/staging_dir/host/bin/libdeflate-gzip -dc /home/open/armsr/dl/db-4.7.25.NC.tar.gz | tar -C /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/* /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC
Applying ./patches/010-patch.4.7.25.1.patch using plaintext:
File sequence/sequence.c is read-only; trying to patch anyway
patching file sequence/sequence.c
Applying ./patches/020-patch.4.7.25.2.patch using plaintext:
File lock/lock.c is read-only; trying to patch anyway
patching file lock/lock.c
Applying ./patches/030-patch.4.7.25.3.patch using plaintext:
File lock/lock_deadlock.c is read-only; trying to patch anyway
patching file lock/lock_deadlock.c
Applying ./patches/040-patch.4.7.25.4.patch using plaintext:
File dbinc/repmgr.h is read-only; trying to patch anyway
patching file dbinc/repmgr.h
File rep/rep_elect.c is read-only; trying to patch anyway
patching file rep/rep_elect.c
File repmgr/repmgr_net.c is read-only; trying to patch anyway
patching file repmgr/repmgr_net.c
Applying ./patches/100-repmgr-format-security.patch using plaintext:
File repmgr/repmgr_net.c is read-only; trying to patch anyway
patching file repmgr/repmgr_net.c
touch /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC/.prepared9c3fe1519e15a15992b30beb1b3facc8_6664517399ebbbc92a37c5bb081b5c53
(cd /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC; rm -f aclocal.m4; if [ -f build_unix/configure.ac ] || [ -f build_unix/configure.in ]; then [ -d build_unix/autom4te.cache ] && rm -rf build_unix/autom4te.cache; [ -e build_unix/config.rpath ] || ln -s /home/open/armsr/scripts/config.rpath build_unix/config.rpath; touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; AUTOM4TE=/home/open/armsr/staging_dir/host/bin/autom4te AUTOCONF=/home/open/armsr/staging_dir/host/bin/autoconf AUTOMAKE=/home/open/armsr/staging_dir/host/bin/automake ACLOCAL=/home/open/armsr/staging_dir/host/bin/aclocal AUTOHEADER=/home/open/armsr/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/open/armsr/staging_dir/host/bin/libtoolize LIBTOOL=/home/open/armsr/staging_dir/host/bin/libtool M4=/home/open/armsr/staging_dir/host/bin/m4 AUTOPOINT=true GTKDOCIZE=true LIBTOOLIZE='/home/open/armsr/staging_dir/host/bin/libtoolize --install' /home/open/armsr/staging_dir/host/bin/autoreconf -v -f -i -s -B /home/open/armsr/staging_dir/host/share/aclocal -I m4 -I . -I build_unix build_unix || true; fi; );
(cd /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC/; if [ -x configure ]; then cp -fpR /home/open/armsr/scripts/config.{guess,sub} /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC// && CC="gcc" CFLAGS="-O2 -I/home/open/armsr/staging_dir/host/include -I/home/open/armsr/staging_dir/hostpkg/include
-I/home/open/armsr/staging_dir/target-aarch64_generic_musl/host/include" CXX="g++" CPPFLAGS="-I/home/open/armsr/staging_dir/host/include -I/home/open/armsr/staging_dir/hostpkg/include -I/home/open/armsr/staging_dir/target-aarch64_generic_musl/host/include" CXXFLAGS="" LDFLAGS="-L/home/open/armsr/staging_dir/host/lib -L/home/open/armsr/staging_dir/hostpkg/lib -L/home/open/armsr/staging_dir/target-aarch64_generic_musl/host/lib" CONFIG_SHELL="/usr/bin/env bash"  ../dist/configure --target=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-dependency-tracking --program-prefix="" --program-suffix="" --prefix=/home/open/armsr/staging_dir/hostpkg --exec-prefix=/home/open/armsr/staging_dir/hostpkg --sysconfdir=/home/open/armsr/staging_dir/hostpkg/etc --localstatedir=/home/open/armsr/staging_dir/hostpkg/var --sbindir=/home/open/armsr/staging_dir/hostpkg/bin --enable-shared --enable-static --disable-java --disable-tcl --disable-rpc --enable-compat185 --disable-debug ; fi )
touch /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC/.configured
make  -C /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC/build_unix
make[3]: Entering directory '/home/open/armsr/build_dir/hostpkg/db-4.7.25.NC/build_unix'
make[3]: *** No targets specified and no makefile found.  Stop.
make[3]: Leaving directory '/home/open/armsr/build_dir/hostpkg/db-4.7.25.NC/build_unix'
make[2]: *** [Makefile:125: /home/open/armsr/build_dir/hostpkg/db-4.7.25.NC/.built] Error 2
make[2]: Leaving directory '/home/open/armsr/feeds/packages/libs/db47'
time: package/feeds/packages/db47/host-compile#0.48#0.46#0.90
    ERROR: package/feeds/packages/db47 [host] failed to build.
#
# Copyright (C) 2009-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

BASE_VERSION:=4.7.25

PKG_NAME:=db47
PKG_VERSION:=$(BASE_VERSION).4.NC
PKG_RELEASE:=7

HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/db-$(BASE_VERSION).NC
PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(BASE_VERSION).NC
PKG_SOURCE:=db-$(BASE_VERSION).NC.tar.gz
PKG_SOURCE_URL:=http://download.oracle.com/berkeley-db/
PKG_HASH:=cd39c711023ff44c01d3c8ff0323eef7318660772b24f287556e6bf676a12535

PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
PKG_LICENSE:=Sleepycat
PKG_LICENSE_FILES:=LICENSE

HOST_BUILD_DEPENDS:=libxml2/host
PKG_BUILD_DEPENDS:=libxml2

PKG_FIXUP:=autoreconf

HOST_LIBTOOL_PATHS:=. build_unix
PKG_LIBTOOL_PATHS:=. build_unix

HOST_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk

define Package/libdb47
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=Berkeley DB library (4.7)
  URL:=http://www.oracle.com/us/products/database/berkeley-db
  PROVIDES:=libdb47-full
endef

define Package/libdb47/description
  Berkeley DB library (4.7).
endef

define Package/libdb47xx
  SECTION:=libs
  CATEGORY:=Libraries
  DEPENDS:=+libdb47 +libstdcpp
  TITLE:=Berkeley DB library (4.7) for C++
  URL:=http://www.oracle.com/us/products/database/berkeley-db
  PROVIDES:=libdb47xx-full
endef

define Package/libdb47xx/description
  Berkeley DB library (4.7).  C++ wrapper.
endef

HOST_CONFIGURE_PATH = build_unix
HOST_CONFIGURE_CMD = ../dist/configure

HOST_CONFIGURE_ARGS += \
	--enable-shared \
	--enable-static \
	--disable-java \
	--disable-tcl \
	--disable-rpc \
	--enable-compat185 \
	--disable-debug

CONFIGURE_PATH = build_unix
CONFIGURE_CMD = ../dist/configure

CONFIGURE_ARGS += \
	--enable-shared \
	--enable-static \
	--disable-java \
	--with-mutex=POSIX/pthreads/library \
	--disable-tcl \
	--disable-rpc \
	--enable-compat185 \
	--disable-debug \
	$(if $(CONFIG_PACKAGE_libdb47xx),--enable-cxx,--disable-cxx)

TARGET_CFLAGS += $(FPIC)

define Host/Compile
	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/build_unix
endef

define Build/Compile
	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
		DESTDIR="$(PKG_INSTALL_DIR)" all
	$(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
		DESTDIR="$(PKG_INSTALL_DIR)" install
endef

define Package/libdb47/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
endef

define Package/libdb47xx/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb_cxx-*.so $(1)/usr/lib/
endef

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/include
	$(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
	$(CP) $(PKG_INSTALL_DIR)/usr/include/db_cxx.h $(1)/usr/include/
	$(INSTALL_DIR) $(1)/usr/lib/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
endef

$(eval $(call BuildPackage,libdb47))
$(eval $(call BuildPackage,libdb47xx))
$(eval $(call HostBuild))

Did it actually do anything?

that's not a problem. I managed to create the libdb47 package. the problem is if i add host in db47 package. Can you try the makefile above

maybe this is the problem

HOST_LIBTOOL_PATHS:=. build_unix
HOST_CONFIGURE_PATH = build_unix
HOST_CONFIGURE_CMD = ../dist/configure

because HOST_CONFIGURE_PATH does not exist in host-build.mk, this must be added to host-build.mk. Now I have successfully created db47 as a host

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