Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 5/6] pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command environment
Date: Mon, 11 Nov 2013 23:30:58 +0100	[thread overview]
Message-ID: <20131111233058.70fbc99f@skate> (raw)
In-Reply-To: <1384203586-17790-6-git-send-email-s.martin49@gmail.com>

Dear Samuel Martin,

On Mon, 11 Nov 2013 21:59:45 +0100, Samuel Martin wrote:

> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> index 9523529..b405eb1 100644
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -102,6 +102,7 @@ ifeq ($(5),target)
>  # Configure package for target
>  define $(2)_CONFIGURE_CMDS
>  	(cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \
> +	PATH=$(BR2_PATH) \
>  	$$(TARGET_CONFIGURE_OPTS) \
>  	$$(TARGET_CONFIGURE_ARGS) \
>  	$$($$(PKG)_CONF_ENV) \
> @@ -129,6 +130,7 @@ else
>  # installed.
>  define $(2)_CONFIGURE_CMDS
>  	(cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \
> +		PATH=$(BR2_PATH) \
>  	        $$(HOST_CONFIGURE_OPTS) \
>  		CFLAGS="$$(HOST_CFLAGS)" \
>  		LDFLAGS="$$(HOST_LDFLAGS)" \

These two chunks are not needed, since HOST_CONFIGURE_OPTS and
TARGET_CONFIGURE_OPTS already contain PATH=$(BR2_PATH) (you changed
them in PATH 3/6).

> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index 0e08722..956fce8 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -62,6 +62,7 @@ ifeq ($(5),target)
>  define $(2)_CONFIGURE_CMDS
>  	(cd $$($$(PKG)_BUILDDIR) && \
>  	rm -f CMakeCache.txt && \
> +	PATH=$(BR2_PATH) \
>  	$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
>  		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
>  		-DCMAKE_INSTALL_PREFIX="/usr" \
> @@ -74,6 +75,7 @@ else
>  define $(2)_CONFIGURE_CMDS
>  	(cd $$($$(PKG)_BUILDDIR) && \
>  	rm -f CMakeCache.txt && \
> +	PATH=$(BR2_PATH) \
>  	$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
>  		-DCMAKE_INSTALL_SO_NO_EXE=0 \
>  		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \

However, I agree with those ones. An user recently reported a problem
that was caused by cmake not having a proper PATH passed into its
environment, and therefore failing to find some Buildroot tools (I
think it was pkg-config).

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2013-11-11 22:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 20:59 [Buildroot] [PATCH 0/6] PATH cleanup Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 1/6] Makefile: introduce BR2_PATH Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 2/6] Makefile: add $(HOST_DIR)/sbin to BR2_PATH Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 3/6] *.mk: replace (TARGET|HOST)_PATH by BR2_PATH Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 4/6] infra: remove unused {TARGET, HOST}_PATH definition Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 5/6] pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command environment Samuel Martin
2013-11-11 22:30   ` Thomas Petazzoni [this message]
2013-11-11 20:59 ` [Buildroot] [PATCH 6/6] Makefile: export PATH Samuel Martin
2013-11-11 22:31   ` Thomas Petazzoni
2013-11-15 20:37     ` Samuel Martin
2013-11-15 20:53       ` Yann E. MORIN
2013-11-17  7:33         ` Peter Korsgaard
2014-01-02 19:21           ` Samuel Martin

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=20131111233058.70fbc99f@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox