All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmake.bbclass: allow cmake to find hosttools
@ 2018-10-09 13:34 Pascal Bach
  2018-10-09 14:03 ` ✗ patchtest: failure for " Patchwork
  2018-10-09 14:06 ` [PATCH] " Burton, Ross
  0 siblings, 2 replies; 4+ messages in thread
From: Pascal Bach @ 2018-10-09 13:34 UTC (permalink / raw)
  To: openembedded-core

Currently the generated toolchain file is unable to find hosttools as they
do not appear in the search paths.

One example where this is useful is for projects that query git for their version
number as git is usually provided via HOSTTOOLS.

Just adding HOSTTOOLS_DIR is not enough as binaries are located directly under
${HOSTTOOLS_DIR}. Like ${HOSTTOOLS_DIR}/git for example.
CMake however only searches in [s]bin sub directories of the paths specified in
CMAKE_FIND_ROOT_PATH. Explicitly adding / to CMAKE_SYSTEM_PROGRAM_PATH makes
CMake look in the right location.

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
---
 meta/classes/cmake.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 684f71299a..421d85fd9d 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -92,7 +92,7 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
 
 # only search in the paths provided so cmake doesnt pick
 # up libraries and tools from the native build machine
-set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN})
+set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN} ${HOSTTOOLS_DIR})
 set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ${OECMAKE_FIND_ROOT_PATH_MODE} )
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE} )
 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ${OECMAKE_FIND_ROOT_PATH_MODE} )
@@ -113,6 +113,10 @@ list(APPEND CMAKE_MODULE_PATH "${STAGING_DATADIR}/cmake/Modules/")
 # add for non /usr/lib libdir, e.g. /usr/lib64
 set( CMAKE_SYSTEM_LIBRARY_PATH ${libdir} ${base_libdir})
 
+# by default CMake only looks in [s]bin subdirectories of CMAKE_FIND_ROOT_PATH
+# adding / makes CMake look for binaries in hosttools too.
+set( CMAKE_SYSTEM_PROGRAM_PATH /)
+
 # avoid treating imports as system includes
 set( CMAKE_NO_SYSTEM_FROM_IMPORTED ON)
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✗ patchtest: failure for cmake.bbclass: allow cmake to find hosttools
  2018-10-09 13:34 [PATCH] cmake.bbclass: allow cmake to find hosttools Pascal Bach
@ 2018-10-09 14:03 ` Patchwork
  2018-10-09 14:06 ` [PATCH] " Burton, Ross
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-10-09 14:03 UTC (permalink / raw)
  To: Pascal Bach; +Cc: openembedded-core

== Series Details ==

Series: cmake.bbclass: allow cmake to find hosttools
Revision: 1
URL   : https://patchwork.openembedded.org/series/14429/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 9a84114a27)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cmake.bbclass: allow cmake to find hosttools
  2018-10-09 13:34 [PATCH] cmake.bbclass: allow cmake to find hosttools Pascal Bach
  2018-10-09 14:03 ` ✗ patchtest: failure for " Patchwork
@ 2018-10-09 14:06 ` Burton, Ross
  2018-10-09 14:28   ` Pascal Bach
  1 sibling, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2018-10-09 14:06 UTC (permalink / raw)
  To: Pascal Bach; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2871 bytes --]

The hashes don't match anything public and git isn't happy:

Applying: cmake.bbclass: allow cmake to find hosttools
error: sha1 information is lacking or useless (meta/classes/cmake.bbclass).
error: could not build fake ancestor
Patch failed at 0001 cmake.bbclass: allow cmake to find hosttools

Ross

On Tue, 9 Oct 2018 at 14:36, Pascal Bach <pascal.bach@siemens.com> wrote:

> Currently the generated toolchain file is unable to find hosttools as they
> do not appear in the search paths.
>
> One example where this is useful is for projects that query git for their
> version
> number as git is usually provided via HOSTTOOLS.
>
> Just adding HOSTTOOLS_DIR is not enough as binaries are located directly
> under
> ${HOSTTOOLS_DIR}. Like ${HOSTTOOLS_DIR}/git for example.
> CMake however only searches in [s]bin sub directories of the paths
> specified in
> CMAKE_FIND_ROOT_PATH. Explicitly adding / to CMAKE_SYSTEM_PROGRAM_PATH
> makes
> CMake look in the right location.
>
> Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
> ---
>  meta/classes/cmake.bbclass | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index 684f71299a..421d85fd9d 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -92,7 +92,7 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}"
> CACHE STRING "LDFLAGS" )
>
>  # only search in the paths provided so cmake doesnt pick
>  # up libraries and tools from the native build machine
> -set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE}
> ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH}
> ${EXTERNAL_TOOLCHAIN})
> +set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE}
> ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH}
> ${EXTERNAL_TOOLCHAIN} ${HOSTTOOLS_DIR})
>  set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ${OECMAKE_FIND_ROOT_PATH_MODE} )
>  set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE} )
>  set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ${OECMAKE_FIND_ROOT_PATH_MODE} )
> @@ -113,6 +113,10 @@ list(APPEND CMAKE_MODULE_PATH
> "${STAGING_DATADIR}/cmake/Modules/")
>  # add for non /usr/lib libdir, e.g. /usr/lib64
>  set( CMAKE_SYSTEM_LIBRARY_PATH ${libdir} ${base_libdir})
>
> +# by default CMake only looks in [s]bin subdirectories of
> CMAKE_FIND_ROOT_PATH
> +# adding / makes CMake look for binaries in hosttools too.
> +set( CMAKE_SYSTEM_PROGRAM_PATH /)
> +
>  # avoid treating imports as system includes
>  set( CMAKE_NO_SYSTEM_FROM_IMPORTED ON)
>
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3593 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cmake.bbclass: allow cmake to find hosttools
  2018-10-09 14:06 ` [PATCH] " Burton, Ross
