* [PATCH v2 0/2] meson: fixup nativesdk sysroot
@ 2020-12-29 3:55 Randy Li
2020-12-29 3:55 ` [PATCH v2 1/2] meson: don't turn sting into a list in nativesdk Randy Li
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Randy Li @ 2020-12-29 3:55 UTC (permalink / raw)
To: openembedded-core; +Cc: Randy Li
I still saw the request for this patch from Gstreamer users
sometimes. I have verified this version would work fine.
Only the exported SDK would need this patch.
Changelog:
V2:
fix the script for not list-type config option
Randy Li (2):
meson: don't turn sting into a list in nativesdk
meson: add sysroot property
meta/recipes-devtools/meson/meson/meson-setup.py | 10 +++++++---
meta/recipes-devtools/meson/nativesdk-meson_0.56.0.bb | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
--
2.29.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] meson: don't turn sting into a list in nativesdk
2020-12-29 3:55 [PATCH v2 0/2] meson: fixup nativesdk sysroot Randy Li
@ 2020-12-29 3:55 ` Randy Li
2020-12-30 23:38 ` [OE-core] " Peter Kjellerstedt
2020-12-29 3:55 ` [PATCH v2 2/2] meson: add sysroot property Randy Li
2020-12-30 14:05 ` [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot Richard Purdie
2 siblings, 1 reply; 9+ messages in thread
From: Randy Li @ 2020-12-29 3:55 UTC (permalink / raw)
To: openembedded-core; +Cc: Randy Li
In the current version of meson, some path variables only
accept a string not a list.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
meta/recipes-devtools/meson/meson/meson-setup.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py b/meta/recipes-devtools/meson/meson/meson-setup.py
index 808e2a062f..7acfe373fa 100755
--- a/meta/recipes-devtools/meson/meson/meson-setup.py
+++ b/meta/recipes-devtools/meson/meson/meson-setup.py
@@ -10,9 +10,13 @@ class Template(string.Template):
class Environ():
def __getitem__(self, name):
val = os.environ[name]
- val = ["'%s'" % x for x in val.split()]
- val = ', '.join(val)
- val = '[%s]' % val
+ val = val.split()
+ if len(val) > 1:
+ val = ["'%s'" % x for x in val]
+ val = ', '.join(val)
+ val = '[%s]' % val
+ else:
+ if val: val = "'%s'" % val.pop()
return val
try:
--
2.29.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] meson: add sysroot property
2020-12-29 3:55 [PATCH v2 0/2] meson: fixup nativesdk sysroot Randy Li
2020-12-29 3:55 ` [PATCH v2 1/2] meson: don't turn sting into a list in nativesdk Randy Li
@ 2020-12-29 3:55 ` Randy Li
2020-12-30 14:05 ` [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot Richard Purdie
2 siblings, 0 replies; 9+ messages in thread
From: Randy Li @ 2020-12-29 3:55 UTC (permalink / raw)
To: openembedded-core; +Cc: Randy Li
I know the environment setup script would set PKG_CONFIG_PATH,
but the meson won't take that env when translate the includedir
property from the pkg-config.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
meta/recipes-devtools/meson/nativesdk-meson_0.56.0.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.56.0.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.56.0.bb
index 67add2c25e..7fdc4c86d9 100644
--- a/meta/recipes-devtools/meson/nativesdk-meson_0.56.0.bb
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.56.0.bb
@@ -40,6 +40,7 @@ c_args = @CFLAGS
c_link_args = @LDFLAGS
cpp_args = @CPPFLAGS
cpp_link_args = @LDFLAGS
+sys_root = @OECORE_TARGET_SYSROOT
[host_machine]
system = '${SDK_OS}'
--
2.29.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot
2020-12-29 3:55 [PATCH v2 0/2] meson: fixup nativesdk sysroot Randy Li
2020-12-29 3:55 ` [PATCH v2 1/2] meson: don't turn sting into a list in nativesdk Randy Li
2020-12-29 3:55 ` [PATCH v2 2/2] meson: add sysroot property Randy Li
@ 2020-12-30 14:05 ` Richard Purdie
2020-12-31 1:46 ` Randy Li
2 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2020-12-30 14:05 UTC (permalink / raw)
To: Randy Li, openembedded-core
On Tue, 2020-12-29 at 11:55 +0800, Randy Li wrote:
> I still saw the request for this patch from Gstreamer users
> sometimes. I have verified this version would work fine.
>
> Only the exported SDK would need this patch.
Thanks for the patches, is there something we should add to the
automated tests (e.g. in meta/lib/oeqa/sdk/cases) to test this?
Cheers,
Richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [OE-core] [PATCH v2 1/2] meson: don't turn sting into a list in nativesdk
2020-12-29 3:55 ` [PATCH v2 1/2] meson: don't turn sting into a list in nativesdk Randy Li
@ 2020-12-30 23:38 ` Peter Kjellerstedt
2020-12-31 1:51 ` Randy Li
0 siblings, 1 reply; 9+ messages in thread
From: Peter Kjellerstedt @ 2020-12-30 23:38 UTC (permalink / raw)
To: Randy Li, openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Randy Li
> Sent: den 29 december 2020 04:56
> To: openembedded-core@lists.openembedded.org
> Cc: Randy Li <ayaka@soulik.info>
> Subject: [OE-core] [PATCH v2 1/2] meson: don't turn sting into a list in
> nativesdk
Change "sting" to "string".
>
> In the current version of meson, some path variables only
> accept a string not a list.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
> meta/recipes-devtools/meson/meson/meson-setup.py | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py
> b/meta/recipes-devtools/meson/meson/meson-setup.py
> index 808e2a062f..7acfe373fa 100755
> --- a/meta/recipes-devtools/meson/meson/meson-setup.py
> +++ b/meta/recipes-devtools/meson/meson/meson-setup.py
> @@ -10,9 +10,13 @@ class Template(string.Template):
> class Environ():
> def __getitem__(self, name):
> val = os.environ[name]
> - val = ["'%s'" % x for x in val.split()]
> - val = ', '.join(val)
> - val = '[%s]' % val
> + val = val.split()
> + if len(val) > 1:
> + val = ["'%s'" % x for x in val]
> + val = ', '.join(val)
> + val = '[%s]' % val
> + else:
> + if val: val = "'%s'" % val.pop()
Change to:
elif val:
val = "'%s'" % val.pop()
> return val
>
> try:
> --
> 2.29.2
//Peter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot
2020-12-30 14:05 ` [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot Richard Purdie
@ 2020-12-31 1:46 ` Randy Li
2020-12-31 4:43 ` Naveen Saini
0 siblings, 1 reply; 9+ messages in thread
From: Randy Li @ 2020-12-31 1:46 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
> On Dec 30, 2020, at 10:05 PM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
>
>> On Tue, 2020-12-29 at 11:55 +0800, Randy Li wrote:
>> I still saw the request for this patch from Gstreamer users
>> sometimes. I have verified this version would work fine.
>>
>> Only the exported SDK would need this patch.
>
> Thanks for the patches, is there something we should add to the
> automated tests (e.g. in meta/lib/oeqa/sdk/cases) to test this?
>
The original case is that when I was compiling the Gstreamer plugins bad for Intel Media SDK, the include path from the pkg-config would be one without sysroot. Most of packages won’t meet such problem, they can just ordinary includedir, which is not from meson but compiler I think, then prepend a package name when its code include thems.
I think this case only fix those package using meson and need to get something likes path information from the pkg-config.
I have not read the QA part, so I don’t know what is necessary for such case. Maybe a check for the environment variables from all those auto build tools ? I need to read and make the right comment as well as I welcome the idea from the others.
> Cheers,
>
> Richard
>
Sincerely
Randy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [OE-core] [PATCH v2 1/2] meson: don't turn sting into a list in nativesdk
2020-12-30 23:38 ` [OE-core] " Peter Kjellerstedt
@ 2020-12-31 1:51 ` Randy Li
0 siblings, 0 replies; 9+ messages in thread
From: Randy Li @ 2020-12-31 1:51 UTC (permalink / raw)
To: Peter Kjellerstedt; +Cc: openembedded-core@lists.openembedded.org
On Dec 31, 2020, at 7:38 AM, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
>> -----Original Message-----
>> From: openembedded-core@lists.openembedded.org <openembedded-
>> core@lists.openembedded.org> On Behalf Of Randy Li
>> Sent: den 29 december 2020 04:56
>> To: openembedded-core@lists.openembedded.org
>> Cc: Randy Li <ayaka@soulik.info>
>> Subject: [OE-core] [PATCH v2 1/2] meson: don't turn sting into a list in
>> nativesdk
>
> Change "sting" to "string".
>
Thanks, I noted that just after I sent it, but I think maintainers or someone would correct it when it is merged.
>>
>> In the current version of meson, some path variables only
>> accept a string not a list.
>>
>> Signed-off-by: Randy Li <ayaka@soulik.info>
>> ---
>> meta/recipes-devtools/meson/meson/meson-setup.py | 10 +++++++---
>> 1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py
>> b/meta/recipes-devtools/meson/meson/meson-setup.py
>> index 808e2a062f..7acfe373fa 100755
>> --- a/meta/recipes-devtools/meson/meson/meson-setup.py
>> +++ b/meta/recipes-devtools/meson/meson/meson-setup.py
>> @@ -10,9 +10,13 @@ class Template(string.Template):
>> class Environ():
>> def __getitem__(self, name):
>> val = os.environ[name]
>> - val = ["'%s'" % x for x in val.split()]
>> - val = ', '.join(val)
>> - val = '[%s]' % val
>> + val = val.split()
>> + if len(val) > 1:
>> + val = ["'%s'" % x for x in val]
>> + val = ', '.join(val)
>> + val = '[%s]' % val
>> + else:
>> + if val: val = "'%s'" % val.pop()
>
> Change to:
>
> elif val:
> val = "'%s'" % val.pop()
>
Nice catch, if this patch would merge for this version and not wait for the QA case, I would suggest you appended be merged. Or I would ship them in the next version with the QA case.
>> return val
>>
>> try:
>> --
>> 2.29.2
>
> //Peter
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot
2020-12-31 1:46 ` Randy Li
@ 2020-12-31 4:43 ` Naveen Saini
2020-12-31 6:15 ` Randy Li
0 siblings, 1 reply; 9+ messages in thread
From: Naveen Saini @ 2020-12-31 4:43 UTC (permalink / raw)
To: Randy Li, Richard Purdie; +Cc: openembedded-core@lists.openembedded.org
This failing in case of non-native sdk too, where PKG_CONFIG_SYSROOT_DIR is also exported. It does not prepend PKG_CONFIG_SYSROOT_DIR path.
I think it should be fixed manually by prepending sysroot path.
+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
mfx_incdir = mfx_dep.get_pkgconfig_variable('includedir')
+ mfx_incdir = pkgconf_sysroot + mfx_incdir
Ref: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch#n26
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Randy Li
> Sent: Thursday, December 31, 2020 9:46 AM
> To: Richard Purdie <richard.purdie@linuxfoundation.org>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot
>
>
> > On Dec 30, 2020, at 10:05 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> >> On Tue, 2020-12-29 at 11:55 +0800, Randy Li wrote:
> >> I still saw the request for this patch from Gstreamer users
> >> sometimes. I have verified this version would work fine.
> >>
> >> Only the exported SDK would need this patch.
> >
> > Thanks for the patches, is there something we should add to the
> > automated tests (e.g. in meta/lib/oeqa/sdk/cases) to test this?
> >
> The original case is that when I was compiling the Gstreamer plugins bad for
> Intel Media SDK, the include path from the pkg-config would be one without
> sysroot. Most of packages won’t meet such problem, they can just ordinary
> includedir, which is not from meson but compiler I think, then prepend a
> package name when its code include thems.
>
> I think this case only fix those package using meson and need to get
> something likes path information from the pkg-config.
>
> I have not read the QA part, so I don’t know what is necessary for such case.
> Maybe a check for the environment variables from all those auto build tools ?
> I need to read and make the right comment as well as I welcome the idea
> from the others.
> > Cheers,
> >
> > Richard
> >
> Sincerely
> Randy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot
2020-12-31 4:43 ` Naveen Saini
@ 2020-12-31 6:15 ` Randy Li
0 siblings, 0 replies; 9+ messages in thread
From: Randy Li @ 2020-12-31 6:15 UTC (permalink / raw)
To: Saini, Naveen Kumar
Cc: Richard Purdie, openembedded-core@lists.openembedded.org
[-- Attachment #1: Type: text/plain, Size: 2830 bytes --]
> On Dec 31, 2020, at 12:43 PM, Saini, Naveen Kumar <naveen.kumar.saini@intel.com> wrote:
>
> This failing in case of non-native sdk too, where PKG_CONFIG_SYSROOT_DIR is also exported. It does not prepend PKG_CONFIG_SYSROOT_DIR path.
>
> I think it should be fixed manually by prepending sysroot path.
I was having such plan but Gstreamer people said it should be fixed in OE itself
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1253
>
> + pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
> mfx_incdir = mfx_dep.get_pkgconfig_variable('includedir')
> + mfx_incdir = pkgconf_sysroot + mfx_incdir
>
Sorry, I don’t what the non-native sdk means here, since get_pkgconfig_variable('includedir') from meson would apply the pkgconfig sysroot setting from the meson, it would be fine.
>
> Ref: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch#n26
>
>
>> -----Original Message-----
>> From: openembedded-core@lists.openembedded.org <openembedded-
>> core@lists.openembedded.org> On Behalf Of Randy Li
>> Sent: Thursday, December 31, 2020 9:46 AM
>> To: Richard Purdie <richard.purdie@linuxfoundation.org>
>> Cc: openembedded-core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot
>>
>>
>>> On Dec 30, 2020, at 10:05 PM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>>>
>>>> On Tue, 2020-12-29 at 11:55 +0800, Randy Li wrote:
>>>> I still saw the request for this patch from Gstreamer users
>>>> sometimes. I have verified this version would work fine.
>>>>
>>>> Only the exported SDK would need this patch.
>>>
>>> Thanks for the patches, is there something we should add to the
>>> automated tests (e.g. in meta/lib/oeqa/sdk/cases) to test this?
>>>
>> The original case is that when I was compiling the Gstreamer plugins bad for
>> Intel Media SDK, the include path from the pkg-config would be one without
>> sysroot. Most of packages won’t meet such problem, they can just ordinary
>> includedir, which is not from meson but compiler I think, then prepend a
>> package name when its code include thems.
>>
>> I think this case only fix those package using meson and need to get
>> something likes path information from the pkg-config.
>>
>> I have not read the QA part, so I don’t know what is necessary for such case.
>> Maybe a check for the environment variables from all those auto build tools ?
>> I need to read and make the right comment as well as I welcome the idea
>> from the others.
>>> Cheers,
>>>
>>> Richard
>>>
>> Sincerely
>> Randy
[-- Attachment #2: Type: text/html, Size: 6718 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-12-31 6:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-29 3:55 [PATCH v2 0/2] meson: fixup nativesdk sysroot Randy Li
2020-12-29 3:55 ` [PATCH v2 1/2] meson: don't turn sting into a list in nativesdk Randy Li
2020-12-30 23:38 ` [OE-core] " Peter Kjellerstedt
2020-12-31 1:51 ` Randy Li
2020-12-29 3:55 ` [PATCH v2 2/2] meson: add sysroot property Randy Li
2020-12-30 14:05 ` [OE-core] [PATCH v2 0/2] meson: fixup nativesdk sysroot Richard Purdie
2020-12-31 1:46 ` Randy Li
2020-12-31 4:43 ` Naveen Saini
2020-12-31 6:15 ` Randy Li
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.