All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: iwj@xenproject.org, anthony.perard@citrix.com, wl@xen.org,
	 dgdegra@tycho.nsa.gov, julien@xen.org,
	Volodymyr_Babchuk@epam.com,  Bertrand.Marquis@arm.com,
	xen-devel@lists.xenproject.org
Subject: Re: arm32 tools/flask build failure
Date: Wed, 16 Dec 2020 17:54:16 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2012161753100.4040@sstabellini-ThinkPad-T480s> (raw)
In-Reply-To: <alpine.DEB.2.21.2012151823480.4040@sstabellini-ThinkPad-T480s>

On Tue, 15 Dec 2020, Stefano Stabellini wrote:
> Hi all,
> 
> I am building Xen tools for ARM32 using qemu-user. I am getting the
> following error building tools/flask. Everything else works fine. It is
> worth noting that make -j1 works fine, it is only make -j4 that fails.
> 
> I played with .NOTPARALLEL but couldn't get it to work. Anyone has any
> ideas?
> 
> Cheers,
> 
> Stefano
> 
> 
> make[2]: Leaving directory '/build/tools/flask/utils'
> make[1]: Leaving directory '/build/tools/flask'
> make[1]: Entering directory '/build/tools/flask'
> /usr/bin/make -C policy all
> make[2]: Entering directory '/build/tools/flask/policy'
> make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
> /build/tools/flask/policy/Makefile.common:115: *** target pattern contains no '%'.  Stop.
> make[2]: Leaving directory '/build/tools/flask/policy'
> make[1]: *** [/build/tools/flask/../../tools/Rules.mk:160: subdir-all-policy] Error 2
> make[1]: Leaving directory '/build/tools/flask'
> make: *** [/build/tools/flask/../../tools/Rules.mk:155: subdirs-all] Error 2


The fix seems to be turning the problematic variable:

POLICY_FILENAME = $(FLASK_BUILD_DIR)/xenpolicy-$(shell $(MAKE) -C $(XEN_ROOT)/xen xenversion --no-print-directory)

into a rule.


diff --git a/tools/flask/policy/Makefile.common b/tools/flask/policy/Makefile.common
index bea5ba4b6a..9a086d8acd 100644
--- a/tools/flask/policy/Makefile.common
+++ b/tools/flask/policy/Makefile.common
@@ -35,7 +35,6 @@ OUTPUT_POLICY ?= $(BEST_POLICY_VER)
 #
 ########################################
 
-POLICY_FILENAME = $(FLASK_BUILD_DIR)/xenpolicy-$(shell $(MAKE) -C $(XEN_ROOT)/xen xenversion --no-print-directory)
 POLICY_LOADPATH = /boot
 
 # List of policy versions supported by the hypervisor
@@ -112,17 +111,19 @@ POLICY_SECTIONS += $(USERS)
 POLICY_SECTIONS += $(ALL_CONSTRAINTS)
 POLICY_SECTIONS += $(ISID_DEFS) $(DEV_OCONS)
 
-all: $(POLICY_FILENAME)
+policy:
 
-install: $(POLICY_FILENAME)
+all: policy
+
+install: policy
 	$(INSTALL_DIR) $(DESTDIR)/$(POLICY_LOADPATH)
 	$(INSTALL_DATA) $^ $(DESTDIR)/$(POLICY_LOADPATH)
 
 uninstall:
 	rm -f $(DESTDIR)/$(POLICY_LOADPATH)/$(POLICY_FILENAME)
 
-$(POLICY_FILENAME): $(FLASK_BUILD_DIR)/policy.conf
-	$(CHECKPOLICY) $(CHECKPOLICY_PARAM) $^ -o $@
+policy: $(FLASK_BUILD_DIR)/policy.conf
+	$(CHECKPOLICY) $(CHECKPOLICY_PARAM) $^ -o xenpolicy-"$$($(MAKE) -C $(XEN_ROOT)/xen xenversion --no-print-directory)"
 
 $(FLASK_BUILD_DIR)/policy.conf: $(POLICY_SECTIONS) $(MOD_CONF)
 	$(M4) $(M4PARAM) $(POLICY_SECTIONS) > $@


  reply	other threads:[~2020-12-17  1:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  2:26 arm32 tools/flask build failure Stefano Stabellini
2020-12-17  1:54 ` Stefano Stabellini [this message]
2020-12-17  8:13   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2012161753100.4040@sstabellini-ThinkPad-T480s \
    --to=sstabellini@kernel.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=anthony.perard@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=iwj@xenproject.org \
    --cc=julien@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.