meson: add sysroot property

Submitted by ayaka on Sept. 30, 2020, 3:05 p.m. | Patch ID: 176907

Details

Message ID 20200930150545.3882859-1-ayaka@soulik.info
State New
Headers show

Commit Message

ayaka Sept. 30, 2020, 3:05 p.m.
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: ayaka <ayaka@soulik.info>
---
 meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
index 67add2c25e..7fdc4c86d9 100644
--- a/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.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}'

Comments

Alexander Kanavin Sept. 30, 2020, 4:40 p.m.
Wait, how does it work in native meson then?

Alex

On Wed 30. Sep 2020 at 17.06, ayaka <ayaka@soulik.info> wrote:

> 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: ayaka <ayaka@soulik.info>
>
> ---
>
>  meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb | 1 +
>
>  1 file changed, 1 insertion(+)
>
>
>
> diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
> b/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>
> index 67add2c25e..7fdc4c86d9 100644
>
> --- a/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>
> +++ b/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.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.25.4
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142939): https://lists.openembedded.org/g/openembedded-core/message/142939
Mute This Topic: https://lists.openembedded.org/mt/77219311/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
ayaka Oct. 1, 2020, 4:14 a.m.
On 01/10/2020 00:40, Alexander Kanavin wrote:
> Wait, how does it work in native meson then?
>
It is the nativesdk meson has this problem, that is what cross build 
requests for.

You can try the Intel MediaSDK, I reported this issue to Gstreamer for 
this but it comes to the issue of OE.

Or you mean the native meson for the target system ? I don't think they 
need a cross build file.

> Alex
>
> On Wed 30. Sep 2020 at 17.06, ayaka <ayaka@soulik.info 
> <mailto:ayaka@soulik.info>> wrote:
>
>     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: ayaka <ayaka@soulik.info <mailto:ayaka@soulik.info>>
>
>     ---
>
>      meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>     <http://nativesdk-meson_0.55.1.bb> | 1 +
>
>      1 file changed, 1 insertion(+)
>
>
>
>     diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>     <http://nativesdk-meson_0.55.1.bb>
>     b/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>     <http://nativesdk-meson_0.55.1.bb>
>
>     index 67add2c25e..7fdc4c86d9 100644
>
>     --- a/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>     <http://nativesdk-meson_0.55.1.bb>
>
>     +++ b/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>     <http://nativesdk-meson_0.55.1.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.25.4
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142990): https://lists.openembedded.org/g/openembedded-core/message/142990
Mute This Topic: https://lists.openembedded.org/mt/77219311/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Khem Raj Oct. 1, 2020, 4:33 a.m.
On Wed, Sep 30, 2020 at 9:40 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Wait, how does it work in native meson then?
>

native technical is not cross compiled but nativesdk is in a way same
as building a target package.

> Alex
>
> On Wed 30. Sep 2020 at 17.06, ayaka <ayaka@soulik.info> wrote:
>>
>> 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: ayaka <ayaka@soulik.info>
>>
>> ---
>>
>>  meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb | 1 +
>>
>>  1 file changed, 1 insertion(+)
>>
>>
>>
>> diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>>
>> index 67add2c25e..7fdc4c86d9 100644
>>
>> --- a/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb
>>
>> +++ b/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.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.25.4
>>
>>
>>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142991): https://lists.openembedded.org/g/openembedded-core/message/142991
Mute This Topic: https://lists.openembedded.org/mt/77219311/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Alexander Kanavin Oct. 1, 2020, 9:21 a.m.
On Thu, 1 Oct 2020 at 06:15, ayaka <ayaka@soulik.info> wrote:

> It is the nativesdk meson has this problem, that is what cross build
> requests for.
>
> You can try the Intel MediaSDK, I reported this issue to Gstreamer for
> this but it comes to the issue of OE.
>
> Or you mean the native meson for the target system ? I don't think they
> need a cross build file.
>

native meson does use a cross file when building target packages, and
things work without sysroot property, including using pkg-config:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/meson.bbclass

So I worry that your patch is fixing a symptom and not the problem.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142993): https://lists.openembedded.org/g/openembedded-core/message/142993
Mute This Topic: https://lists.openembedded.org/mt/77219311/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Khem Raj Oct. 1, 2020, 8:38 p.m.
On Thu, Oct 1, 2020 at 2:22 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> On Thu, 1 Oct 2020 at 06:15, ayaka <ayaka@soulik.info> wrote:
>>
>> It is the nativesdk meson has this problem, that is what cross build
>> requests for.
>>
>> You can try the Intel MediaSDK, I reported this issue to Gstreamer for
>> this but it comes to the issue of OE.
>>
>> Or you mean the native meson for the target system ? I don't think they
>> need a cross build file.
>
>
> native meson does use a cross file when building target packages, and things work without sysroot property, including using pkg-config:
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/meson.bbclass
>

if meson used its defaults ( which means looking into native rootfs on
build system ) perhaps is fine for native packages since they don't
execute on
other build systems, but not so for nativesdk and target packages

> So I worry that your patch is fixing a symptom and not the problem.
>
> Alex
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#143010): https://lists.openembedded.org/g/openembedded-core/message/143010
Mute This Topic: https://lists.openembedded.org/mt/77219311/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
ayaka Oct. 10, 2020, 7:43 p.m.
On 02/10/2020 04:38, Khem Raj wrote:
> On Thu, Oct 1, 2020 at 2:22 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>> On Thu, 1 Oct 2020 at 06:15, ayaka <ayaka@soulik.info> wrote:
>>> It is the nativesdk meson has this problem, that is what cross build
>>> requests for.
>>>
>>> You can try the Intel MediaSDK, I reported this issue to Gstreamer for
>>> this but it comes to the issue of OE.
>>>
>>> Or you mean the native meson for the target system ? I don't think they
>>> need a cross build file.
>>
>> native meson does use a cross file when building target packages, and things work without sysroot property, including using pkg-config:
>> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/meson.bbclass
>>
> if meson used its defaults ( which means looking into native rootfs on
> build system ) perhaps is fine for native packages since they don't
> execute on
> other build systems, but not so for nativesdk and target packages

Yes, I didn't make myself clearly, I am using the SDK from populate_sdk

I didn't try the latest master next but this issue still happened until 
the current stable version

>> So I worry that your patch is fixing a symptom and not the problem.
>>
>> Alex
>>
>>
>>
>>
>> 
>>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#143207): https://lists.openembedded.org/g/openembedded-core/message/143207
Mute This Topic: https://lists.openembedded.org/mt/77219311/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-