Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] cmake.bbclass: search both sysroot-native and host for native packages
@ 2018-10-09 14:03 Pascal Bach
  2018-10-09 14:40 ` ✗ patchtest: failure for " Patchwork
  2018-10-09 15:07 ` [PATCH] " Burton, Ross
  0 siblings, 2 replies; 4+ messages in thread
From: Pascal Bach @ 2018-10-09 14:03 UTC (permalink / raw)
  To: openembedded-core

Certain headers and libraries like `math.h` an `-m` are only available on the
host as they are provided by the host toolchain.

This leads to issues that a find_library in CMake doesn't find the `m` library
of a find_path doesn't find `math.h`. This issue occurred in the wireshark recipe
for example.

This change enables CMake to also look on the host for libraries and includes when
building a native package.

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

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 6e2c34e4c6..89a2a77a50 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -43,8 +43,8 @@ OECMAKE_RPATH ?= ""
 OECMAKE_PERLNATIVE_DIR ??= ""
 OECMAKE_EXTRA_ROOT_PATH ?= ""
 
-OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
-OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
+OECMAKE_FIND_ROOT_PATH_MODE = "ONLY"
+OECMAKE_FIND_ROOT_PATH_MODE_class-native = "BOTH"
 
 EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
 
@@ -93,10 +93,10 @@ 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_MODE_PACKAGE ONLY )
-set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} )
-set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
-set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+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} )
+set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ${OECMAKE_FIND_ROOT_PATH_MODE} )
 
 $cmake_sysroot
 
-- 
2.11.0



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

* ✗ patchtest: failure for cmake.bbclass: search both sysroot-native and host for native packages
  2018-10-09 14:03 [PATCH] cmake.bbclass: search both sysroot-native and host for native packages Pascal Bach
@ 2018-10-09 14:40 ` Patchwork
  2018-10-09 15:07 ` [PATCH] " Burton, Ross
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-10-09 14:40 UTC (permalink / raw)
  To: Pascal Bach; +Cc: openembedded-core

== Series Details ==

Series: cmake.bbclass: search both sysroot-native and host for native packages
Revision: 1
URL   : https://patchwork.openembedded.org/series/14431/
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: search both sysroot-native and host for native packages
  2018-10-09 14:03 [PATCH] cmake.bbclass: search both sysroot-native and host for native packages Pascal Bach
  2018-10-09 14:40 ` ✗ patchtest: failure for " Patchwork
@ 2018-10-09 15:07 ` Burton, Ross
  2018-10-10  8:16   ` Pascal Bach
  1 sibling, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2018-10-09 15:07 UTC (permalink / raw)
  To: Pascal Bach; +Cc: OE-core

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

All but this one apply now... weird.

If you can rebase on top of poky-contrib:ross/thud then that would be great.

Ross

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

> Certain headers and libraries like `math.h` an `-m` are only available on
> the
> host as they are provided by the host toolchain.
>
> This leads to issues that a find_library in CMake doesn't find the `m`
> library
> of a find_path doesn't find `math.h`. This issue occurred in the wireshark
> recipe
> for example.
>
> This change enables CMake to also look on the host for libraries and
> includes when
> building a native package.
>
> Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
> ---
>  meta/classes/cmake.bbclass | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index 6e2c34e4c6..89a2a77a50 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -43,8 +43,8 @@ OECMAKE_RPATH ?= ""
>  OECMAKE_PERLNATIVE_DIR ??= ""
>  OECMAKE_EXTRA_ROOT_PATH ?= ""
>
> -OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
> -OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
> +OECMAKE_FIND_ROOT_PATH_MODE = "ONLY"
> +OECMAKE_FIND_ROOT_PATH_MODE_class-native = "BOTH"
>
>  EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
>
> @@ -93,10 +93,10 @@ 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_MODE_PACKAGE ONLY )
> -set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
> ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} )
> -set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
> -set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
> +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} )
> +set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ${OECMAKE_FIND_ROOT_PATH_MODE} )
>
>  $cmake_sysroot
>
> --
> 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: 3321 bytes --]

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

* Re: [PATCH] cmake.bbclass: search both sysroot-native and host for native packages
  2018-10-09 15:07 ` [PATCH] " Burton, Ross
@ 2018-10-10  8:16   ` Pascal Bach
  0 siblings, 0 replies; 4+ messages in thread
From: Pascal Bach @ 2018-10-10  8:16 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

I re submitted all 4 patches a series.

Sorry for the inconvenience, I miss-judged the conflicts between the patches.

Passcal


On 09.10.2018 17:07, Burton, Ross wrote:
> All but this one apply now... weird.
>
> If you can rebase on top of poky-contrib:ross/thud then that would be great.
>
> Ross
>
> On Tue, 9 Oct 2018 at 15:07, Pascal Bach <pascal.bach@siemens.com <mailto:pascal.bach@siemens.com>> wrote:
>
>     Certain headers and libraries like `math.h` an `-m` are only available on the
>     host as they are provided by the host toolchain.
>
>     This leads to issues that a find_library in CMake doesn't find the `m` library
>     of a find_path doesn't find `math.h`. This issue occurred in the wireshark recipe
>     for example.
>
>     This change enables CMake to also look on the host for libraries and includes when
>     building a native package.
>
>     Signed-off-by: Pascal Bach <pascal.bach@siemens.com <mailto:pascal.bach@siemens.com>>
>     ---
>      meta/classes/cmake.bbclass | 12 ++++++------
>      1 file changed, 6 insertions(+), 6 deletions(-)
>
>     diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
>     index 6e2c34e4c6..89a2a77a50 100644
>     --- a/meta/classes/cmake.bbclass
>     +++ b/meta/classes/cmake.bbclass
>     @@ -43,8 +43,8 @@ OECMAKE_RPATH ?= ""
>      OECMAKE_PERLNATIVE_DIR ??= ""
>      OECMAKE_EXTRA_ROOT_PATH ?= ""
>
>     -OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
>     -OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
>     +OECMAKE_FIND_ROOT_PATH_MODE = "ONLY"
>     +OECMAKE_FIND_ROOT_PATH_MODE_class-native = "BOTH"
>
>      EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
>
>     @@ -93,10 +93,10 @@ 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_MODE_PACKAGE ONLY )
>     -set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} )
>     -set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
>     -set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
>     +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} )
>     +set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ${OECMAKE_FIND_ROOT_PATH_MODE} )
>
>      $cmake_sysroot
>
>     -- 
>     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-10  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09 14:03 [PATCH] cmake.bbclass: search both sysroot-native and host for native packages Pascal Bach
2018-10-09 14:40 ` ✗ patchtest: failure for " Patchwork
2018-10-09 15:07 ` [PATCH] " Burton, Ross
2018-10-10  8:16   ` Pascal Bach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox