Re: [oe] [meta-qt5][PATCH 2/2] qtbase: Add packageconfigs for renameat2 and getentropy use

2018-02-23 Thread Khem Raj
On Fri, Feb 23, 2018 at 12:00 AM, Samuli Piippo  wrote:
> renameat2 is a system call without a libc wrapper, so the configure
> test will always fail. The system call will still be used if that is
> defined, so PACKAGECONFIG doesn't make sense for it.
>

thats what I was thinking that testing kernel headers for the syscall
may not be sufficient. We might have to pass minimum supported kernel
version to make this decision to enable/disable these calls.

> On 23 February 2018 at 04:17, Khem Raj  wrote:
>> On Thu, Feb 22, 2018 at 5:27 PM, Martin Jansa  wrote:
>>> On Wed, Feb 21, 2018 at 08:29:40PM -0800, Khem Raj wrote:
 These features depend on underlying syscall support in kernel
 and if older kernels are in use, then we can have a knob to
 turn them off.

 Signed-off-by: Khem Raj 
 ---
  recipes-qt/qt5/qtbase_git.bb | 6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)

 diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
 index e495b8c..843648f 100644
 --- a/recipes-qt/qt5/qtbase_git.bb
 +++ b/recipes-qt/qt5/qtbase_git.bb
 @@ -71,7 +71,7 @@ PACKAGECONFIG_DISTRO ?= ""
  PACKAGECONFIG_RELEASE ?= "release"
  # This is in qt5.inc, because qtwebkit-examples are using it to enable 
 ca-certificates dependency
  # PACKAGECONFIG_OPENSSL ?= "openssl"
 -PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype 
 tests"
 +PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype 
 tests renameat2 getentropy"
>>>
>>> Should renameat2 be enabled by default?
>>>
>>> Either the test for it is broken in 5.11 or it's not available in
>>> default setup.
>>>
>>
>> Its ok to keep them enabled by default. but I think this is a bug that
>> should be reported
>> to upstream QT, if the feature is knobbale then it should have worked.
>> --
>> ___
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-qt5][PATCH 2/2] qtbase: Add packageconfigs for renameat2 and getentropy use

2018-02-23 Thread Samuli Piippo
renameat2 is a system call without a libc wrapper, so the configure
test will always fail. The system call will still be used if that is
defined, so PACKAGECONFIG doesn't make sense for it.

On 23 February 2018 at 04:17, Khem Raj  wrote:
> On Thu, Feb 22, 2018 at 5:27 PM, Martin Jansa  wrote:
>> On Wed, Feb 21, 2018 at 08:29:40PM -0800, Khem Raj wrote:
>>> These features depend on underlying syscall support in kernel
>>> and if older kernels are in use, then we can have a knob to
>>> turn them off.
>>>
>>> Signed-off-by: Khem Raj 
>>> ---
>>>  recipes-qt/qt5/qtbase_git.bb | 6 +-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
>>> index e495b8c..843648f 100644
>>> --- a/recipes-qt/qt5/qtbase_git.bb
>>> +++ b/recipes-qt/qt5/qtbase_git.bb
>>> @@ -71,7 +71,7 @@ PACKAGECONFIG_DISTRO ?= ""
>>>  PACKAGECONFIG_RELEASE ?= "release"
>>>  # This is in qt5.inc, because qtwebkit-examples are using it to enable 
>>> ca-certificates dependency
>>>  # PACKAGECONFIG_OPENSSL ?= "openssl"
>>> -PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype 
>>> tests"
>>> +PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype 
>>> tests renameat2 getentropy"
>>
>> Should renameat2 be enabled by default?
>>
>> Either the test for it is broken in 5.11 or it's not available in
>> default setup.
>>
>
> Its ok to keep them enabled by default. but I think this is a bug that
> should be reported
> to upstream QT, if the feature is knobbale then it should have worked.
> --
> ___
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-qt5][PATCH 2/2] qtbase: Add packageconfigs for renameat2 and getentropy use

2018-02-22 Thread Khem Raj
On Thu, Feb 22, 2018 at 5:27 PM, Martin Jansa  wrote:
> On Wed, Feb 21, 2018 at 08:29:40PM -0800, Khem Raj wrote:
>> These features depend on underlying syscall support in kernel
>> and if older kernels are in use, then we can have a knob to
>> turn them off.
>>
>> Signed-off-by: Khem Raj 
>> ---
>>  recipes-qt/qt5/qtbase_git.bb | 6 +-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
>> index e495b8c..843648f 100644
>> --- a/recipes-qt/qt5/qtbase_git.bb
>> +++ b/recipes-qt/qt5/qtbase_git.bb
>> @@ -71,7 +71,7 @@ PACKAGECONFIG_DISTRO ?= ""
>>  PACKAGECONFIG_RELEASE ?= "release"
>>  # This is in qt5.inc, because qtwebkit-examples are using it to enable 
>> ca-certificates dependency
>>  # PACKAGECONFIG_OPENSSL ?= "openssl"
>> -PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests"
>> +PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests 
>> renameat2 getentropy"
>
> Should renameat2 be enabled by default?
>
> Either the test for it is broken in 5.11 or it's not available in
> default setup.
>

Its ok to keep them enabled by default. but I think this is a bug that
should be reported
to upstream QT, if the feature is knobbale then it should have worked.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-qt5][PATCH 2/2] qtbase: Add packageconfigs for renameat2 and getentropy use

2018-02-22 Thread Martin Jansa
On Wed, Feb 21, 2018 at 08:29:40PM -0800, Khem Raj wrote:
> These features depend on underlying syscall support in kernel
> and if older kernels are in use, then we can have a knob to
> turn them off.
> 
> Signed-off-by: Khem Raj 
> ---
>  recipes-qt/qt5/qtbase_git.bb | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
> index e495b8c..843648f 100644
> --- a/recipes-qt/qt5/qtbase_git.bb
> +++ b/recipes-qt/qt5/qtbase_git.bb
> @@ -71,7 +71,7 @@ PACKAGECONFIG_DISTRO ?= ""
>  PACKAGECONFIG_RELEASE ?= "release"
>  # This is in qt5.inc, because qtwebkit-examples are using it to enable 
> ca-certificates dependency
>  # PACKAGECONFIG_OPENSSL ?= "openssl"
> -PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests"
> +PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests 
> renameat2 getentropy"

Should renameat2 be enabled by default?

Either the test for it is broken in 5.11 or it's not available in
default setup.

In 2 very different builds it currently fail for me with:
| ERROR: Feature 'renameat2' was enabled, but the pre-condition 'config.linux 
&& tests.renameat2' failed.

| Checking for renameat2()...
| + cd 
/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/build/config.tests/renameat2
 && 
PKG_CONFIG_SYSROOT_DIR=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot
 
PKG_CONFIG_LIBDIR=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot/usr/lib/pkgconfig
 
/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot-native/usr/bin/qt5/qmake
 -qtconf 
/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/build/bin/qt.conf
 "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared 
use_gold_linker warn_off console single_arch" "QMAKE_CFLAGS += 
--sysroot=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot"
 "QMAKE_CXXFLAGS += 
--sysroot=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot"
 "QMAKE_LFLAGS += 
--sysroot=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot"
 -early "CONFIG += cross_compile" 
/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/build/config.tests/renameat2
| + cd 
/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/build/config.tests/renameat2
 && MAKEFLAGS= make
| > aarch64-webos-linux-g++  
--sysroot=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot
 -c -pipe  -O2 -pipe -g -feliminate-unused-debug-types 
-fdebug-prefix-map=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0=/usr/src/debug/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0
 
-fdebug-prefix-map=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot-native=
 
-fdebug-prefix-map=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot=
  -fvisibility-inlines-hidden 
--sysroot=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot
 
--sysroot=/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/recipe-sysroot
 -O2 -w -fPIC  -I. 
-I/OE/build/owpb/webos-ports/tmp-glibc/work/aarch64-webos-linux/qtbase/5.10.1+5.11-alpha+gitAUTOINC+17b73b0d2b-r0/git/mkspecs/linux-oe-g++
 -o main.o main.cpp
| > main.cpp: In function 'int main(int, char**)':
| > main.cpp:9:53: error: 'RENAME_NOREPLACE' was not declared in this scope
| >  renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | 
RENAME_WHITEOUT);
| >  ^~~~
| > main.cpp:9:53: note: suggested alternative: '_IOS_NOREPLACE'
| >  renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | 
RENAME_WHITEOUT);
| >  ^~~~
| >  _IOS_NOREPLACE
| > main.cpp:9:72: error: 'RENAME_WHITEOUT' was not declared in this scope
| >  renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | 
RENAME_WHITEOUT);
| >  

[oe] [meta-qt5][PATCH 2/2] qtbase: Add packageconfigs for renameat2 and getentropy use

2018-02-21 Thread Khem Raj
These features depend on underlying syscall support in kernel
and if older kernels are in use, then we can have a knob to
turn them off.

Signed-off-by: Khem Raj 
---
 recipes-qt/qt5/qtbase_git.bb | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index e495b8c..843648f 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -71,7 +71,7 @@ PACKAGECONFIG_DISTRO ?= ""
 PACKAGECONFIG_RELEASE ?= "release"
 # This is in qt5.inc, because qtwebkit-examples are using it to enable 
ca-certificates dependency
 # PACKAGECONFIG_OPENSSL ?= "openssl"
-PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests"
+PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests 
renameat2 getentropy"
 
 PACKAGECONFIG ?= " \
 ${PACKAGECONFIG_RELEASE} \
@@ -146,6 +146,10 @@ PACKAGECONFIG[widgets] = "-widgets,-no-widgets"
 PACKAGECONFIG[libproxy] = "-libproxy,-no-libproxy,libproxy"
 PACKAGECONFIG[libinput] = "-libinput,-no-libinput,libinput"
 PACKAGECONFIG[journald] = "-journald,-no-journald,systemd"
+# needs kernel 3.16+
+PACKAGECONFIG[renameat2] = "-feature-renameat2,-no-feature-renameat2,"
+# needs kernel 3.17+
+PACKAGECONFIG[getentropy] = "-feature-getentropy,-no-feature-getentropy,"
 
 QT_CONFIG_FLAGS_GOLD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 
'-use-gold-linker', '-no-use-gold-linker', d)}"
 QT_CONFIG_FLAGS += " \
-- 
2.16.2

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