All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmake: Use find_program if find_host_program is not available
@ 2017-06-26 18:33 Maxime Roussin-Bélanger
  2017-06-26 19:01 ` ✗ patchtest: failure for " Patchwork
  2017-06-26 19:41 ` [PATCH] " Otavio Salvador
  0 siblings, 2 replies; 5+ messages in thread
From: Maxime Roussin-Bélanger @ 2017-06-26 18:33 UTC (permalink / raw)
  To: otavio.salvador, openembedded-core

CMake does not define the `find_host_program` command we've
been using in the cross-compiling code path.  It was
provided by a widely used Android toolchain file.  For
compatibility, continue to use `find_host_program` if
available, but otherwise use just `find_program`.

Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
---
 meta/recipes-devtools/cmake/cmake.inc              |  1 +
 ...e-find_program-if-find_host_program-is-no.patch | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch

diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index dbd34f5..6aeb25f 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -14,6 +14,7 @@ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
 SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
            file://support-oe-qt4-tools-names.patch \
            file://qt4-fail-silent.patch \
+           file://0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch \
            "
 
 SRC_URI[md5sum] = "b5dff61f6a7f1305271ab3f6ae261419"
diff --git a/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch b/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
new file mode 100644
index 0000000..8a61f1f
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
@@ -0,0 +1,36 @@
+From 46d25e782ebd9b6c50771b6f30433c58fae03a51 Mon Sep 17 00:00:00 2001
+From: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
+Date: Mon, 26 Jun 2017 11:30:07 -0400
+Subject: [PATCH] cmake: Use find_program if find_host_program is not
+ available
+
+CMake does not define the `find_host_program` command we've been using
+in the cross-compiling code path.  It was provided by a widely used
+Android toolchain file.  For compatibility, continue to use
+`find_host_program` if available, but otherwise use just `find_program`.
+
+Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
+---
+ Modules/FindCUDA.cmake | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
+index a4dca54..77ca351 100644
+--- a/Modules/FindCUDA.cmake
++++ b/Modules/FindCUDA.cmake
+@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING)
+   # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers
+   set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}")
+   macro( cuda_find_host_program )
+-    find_host_program( ${ARGN} )
++    if (COMMAND find_host_program)
++      find_host_program( ${ARGN} )
++    else()
++      find_program( ${ARGN} )
++    endif()
+   endmacro()
+ else()
+   # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR
+--
+2.1.4
+
-- 
2.1.4



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

* ✗ patchtest: failure for cmake: Use find_program if find_host_program is not available
  2017-06-26 18:33 [PATCH] cmake: Use find_program if find_host_program is not available Maxime Roussin-Bélanger
@ 2017-06-26 19:01 ` Patchwork
  2017-06-26 19:41 ` [PATCH] " Otavio Salvador
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-06-26 19:01 UTC (permalink / raw)
  To: Maxime Roussin-Bélanger; +Cc: openembedded-core

== Series Details ==

Series: cmake: Use find_program if find_host_program is not available
Revision: 1
URL   : https://patchwork.openembedded.org/series/7466/
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             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence] 
  Suggested fix    Add Upstream-Status: <status> to the header of meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch (possible values: Pending, Submitted, Accepted, Backport, Denied, Inappropriate)



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] -> ...).

---
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] 5+ messages in thread

* Re: [PATCH] cmake: Use find_program if find_host_program is not available
  2017-06-26 18:33 [PATCH] cmake: Use find_program if find_host_program is not available Maxime Roussin-Bélanger
  2017-06-26 19:01 ` ✗ patchtest: failure for " Patchwork
@ 2017-06-26 19:41 ` Otavio Salvador
  2017-06-26 21:51   ` Maxime Roussin-Belanger
  1 sibling, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2017-06-26 19:41 UTC (permalink / raw)
  To: Maxime Roussin-Bélanger
  Cc: Patches and discussions about the oe-core layer

On Mon, Jun 26, 2017 at 3:33 PM, Maxime Roussin-Bélanger
<maxime.roussinbelanger@gmail.com> wrote:
> CMake does not define the `find_host_program` command we've
> been using in the cross-compiling code path.  It was
> provided by a widely used Android toolchain file.  For
> compatibility, continue to use `find_host_program` if
> available, but otherwise use just `find_program`.
>
> Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>

It sounds fine to me; the backward compatibility is maintained and it
fixes a real use-case so I see no reason to not apply EXCEPT:

- lack of Upstream-Status field
- lack of upstream bug about the issue, ideally the proposed patch
should be send to upstream so we can drop it in next releases

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] cmake: Use find_program if find_host_program is not available
  2017-06-26 19:41 ` [PATCH] " Otavio Salvador
