Skip to contentSkip to conversation

protobuf: fix circular dependency warning

PATCH New spdawson at gmail.com 3 participants 11 messages Jul 13, 2012 – Jul 15, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 protobuf: fix circular dependency warning

From: Simon Dawson <[email protected]>

The protobuf package depends on host-protobuf, which leads to a circular dependency of host-protobuf on host-protobuf. The following warning is output.

make: Circular host-protobuf-depends <- host-protobuf dependency dropped.

This patch breaks the circular dependency, by explictly asserting the dependencies of host-protobuf (currently none).

---
 package/protobuf/protobuf.mk |    1 +
 1 file changed, 1 insertion(+)
package/protobuf/protobuf.mk +1 -0
index f18261e..e0214ed 100644
@@ -9,6 +9,7 @@ PROTOBUF_SITE = http://protobuf.googlecode.com/files/
 
 # N.B. Need to use host protoc during cross compilation.
 PROTOBUF_DEPENDENCIES = host-protobuf
+HOST_PROTOBUF_DEPENDENCIES =
 PROTOBUF_CONF_OPT = --with-protoc=$(HOST_DIR)/usr/bin/protoc
 
 PROTOBUF_INSTALL_STAGING = YES
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 protobuf: fix circular dependency warning

Le Fri, 13 Jul 2012 21:49:12 +0100,
spdawson at gmail.com a ?crit :

Quoted 6 lines

From: Simon Dawson <[email protected]>

The protobuf package depends on host-protobuf, which leads to a circular dependency of host-protobuf on host-protobuf. The following warning is output.

Quoted 6 lines

make: Circular host-protobuf-depends <- host-protobuf dependency dropped.

This patch breaks the circular dependency, by explictly asserting the dependencies of host-protobuf (currently none).

I think
http://lists.busybox.net/pipermail/buildroot/2012-July/055442.html
solves that problem in a much more generic way. Could you test this patch and report if it solves the problem for you?

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 protobuf: fix circular dependency warning

Quoted 4 lines · Thomas Petazzoni

I think
http://lists.busybox.net/pipermail/buildroot/2012-July/055442.html
solves that problem in a much more generic way. Could you test this patch and report if it solves the problem for you?

Hi Thomas. This generic mechanism does indeed work in the present case (package protobuf). However, the indicated patch is only for the gentargets package mechanism; to apply to the protobuf package, a similar modification of pkg-autotargets.mk is required.

I'm happy to do this modification, if you think it appropriate.

Simon.

#3 lore raw

PATCH 1/1 protobuf: fix circular dependency warning

Le Sat, 14 Jul 2012 10:07:06 +0100,
Simon Dawson <[email protected]> a ?crit :

Quoted 6 lines

Hi Thomas. This generic mechanism does indeed work in the present case (package protobuf). However, the indicated patch is only for the gentargets package mechanism; to apply to the protobuf package, a similar modification of pkg-autotargets.mk is required.

I'm happy to do this modification, if you think it appropriate.

Arnout, can you extend your patch to take this into account (including pkg-autotargets and pkg-cmaketargets)? Or if you don't have the time, tell Simon to extend your patch.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH v2 1/6 pkg-infra: remove self-dependency from host packages

When HOST_XXX_DEPENDENCIES are derived automatically from XXX_DEPENDENCIES, a self-dependency is created if host-xxx is a dependency of xxx. This was the case for miniperl.

Filter out the self-dependency.

---
v2:
- Also update pkg-autotargets and pkg-cmaketargets (as suggested by Simon Dawson)

 package/pkg-autotargets.mk  |    2 +-
 package/pkg-cmaketargets.mk |    2 +-
 package/pkg-gentargets.mk   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
package/pkg-autotargets.mk +1 -1
index c9887c2..d31230d 100644
@@ -201,7 +201,7 @@ endef
 # This must be repeated from GENTARGETS_INNER, otherwise we get an empty
 # _DEPENDENCIES if _AUTORECONF is YES.  Also filter the result of _AUTORECONF
 # away from the non-host rule
-$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool,\
+$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool $(1),\
     $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
 
 
package/pkg-cmaketargets.mk +1 -1
index 371ab11..b405df5 100644
@@ -98,7 +98,7 @@ endif
 
 # This must be repeated from GENTARGETS_INNER, otherwise we only get
 # host-cmake in _DEPENDENCIES because of the following line
-$(2)_DEPENDENCIES ?= $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))
+$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
 
 $(2)_DEPENDENCIES += host-cmake
 
package/pkg-gentargets.mk +1 -1
index 1c9b458..5da9cdc 100644
@@ -245,7 +245,7 @@ $(2)_OVERRIDE_SRCDIR = $($(2)_SITE)
 endif
 endif
 
-$(2)_DEPENDENCIES ?= $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))
+$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
 
 $(2)_INSTALL_STAGING		?= NO
 $(2)_INSTALL_IMAGES		?= NO
Signature · 1 line
tg: (830c586..) t/host-no-circular-dep (depends on: master)
#5 lore raw

PATCH 2/6 file: remove redundant HOST_FILE_DEPENDENCIES

