Skip to contentSkip to conversation

multilib_global.bbclass: fix setting preferred version for canadian recipes

PATCH In review Chen Qi 3 participants 5 messages Mar 1, 2022 – Mar 2, 2022

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 multilib_global.bbclass: fix setting preferred version for canadian recipes

Currently the TRANSLATED_TARGET_ARCH is not changed when trying to set preferred version for canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

We need to explictly change DEFAULTTUNE to ensure TRANSLATED_TARGET_ARCH is changed when trying to set the preferred version for multilib version of the canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-i686="11.%" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

---
 meta/classes/multilib_global.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/multilib_global.bbclass +3 -0
index dae015cdaf..c77ca58997 100644
@@ -39,6 +39,9 @@ def preferred_ml_updates(d):
                     override = ":virtclass-multilib-" + p
                     localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
                     if "-canadian-" in pkg:
+                        newtune = localdata.getVar("DEFAULTTUNE:" + "virtclass-multilib-" + p, False)
+                        if newtune:
+                            localdata.setVar("DEFAULTTUNE", newtune)
                         newname = localdata.expand(v)
                     else:
                         newname = localdata.expand(v).replace(version_str, version_str + p + '-')
Signature · 1 line
2.17.1
#1 lore raw
Quoted 28 lines · Chen Qi

Currently the TRANSLATED_TARGET_ARCH is not changed when trying to set preferred version for canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

We need to explictly change DEFAULTTUNE to ensure TRANSLATED_TARGET_ARCH is changed when trying to set the preferred version for multilib version of the canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-i686="11.%" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

Quoted 4 lines
---
 meta/classes/multilib_global.bbclass | 3 +++
 1 file changed, 3 insertions(+)

This seems to break multilib builds:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/4844

Cheers,

Richard

author
#2 lore raw
Quoted 33 lines · Richard Purdie
Quoted 28 lines · Chen Qi

Currently the TRANSLATED_TARGET_ARCH is not changed when trying to set preferred version for canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

We need to explictly change DEFAULTTUNE to ensure TRANSLATED_TARGET_ARCH is changed when trying to set the preferred version for multilib version of the canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-i686="11.%" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

Quoted 4 lines
---
  meta/classes/multilib_global.bbclass | 3 +++
  1 file changed, 3 insertions(+)
Quoted 8 lines

This seems to break multilib builds:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/4844

Cheers,

Richard

Hi Richard and Ross,

I looked at the above failure. It's not caused by this patch. It's caused by the one below.

  package: do_package should depend on binutils

I could reproduce this problem by cherry-picking this commit to latest master branch. See detailed console output below.

chenqi@pek-lpg-core3:~/builds/build-poky-rm [2][0] $ bitbake lib32-core-image-minimal
Loading cache: 100% | | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#########################################################################################################################| Time: 0:00:26 Parsing of 843 .bb files complete (0 cached, 843 parsed). 2357 targets, 116 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'virtual/i686-pokymllib32-linux-binutils'. Close matches:
  virtual/lib32-i686-pokymllib32-linux-binutils
  virtual/lib32-i686-pokymllib32-linux-rust
  virtual/x86_64-poky-linux-binutils
ERROR: Required build target 'lib32-core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['lib32-core-image-minimal', 'lib32-qemuwrapper-cross', 'virtual/i686-pokymllib32-linux-binutils']

Summary: There were 2 ERROR messages, returning a non-zero exit code. chenqi@pek-lpg-core3:~/builds/build-poky-rm [2][0] $ cd - /buildarea2/chenqi/poky
chenqi@pek-lpg-core3:~/poky [2][0] $ git log --oneline origin/master..HEAD 45d7a9a750 (HEAD -> master) package: do_package should depend on binutils

Regards,

Qi

#3 lore raw
Quoted 44 lines · ChenQi
Quoted 33 lines · Richard Purdie
Quoted 28 lines · Chen Qi

Currently the TRANSLATED_TARGET_ARCH is not changed when trying to set preferred version for canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

We need to explictly change DEFAULTTUNE to ensure TRANSLATED_TARGET_ARCH is changed when trying to set the preferred version for multilib version of the canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-i686="11.%" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

Quoted 4 lines
---
  meta/classes/multilib_global.bbclass | 3 +++
  1 file changed, 3 insertions(+)
Quoted 8 lines

This seems to break multilib builds:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/4844

Cheers,

Richard

Hi Richard and Ross,

Quoted 7 lines

I looked at the above failure. It's not caused by this patch. It's caused by the one below.

  package: do_package should depend on binutils

I could reproduce this problem by cherry-picking this commit to latest master branch. See detailed console output below.

Sorry, it does look like it is Ross' change and not yours!

Ross: I think yours may also be causing the sstate sigs issue in:

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/3233/steps/14/logs/stdio

Cheers,

Richard

#4 lore raw

Also, Ross, use HOST_PREFIX please (insert grumpy face >:-| ).

Alex

Quoted 73 lines · Richard Purdie
Quoted 44 lines · ChenQi
Quoted 33 lines · Richard Purdie
Quoted 28 lines · Chen Qi

Currently the TRANSLATED_TARGET_ARCH is not changed when trying to set preferred version for canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

We need to explictly change DEFAULTTUNE to ensure TRANSLATED_TARGET_ARCH is changed when trying to set the preferred version for multilib version of the canadian recipes.

e.g.

```
bitbake core-image-minimal -c populate_sdk -e > env
grep ^PREFERRED_VERSION_gcc-cross-canadian env
```

The result is:
""" PREFERRED_VERSION_gcc-cross-canadian-i686="11.%" PREFERRED_VERSION_gcc-cross-canadian-x86-64="11.%" """

Quoted 4 lines
---
  meta/classes/multilib_global.bbclass | 3 +++
  1 file changed, 3 insertions(+)
Quoted 8 lines

This seems to break multilib builds:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/4844

Cheers,

Richard

Hi Richard and Ross,

Quoted 7 lines

I looked at the above failure. It's not caused by this patch. It's caused by the one below.

package: do_package should depend on binutils

I could reproduce this problem by cherry-picking this commit to latest master branch. See detailed console output below.

Sorry, it does look like it is Ross' change and not yours!

Ross: I think yours may also be causing the sstate sigs issue in:

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/3233/steps/14/logs/stdio

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162604): https://lists.openembedded.org/g/openembedded-core/message/162604
Mute This Topic: https://lists.openembedded.org/mt/89471636/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-