@ 2017-06-26 21:51   ` Maxime Roussin-Belanger
  2017-06-27  7:57     ` Jussi Kukkonen
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Roussin-Belanger @ 2017-06-26 21:51 UTC (permalink / raw)
  To: Otavio Salvador, openembedded-core

On Mon, Jun 26, 2017 at 04:41:34PM -0300, Otavio Salvador wrote:
> On Mon, Jun 26, 2017 at 3:33 PM, Maxime Roussin-Bélanger
> <maxime.roussinbelanger@gmail.com> wrote:
> > CMake does not define the `find_host_program` command we've
> > been using in the cross-compiling code path.  It was
> > provided by a widely used Android toolchain file.  For
> > compatibility, continue to use `find_host_program` if
> > available, but otherwise use just `find_program`.
> >
> > Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
> 
> It sounds fine to me; the backward compatibility is maintained and it
> fixes a real use-case so I see no reason to not apply EXCEPT:
> 
> - lack of Upstream-Status field
> - lack of upstream bug about the issue, ideally the proposed patch
> should be send to upstream so we can drop it in next releases
> 

I just got r/w access to the poky-contrib repository. Do I have to create
a pull-request/send-pull-request to get an upstream-status field? 

Can we ignore this email and just use the pull-request script instead?

If so, do I have to resend the same patch (V2 ?) to the same recipients?

If not, how do I get an upstream-status? I just pushed my branch to contrib
repository (mroussin/fix_cmake_find_cuda_not_android), does that mean pending?


> -- 
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] cmake: Use find_program if find_host_program is not available
  2017-06-26 21:51   ` Maxime Roussin-Belanger
@ 2017-06-27  7:57     ` Jussi Kukkonen
  0 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2017-06-27  7:57 UTC (permalink / raw)
  To: Maxime Roussin-Belanger
  Cc: Otavio Salvador, Patches and discussions about the oe-core layer

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

On 27 June 2017 at 00:51, Maxime Roussin-Belanger <
maxime.roussinbelanger@gmail.com> wrote:

> On Mon, Jun 26, 2017 at 04:41:34PM -0300, Otavio Salvador wrote:
> > On Mon, Jun 26, 2017 at 3:33 PM, Maxime Roussin-Bélanger
> > <maxime.roussinbelanger@gmail.com> wrote:
> > > CMake does not define the `find_host_program` command we've
> > > been using in the cross-compiling code path.  It was
> > > provided by a widely used Android toolchain file.  For
> > > compatibility, continue to use `find_host_program` if
> > > available, but otherwise use just `find_program`.
> > >
> > > Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.
> com>
> >
> > It sounds fine to me; the backward compatibility is maintained and it
> > fixes a real use-case so I see no reason to not apply EXCEPT:
> >
> > - lack of Upstream-Status field
> > - lack of upstream bug about the issue, ideally the proposed patch
> > should be send to upstream so we can drop it in next releases
> >
>
> I just got r/w access to the poky-contrib repository. Do I have to create
> a pull-request/send-pull-request to get an upstream-status field?
>
> Can we ignore this email and just use the pull-request script instead?
>
> If so, do I have to resend the same patch (V2 ?) to the same recipients?
>

You should send a V2 with Upstream-Status (see below). You can use
poky-contrib and the pull-request scripts but you can also just send the
patch, it's up to you.


> If not, how do I get an upstream-status? I just pushed my branch to contrib
> repository (mroussin/fix_cmake_find_cuda_not_android), does that mean
> pending?
>

Upstream-Status refers to what's happening in _upstream project_, not in
yocto: you should decide what the appropriate value is -- but everyone
would like if it was "submitted"  (in other words you have sent a patch to
the cmake project using whatever method they prefer). At the very least you
should file a bug upstream. Please add a link to the upstream pull request
or bug report into the yocto patch: that way it's easy to check later on if
the patch is still needed.

There's no tooling to add the tag if that was what you were wondering, just
write it by hand.

See also: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines


Jussi



>
>
> > --
> > Otavio Salvador                             O.S. Systems
> > http://www.ossystems.com.br        http://code.ossystems.com.br
> > Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

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

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

end of thread, other threads:[~2017-06-27  7:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 18:33 [PATCH] cmake: Use find_program if find_host_program is not available Maxime Roussin-Bélanger
2017-06-26 19:01 ` ✗ patchtest: failure for " Patchwork
2017-06-26 19:41 ` [PATCH] " Otavio Salvador
2017-06-26 21:51   ` Maxime Roussin-Belanger
2017-06-27  7:57     ` Jussi Kukkonen

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.