All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] cmake: fix configure error if system Qt installation is broken
Date: Wed, 10 Jul 2013 13:26:29 +0200	[thread overview]
Message-ID: <20130710112629.GY3288@jama> (raw)
In-Reply-To: <1372937164-14095-1-git-send-email-paul.eggleton@linux.intel.com>

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

On Thu, Jul 04, 2013 at 12:26:04PM +0100, Paul Eggleton wrote:
> If the host Qt installation exists but is incomplete or the installed
> qmake architecture doesn't match that of the Qt libraries, cmake was
> failing at do_configure. cmake 2.8.10 failed silently here so we should
> make 2.8.11 do the same.

FWIW: I was seeing this issue in my jenkins builds once and then before
I've included this patch to test it, it was gone and I haven't seen it
anymore. I believe this patch is correct, just saying that building some
recipe (maybe qt4-native) before cmake-native also "hides" this issue.

> Fixes [YOCTO #4565].
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  meta/recipes-devtools/cmake/cmake.inc              |  1 +
>  .../cmake/cmake/qt4-fail-silent.patch              | 55 ++++++++++++++++++++++
>  2 files changed, 56 insertions(+)
>  create mode 100644 meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
> 
> diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
> index 6144d51..014ff5a 100644
> --- a/meta/recipes-devtools/cmake/cmake.inc
> +++ b/meta/recipes-devtools/cmake/cmake.inc
> @@ -15,6 +15,7 @@ SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz
>             file://support-oe-qt4-tools-names.patch \
>             file://aarch64-cmake.patch \
>             file://aarch64-kwsys.patch \
> +           file://qt4-fail-silent.patch \
>             "
>  
>  inherit autotools
> diff --git a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
> new file mode 100644
> index 0000000..fd39f3f
> --- /dev/null
> +++ b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
> @@ -0,0 +1,55 @@
> +Fail silently if system Qt installation is broken
> +
> +Fixes a regression in behaviour from 2.8.10 to 2.8.11 resulting in the
> +following error if the system Qt installation is broken:
> +
> +CMake Error at Modules/FindQt4.cmake:1028 (set_property):
> +  set_property could not find TARGET Qt4::QtCore.  Perhaps it has not yet
> +  been created.
> +Call Stack (most recent call first):
> +  Tests/RunCMake/CMakeLists.txt:79 (find_package)
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> +
> +--- cmake-2.8.11/Modules/FindQt4.cmake	2013-07-04 10:20:42.092848274 +0100
> ++++ cmake-2.8.11/Modules/FindQt4.cmake	2013-07-04 10:52:15.693380555 +0100
> +@@ -1025,21 +1025,22 @@
> +     set(_configs)
> +   endmacro()
> + 
> +-
> +-  # Set QT_xyz_LIBRARY variable and add
> +-  # library include path to QT_INCLUDES
> +-  _QT4_ADJUST_LIB_VARS(QtCore)
> +-  set_property(TARGET Qt4::QtCore APPEND PROPERTY
> +-    INTERFACE_INCLUDE_DIRECTORIES
> +-      "${QT_MKSPECS_DIR}/default"
> +-      ${QT_INCLUDE_DIR}
> +-  )
> +-  set_property(TARGET Qt4::QtCore PROPERTY
> +-    INTERFACE_QT_MAJOR_VERSION 4
> +-  )
> +-  set_property(TARGET Qt4::QtCore APPEND PROPERTY
> +-    COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION
> +-  )
> ++  if(QT_QTCORE_FOUND)
> ++    # Set QT_xyz_LIBRARY variable and add
> ++    # library include path to QT_INCLUDES
> ++    _QT4_ADJUST_LIB_VARS(QtCore)
> ++    set_property(TARGET Qt4::QtCore APPEND PROPERTY
> ++      INTERFACE_INCLUDE_DIRECTORIES
> ++        "${QT_MKSPECS_DIR}/default"
> ++        ${QT_INCLUDE_DIR}
> ++    )
> ++    set_property(TARGET Qt4::QtCore PROPERTY
> ++      INTERFACE_QT_MAJOR_VERSION 4
> ++    )
> ++    set_property(TARGET Qt4::QtCore APPEND PROPERTY
> ++      COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION
> ++    )
> ++  endif()
> + 
> +   foreach(QT_MODULE ${QT_MODULES})
> +     _QT4_ADJUST_LIB_VARS(${QT_MODULE})
> -- 
> 1.8.1.2
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

      reply	other threads:[~2013-07-10 11:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 11:26 [PATCH] cmake: fix configure error if system Qt installation is broken Paul Eggleton
2013-07-10 11:26 ` Martin Jansa [this message]

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=20130710112629.GY3288@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.com \
    /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.