---
 package/file/file.mk |    1 -
 1 file changed, 1 deletion(-)
package/file/file.mk +0 -1
index c9846e4..7f07752 100644
@@ -7,7 +7,6 @@
 FILE_VERSION = 5.11
 FILE_SITE = ftp://ftp.astron.com/pub/file
 FILE_DEPENDENCIES = host-file zlib
-HOST_FILE_DEPENDENCIES = host-zlib
 FILE_INSTALL_STAGING = YES
 
 define FILE_UNINSTALL_TARGET_CMDS
Signature · 1 line
tg: (e991c59..) t/host-no-circular-dep-file (depends on: t/host-no-circular-dep)
#6 lore raw

PATCH 3/6 icu: remove redundant HOST_ICU_DEPENDENCIES

In reply to Arnout Vandecappelle (Essensium/Mind)
---
 package/icu/icu.mk |    1 -
 1 file changed, 1 deletion(-)
package/icu/icu.mk +0 -1
index a2c24ca..42416b7 100644
@@ -8,7 +8,6 @@ ICU_VERSION = 4.8.1.1
 ICU_SOURCE = icu4c-$(subst .,_,$(ICU_VERSION))-src.tgz
 ICU_SITE = http://download.icu-project.org/files/icu4c/$(ICU_VERSION)
 ICU_DEPENDENCIES = host-icu
-HOST_ICU_DEPENDENCIES =
 ICU_INSTALL_STAGING = YES
 ICU_CONF_OPT = --with-cross-build=$(HOST_ICU_DIR)/source --disable-samples \
 		--disable-tests
Signature · 1 line
tg: (bd3c98f..) t/host-no-circular-dep-3-icu (depends on: t/host-no-circular-dep-file)
#7 lore raw

PATCH 4/6 libcap: remove redundant HOST_LIBCAP_DEPENDENCIES

In reply to Arnout Vandecappelle (Essensium/Mind)
---
 package/libcap/libcap.mk |    1 -
 1 file changed, 1 deletion(-)
package/libcap/libcap.mk +0 -1
index 4683121..9d6acf2 100644
@@ -10,7 +10,6 @@ LIBCAP_VERSION = 2.22
 LIBCAP_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/libc/libcap2
 LIBCAP_SOURCE = libcap2_$(LIBCAP_VERSION).orig.tar.gz
 LIBCAP_DEPENDENCIES = host-libcap
-HOST_LIBCAP_DEPENDENCIES =
 LIBCAP_INSTALL_STAGING = YES
 
 define LIBCAP_BUILD_CMDS
Signature · 1 line
tg: (a19af6a..) t/host-no-circular-dep-4-libcap (depends on: t/host-no-circular-dep-3-icu)
#8 lore raw

PATCH 5/6 ncurses: remove redundant HOST_NCURSES_DEPENDENCIES

In reply to Arnout Vandecappelle (Essensium/Mind)
---
 package/ncurses/ncurses.mk |    2 --
 1 file changed, 2 deletions(-)
package/ncurses/ncurses.mk +0 -2
index afeb41b..adf18ff 100644
@@ -135,8 +135,6 @@ define HOST_NCURSES_BUILD_CMDS
 	$(MAKE) -C $(@D)/progs tic
 endef
 
-HOST_NCURSES_DEPENDENCIES =
-
 HOST_NCURSES_CONF_OPT = \
 	--without-shared --without-gpm
 
Signature · 1 line
tg: (b41b0de..) t/host-no-circular-dep-5-ncurses (depends on: t/host-no-circular-dep-4-libcap)
#9 lore raw

PATCH 6/6 orc: remove redundant HOST_ORC_DEPENDENCIES

In reply to Arnout Vandecappelle (Essensium/Mind)
---
 package/orc/orc.mk |    1 -
 1 file changed, 1 deletion(-)
package/orc/orc.mk +0 -1
index 6602e36..97c80f2 100644
@@ -7,7 +7,6 @@ ORC_VERSION = 0.4.14
 ORC_SITE = http://code.entropywave.com/download/orc/
 ORC_INSTALL_STAGING = YES
 ORC_DEPENDENCIES = host-orc
-HOST_ORC_DEPENDENCIES =
 
 define ORC_REMOVE_BUGREPORT
 	rm -f $(TARGET_DIR)/usr/bin/orc-bugreport
Signature · 1 line
tg: (a24703b..) t/host-no-circular-dep-6-orc (depends on: t/host-no-circular-dep-5-ncurses)
#10 lore raw

PATCH v2 1/6 pkg-infra: remove self-dependency from host packages

In reply to Arnout Vandecappelle (Essensium/Mind)

Le Sat, 14 Jul 2012 22:31:19 +0200,
"Arnout Vandecappelle (Essensium/Mind)" <[email protected]> a ?crit :

Quoted 7 lines

When HOST_XXX_DEPENDENCIES are derived automatically from XXX_DEPENDENCIES, a self-dependency is created if host-xxx is a dependency of xxx. This was the case for miniperl.

Filter out the self-dependency.

Thanks, applied, as well as the 5 related cleanups in packages.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com