@ 2018-10-09 14:28   ` Pascal Bach
  0 siblings, 0 replies; 4+ messages in thread
From: Pascal Bach @ 2018-10-09 14:28 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 09.10.2018 16:06, Burton, Ross wrote:
> The hashes don't match anything public and git isn't happy:
>
> Applying: cmake.bbclass: allow cmake to find hosttools
> error: sha1 information is lacking or useless (meta/classes/cmake.bbclass).
> error: could not build fake ancestor
> Patch failed at 0001 cmake.bbclass: allow cmake to find hosttools

I noticed too, the patch was based on another patch I sent. Should have sent these as a patch set even tough
they are not really related.

I will resubmit.

Pascal

>
> Ross
>
> On Tue, 9 Oct 2018 at 14:36, Pascal Bach <pascal.bach@siemens.com <mailto:pascal.bach@siemens.com>> wrote:
>
>     Currently the generated toolchain file is unable to find hosttools as they
>     do not appear in the search paths.
>
>     One example where this is useful is for projects that query git for their version
>     number as git is usually provided via HOSTTOOLS.
>
>     Just adding HOSTTOOLS_DIR is not enough as binaries are located directly under
>     ${HOSTTOOLS_DIR}. Like ${HOSTTOOLS_DIR}/git for example.
>     CMake however only searches in [s]bin sub directories of the paths specified in
>     CMAKE_FIND_ROOT_PATH. Explicitly adding / to CMAKE_SYSTEM_PROGRAM_PATH makes
>     CMake look in the right location.
>
>     Signed-off-by: Pascal Bach <pascal.bach@siemens.com <mailto:pascal.bach@siemens.com>>
>     ---
>      meta/classes/cmake.bbclass | 6 +++++-
>      1 file changed, 5 insertions(+), 1 deletion(-)
>
>     diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
>     index 684f71299a..421d85fd9d 100644
>     --- a/meta/classes/cmake.bbclass
>     +++ b/meta/classes/cmake.bbclass
>     @@ -92,7 +92,7 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
>
>      # only search in the paths provided so cmake doesnt pick
>      # up libraries and tools from the native build machine
>     -set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN})
>     +set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN} ${HOSTTOOLS_DIR})
>      set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ${OECMAKE_FIND_ROOT_PATH_MODE} )
>      set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE} )
>      set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ${OECMAKE_FIND_ROOT_PATH_MODE} )
>     @@ -113,6 +113,10 @@ list(APPEND CMAKE_MODULE_PATH "${STAGING_DATADIR}/cmake/Modules/")
>      # add for non /usr/lib libdir, e.g. /usr/lib64
>      set( CMAKE_SYSTEM_LIBRARY_PATH ${libdir} ${base_libdir})
>
>     +# by default CMake only looks in [s]bin subdirectories of CMAKE_FIND_ROOT_PATH
>     +# adding / makes CMake look for binaries in hosttools too.
>     +set( CMAKE_SYSTEM_PROGRAM_PATH /)
>     +
>      # avoid treating imports as system includes
>      set( CMAKE_NO_SYSTEM_FROM_IMPORTED ON)
>
>     -- 
>     2.11.0
>
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-09 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 13:34 [PATCH] cmake.bbclass: allow cmake to find hosttools Pascal Bach
2018-10-09 14:03 ` ✗ patchtest: failure for " Patchwork
2018-10-09 14:06 ` [PATCH] " Burton, Ross
2018-10-09 14:28   ` Pascal Bach

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.