Re: [OE-core] [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 - 3.2.2

2015-06-18 Thread Stefan Herbrechtsmeier

Am 17.06.2015 um 16:47 schrieb Moritz Blume:

On 11.06.2015 21:10, Stefan Herbrechtsmeier wrote:

Am 10.06.2015 um 09:36 schrieb Moritz Blume:

Patches qt4-fail-silent.patch and support-oe-qt4-tools-names.patch
were adapted in order to fit to CMake 3.2.2 (refer to the commit
message in the respective patch for details).
Patch cmake-2.8.11.2-FindFreetype.patch was dropped since it was
rejected upstream and its functionality otherwise implemented in the
meantime.

Note that CMake 3 needs to have the full compiler path in the toolchain
file (see cmake.bbclass).

Why is the full path needed?


https://public.kitware.com/Bug/view.php?id=15251

Having a full path to the compiler is a new requirement starting in 
CMake 3.0. The incompatibility was introduced across a major version 
number bump and is considered acceptable. The project will have to be 
fixed to use a full path.

The documentions [1] says something else:
The CMAKE_LANG_COMPILER variables may be set to full paths, or to 
names of compilers to search for in standard locations



Without a full path, you get the following error message:

CMake Error at CMakeLists.txt:5 (project):
| The CMAKE_C_COMPILER:
|
| gcc
|
| is not a full path and was not found in the PATH.
|
| Tell CMake where to find the compiler by setting either the environment
| variable CC or the CMake cache entry CMAKE_C_COMPILER to the full 
path to

| the compiler, or to the compiler name if it is in the PATH.


But this messages also says that the compiler was not found in the PATH.



Have you try to add STAGING_BINDIR_TOOLCHAIN to the 
CMAKE_FIND_ROOT_PATH?


I don't understand, is this related to the compiler path?
Yes, but this doesn't helps as CMAKE_LAND_COMPILER is not inside a 
/bin path. CMake use find_program to get the full path in 
Modules/CMakeDetermineCompiler.cmake.


snip

[1] 
http://www.cmake.org/cmake/help/v3.2/manual/cmake-toolchains.7.html#cross-compiling-for-linux


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 - 3.2.2

2015-06-17 Thread Moritz Blume

On 11.06.2015 21:10, Stefan Herbrechtsmeier wrote:

Am 10.06.2015 um 09:36 schrieb Moritz Blume:

Patches qt4-fail-silent.patch and support-oe-qt4-tools-names.patch
were adapted in order to fit to CMake 3.2.2 (refer to the commit
message in the respective patch for details).
Patch cmake-2.8.11.2-FindFreetype.patch was dropped since it was
rejected upstream and its functionality otherwise implemented in the
meantime.

Note that CMake 3 needs to have the full compiler path in the toolchain
file (see cmake.bbclass).

Why is the full path needed?


https://public.kitware.com/Bug/view.php?id=15251

Having a full path to the compiler is a new requirement starting in 
CMake 3.0. The incompatibility was introduced across a major version 
number bump and is considered acceptable. The project will have to be 
fixed to use a full path.


Without a full path, you get the following error message:

CMake Error at CMakeLists.txt:5 (project):
| The CMAKE_C_COMPILER:
|
| gcc
|
| is not a full path and was not found in the PATH.
|
| Tell CMake where to find the compiler by setting either the environment
| variable CC or the CMake cache entry CMAKE_C_COMPILER to the full 
path to

| the compiler, or to the compiler name if it is in the PATH.



Have you try to add STAGING_BINDIR_TOOLCHAIN to the CMAKE_FIND_ROOT_PATH?


I don't understand, is this related to the compiler path?



snip


diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 1ebb936..c97fd02 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -10,9 +10,11 @@ CCACHE = 
  # We want the staging and installing functions from autotools
  inherit autotools
  -# C/C++ Compiler (without cpu arch/tune arguments)
-OECMAKE_C_COMPILER ?= `echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`
-OECMAKE_CXX_COMPILER ?= `echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`
+# Full path to C/C++ Compiler (without cpu arch/tune arguments)
+C_COMPILER = $(echo ${CC} | sed 's/^\([^ ]*\).*/\1/')
+CXX_COMPILER = $(echo ${CXX} | sed 's/^\([^ ]*\).*/\1/')
+OECMAKE_C_COMPILER ?= $(which ${C_COMPILER})
+OECMAKE_CXX_COMPILER ?= $(which ${CXX_COMPILER})
  OECMAKE_AR ?= ${AR}

Why you don't use the full path for AR?



It is not required to have a full path here...

--
BMW Car IT GmbH
Dr. Moritz Blume
Spezialist Entwicklung
Petuelring 116
80809 München

Tel.: ­+49 89 189311-25
Fax:  +49 89 189311-20
Mail: moritz.bl...@bmw-carit.de
Web: http://www.bmw-carit.de

-
BMW Car IT GmbH
Geschäftsführer: Michael Würtenberger und Reinhard Stolle
Sitz und Registergericht: München HRB 134810


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 - 3.2.2

2015-06-11 Thread Stefan Herbrechtsmeier

Am 10.06.2015 um 09:36 schrieb Moritz Blume:

Patches qt4-fail-silent.patch and support-oe-qt4-tools-names.patch
were adapted in order to fit to CMake 3.2.2 (refer to the commit
message in the respective patch for details).
Patch cmake-2.8.11.2-FindFreetype.patch was dropped since it was
rejected upstream and its functionality otherwise implemented in the
meantime.

Note that CMake 3 needs to have the full compiler path in the toolchain
file (see cmake.bbclass).
Have you try the new CMake 3 toolchain file variables CMAKE_SYSROOT [1] 
and CMAKE_STAGING_PREFIX [2]?


[1] http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_SYSROOT.html
[2] http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_STAGING_PREFIX.html

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 - 3.2.2

2015-06-11 Thread Stefan Herbrechtsmeier

Am 10.06.2015 um 09:36 schrieb Moritz Blume:

Patches qt4-fail-silent.patch and support-oe-qt4-tools-names.patch
were adapted in order to fit to CMake 3.2.2 (refer to the commit
message in the respective patch for details).
Patch cmake-2.8.11.2-FindFreetype.patch was dropped since it was
rejected upstream and its functionality otherwise implemented in the
meantime.

Note that CMake 3 needs to have the full compiler path in the toolchain
file (see cmake.bbclass).

Why is the full path needed?

Have you try to add STAGING_BINDIR_TOOLCHAIN to the CMAKE_FIND_ROOT_PATH?

snip


diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 1ebb936..c97fd02 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -10,9 +10,11 @@ CCACHE = 
  # We want the staging and installing functions from autotools
  inherit autotools
  
-# C/C++ Compiler (without cpu arch/tune arguments)

-OECMAKE_C_COMPILER ?= `echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`
-OECMAKE_CXX_COMPILER ?= `echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`
+# Full path to C/C++ Compiler (without cpu arch/tune arguments)
+C_COMPILER = $(echo ${CC} | sed 's/^\([^ ]*\).*/\1/')
+CXX_COMPILER = $(echo ${CXX} | sed 's/^\([^ ]*\).*/\1/')
+OECMAKE_C_COMPILER ?= $(which ${C_COMPILER})
+OECMAKE_CXX_COMPILER ?= $(which ${CXX_COMPILER})
  OECMAKE_AR ?= ${AR}

Why you don't use the full path for AR?

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 - 3.2.2

2015-06-10 Thread Burton, Ross
I see this causes piglit to fail to build, which is a problem if we want
this in oe-core.   I'm having a quick look to see if upgrading piglit helps
but right now this is blocking merging.

Ross

On 10 June 2015 at 08:36, Moritz Blume moritz.bl...@bmw-carit.de wrote:

 Patches qt4-fail-silent.patch and support-oe-qt4-tools-names.patch
 were adapted in order to fit to CMake 3.2.2 (refer to the commit
 message in the respective patch for details).
 Patch cmake-2.8.11.2-FindFreetype.patch was dropped since it was
 rejected upstream and its functionality otherwise implemented in the
 meantime.

 Note that CMake 3 needs to have the full compiler path in the toolchain
 file (see cmake.bbclass).

 Signed-off-by: Moritz Blume moritz.bl...@bmw-carit.de
 ---
  meta/classes/cmake.bbclass |  8 ++-
  .../cmake/cmake-native_2.8.12.2.bb | 19 --
  meta/recipes-devtools/cmake/cmake-native_3.2.2.bb  | 19 ++
  meta/recipes-devtools/cmake/cmake.inc  | 12 ++--
  .../cmake/cmake/cmake-2.8.11.2-FindFreetype.patch  | 47 ---
  .../cmake/cmake/qt4-fail-silent.patch  | 30 --
  .../cmake/cmake/support-oe-qt4-tools-names.patch   | 70
 ++
  meta/recipes-devtools/cmake/cmake_2.8.12.2.bb  | 52 
  meta/recipes-devtools/cmake/cmake_3.2.2.bb | 56 +
  9 files changed, 144 insertions(+), 169 deletions(-)
  delete mode 100644 meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
  create mode 100644 meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
  delete mode 100644
 meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch
  delete mode 100644 meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
  create mode 100644 meta/recipes-devtools/cmake/cmake_3.2.2.bb

 diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
 index 1ebb936..c97fd02 100644
 --- a/meta/classes/cmake.bbclass
 +++ b/meta/classes/cmake.bbclass
 @@ -10,9 +10,11 @@ CCACHE = 
  # We want the staging and installing functions from autotools
  inherit autotools

 -# C/C++ Compiler (without cpu arch/tune arguments)
 -OECMAKE_C_COMPILER ?= `echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`
 -OECMAKE_CXX_COMPILER ?= `echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`
 +# Full path to C/C++ Compiler (without cpu arch/tune arguments)
 +C_COMPILER = $(echo ${CC} | sed 's/^\([^ ]*\).*/\1/')
 +CXX_COMPILER = $(echo ${CXX} | sed 's/^\([^ ]*\).*/\1/')
 +OECMAKE_C_COMPILER ?= $(which ${C_COMPILER})
 +OECMAKE_CXX_COMPILER ?= $(which ${CXX_COMPILER})
  OECMAKE_AR ?= ${AR}

  # Compiler flags
 diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
 b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
 deleted file mode 100644
 index e40dfdd..000
 --- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
 +++ /dev/null
 @@ -1,19 +0,0 @@
 -require cmake.inc
 -inherit native
 -
 -# Using cmake's internal libarchive, so some dependencies are needed
 -DEPENDS += bzip2-native zlib-native
 -
 -SRC_URI += \
 -file://cmlibarchive-disable-ext2fs.patch \
 -
 -
 -SRC_URI[md5sum] = 17c6513483d23590cbce6957ec6d1e66
 -SRC_URI[sha256sum] =
 8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e
 -
 -# Disable ccmake since we don't depend on ncurses
 -CMAKE_EXTRACONF = \
 --DBUILD_CursesDialog=0 \
 --DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
 --DHAVE_SYS_ACL_H=0 \
 -
 diff --git a/meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
 b/meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
 new file mode 100644
 index 000..17e9e2c
 --- /dev/null
 +++ b/meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
 @@ -0,0 +1,19 @@
 +require cmake.inc
 +inherit native
 +
 +# Using cmake's internal libarchive, so some dependencies are needed
 +DEPENDS += bzip2-native zlib-native
 +
 +SRC_URI += \
 +file://cmlibarchive-disable-ext2fs.patch \
 +
 +
 +SRC_URI[md5sum] = 2da57308071ea98b10253a87d2419281
 +SRC_URI[sha256sum] =
 ade94e6e36038774565f2aed8866415443444fb7a362eb0ea5096e40d5407c78
 +
 +# Disable ccmake since we don't depend on ncurses
 +CMAKE_EXTRACONF = \
 +-DBUILD_CursesDialog=0 \
 +-DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
 +-DHAVE_SYS_ACL_H=0 \
 +
 diff --git a/meta/recipes-devtools/cmake/cmake.inc
 b/meta/recipes-devtools/cmake/cmake.inc
 index 28b7f2d..d1cb7ab 100644
 --- a/meta/recipes-devtools/cmake/cmake.inc
 +++ b/meta/recipes-devtools/cmake/cmake.inc
 @@ -6,7 +6,7 @@ HOMEPAGE = http://www.cmake.org/;
  BUGTRACKER = http://public.kitware.com/Bug/my_view_page.php;
  SECTION = console/utils
  LICENSE = BSD
 -LIC_FILES_CHKSUM =
 file://Copyright.txt;md5=bb2fa3a08736b842556f6171bb9e8ae1 \
 +LIC_FILES_CHKSUM =
 file://Copyright.txt;md5=3ba5a6c34481652ce573e5c4e1d707e4 \

  
 file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2

  CMAKE_MAJOR_VERSION = ${@'.'.join(d.getVar('PV',1).split('.')[0:2])}
 @@ -14,11 +14,8 @@ CMAKE_MAJOR_VERSION =
 ${@'.'.join(d.getVar('PV',1).split('.')[0:2])}
  

Re: [OE-core] [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 - 3.2.2

2015-06-10 Thread Burton, Ross
On 10 June 2015 at 17:49, Burton, Ross ross.bur...@intel.com wrote:

 I see this causes piglit to fail to build, which is a problem if we want
 this in oe-core.   I'm having a quick look to see if upgrading piglit helps
 but right now this is blocking merging.


Upgrading piglit seemed to help, re-running a world build now.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core