public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] go: fix multilib file conflicts
@ 2025-12-22  3:24 changqing.li
  2026-01-05 18:08 ` [OE-core] " Ross Burton
  0 siblings, 1 reply; 6+ messages in thread
From: changqing.li @ 2025-12-22  3:24 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

This is for fixing the following error of 'bitbake meta-go-toolchain'
when multilib is enabled:
Error: Transaction test error:
   file /usr/bin/go conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
   file /usr/bin/gofmt conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-devtools/go/go_1.25.4.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/go/go_1.25.4.bb b/meta/recipes-devtools/go/go_1.25.4.bb
index 46f5fbc6be..372aa9538c 100644
--- a/meta/recipes-devtools/go/go_1.25.4.bb
+++ b/meta/recipes-devtools/go/go_1.25.4.bb
@@ -1,7 +1,7 @@
 require go-${PV}.inc
 require go-target.inc
 
-inherit linuxloader
+inherit linuxloader multilib_script
 
 CGO_LDFLAGS:append = " -no-pie"
 
@@ -9,6 +9,8 @@ export GO_LDSO = "${@get_linuxloader(d)}"
 export CC_FOR_TARGET = "gcc"
 export CXX_FOR_TARGET = "g++"
 
+MULTILIB_SCRIPTS = "${PN}:${bindir}/go ${PN}:${bindir}/gofmt"
+
 # mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its
 # variants.
 python() {
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] go: fix multilib file conflicts
  2025-12-22  3:24 [PATCH] go: fix multilib file conflicts changqing.li
@ 2026-01-05 18:08 ` Ross Burton
  2026-01-06  1:15   ` Changqing Li
  0 siblings, 1 reply; 6+ messages in thread
From: Ross Burton @ 2026-01-05 18:08 UTC (permalink / raw)
  To: changqing.li@windriver.com; +Cc: openembedded-core@lists.openembedded.org

On 22 Dec 2025, at 03:24, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
> 
> From: Changqing Li <changqing.li@windriver.com>
> 
> This is for fixing the following error of 'bitbake meta-go-toolchain'
> when multilib is enabled:
> Error: Transaction test error:
>   file /usr/bin/go conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
>   file /usr/bin/gofmt conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32

Why would you do this though?  We don’t support installing bash and lib32-bash either.

If the goal is “I want to build 32-bit go apps in my 64-bit userspace” then luckily go is always a cross-compiler and you can just set GOARCH when building with the standard go.

Ross

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] go: fix multilib file conflicts
  2026-01-05 18:08 ` [OE-core] " Ross Burton
@ 2026-01-06  1:15   ` Changqing Li
  2026-01-08 10:10     ` Ross Burton
  0 siblings, 1 reply; 6+ messages in thread
From: Changqing Li @ 2026-01-06  1:15 UTC (permalink / raw)
  To: Ross Burton
  Cc: openembedded-core@lists.openembedded.org, Khem Raj,
	Alexander Kanavin

[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]


On 1/6/26 02:08, Ross Burton wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 22 Dec 2025, at 03:24, Changqing Li via lists.openembedded.org<changqing.li=windriver.com@lists.openembedded.org> wrote:
>> From: Changqing Li<changqing.li@windriver.com>
>>
>> This is for fixing the following error of 'bitbake meta-go-toolchain'
>> when multilib is enabled:
>> Error: Transaction test error:
>>    file /usr/bin/go conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
>>    file /usr/bin/gofmt conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
> Why would you do this though?  We don’t support installing bash and lib32-bash either.

Hi, Ross

The issue reproduced when multilib is enabled globally in local.conf by 
following config:

```

require conf/multilib.conf
MULTILIBS ?= "multilib:lib32"
DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"

```

bitbake meta-go-toolchain will failed with above failure.

[snip of meta-go-toolchain.bb]

TOOLCHAIN_TARGET_TASK:append = " \ ${@multilib_pkg_extend(d, 
'packagegroup-go-sdk-target')} \ "

[snip of meta-go-toolchain.bb]


go is in packagegroup-go-sdk-target,  it is extended by 
multilib_pkg_extend.  so both go and lib32-go will be installed.

go is added in to packagegroup-go-sdk-target for providing entire 
toolchain include compiler.


Regards

Changqing

>
> If the goal is “I want to build 32-bit go apps in my 64-bit userspace” then luckily go is always a cross-compiler and you can just set GOARCH when building with the standard go.
>
> Ross

[-- Attachment #2: Type: text/html, Size: 3105 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] go: fix multilib file conflicts
  2026-01-06  1:15   ` Changqing Li
@ 2026-01-08 10:10     ` Ross Burton
  2026-01-12  4:52       ` Changqing Li
       [not found]       ` <1889E2B366748363.2902090@lists.openembedded.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Ross Burton @ 2026-01-08 10:10 UTC (permalink / raw)
  To: changqing.li@windriver.com
  Cc: openembedded-core@lists.openembedded.org, Khem Raj,
	Alexander Kanavin

On 6 Jan 2026, at 01:15, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
> 
> 
> On 1/6/26 02:08, Ross Burton wrote:
>> CAUTION: This email comes from a non Wind River email account!
>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>> 
>> On 22 Dec 2025, at 03:24, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
>> 
>>> From: Changqing Li <changqing.li@windriver.com>
>>> 
>>> This is for fixing the following error of 'bitbake meta-go-toolchain'
>>> when multilib is enabled:
>>> Error: Transaction test error:
>>> file /usr/bin/go conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
>>> file /usr/bin/gofmt conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
>>> 
>> Why would you do this though? We don’t support installing bash and lib32-bash either.
> Hi, Ross
> The issue reproduced when multilib is enabled globally in local.conf by following config:
> ```
> require conf/multilib.conf
> MULTILIBS ?= "multilib:lib32"
> DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"
> ```
> bitbake meta-go-toolchain will failed with above failure.
> 
> [snip of meta-go-toolchain.bb]
> TOOLCHAIN_TARGET_TASK:append = " \ ${@multilib_pkg_extend(d, 'packagegroup-go-sdk-target')} \ " 
> [snip of meta-go-toolchain.bb]
> 
> go is in packagegroup-go-sdk-target,  it is extended by multilib_pkg_extend.  so both go and lib32-go will be installed.
> go is added in to packagegroup-go-sdk-target for providing entire toolchain include compiler.

Maybe the packagegroup shouldn’t be doing that expansion then?

Ross

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] go: fix multilib file conflicts
  2026-01-08 10:10     ` Ross Burton
@ 2026-01-12  4:52       ` Changqing Li
       [not found]       ` <1889E2B366748363.2902090@lists.openembedded.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Changqing Li @ 2026-01-12  4:52 UTC (permalink / raw)
  To: Ross Burton
  Cc: openembedded-core@lists.openembedded.org, Khem Raj,
	Alexander Kanavin


On 1/8/26 18:10, Ross Burton wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 6 Jan 2026, at 01:15, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
>>
>> On 1/6/26 02:08, Ross Burton wrote:
>>> CAUTION: This email comes from a non Wind River email account!
>>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>>
>>> On 22 Dec 2025, at 03:24, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
>>>
>>>> From: Changqing Li <changqing.li@windriver.com>
>>>>
>>>> This is for fixing the following error of 'bitbake meta-go-toolchain'
>>>> when multilib is enabled:
>>>> Error: Transaction test error:
>>>> file /usr/bin/go conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
>>>> file /usr/bin/gofmt conflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
>>>>
>>> Why would you do this though? We don’t support installing bash and lib32-bash either.
>> Hi, Ross
>> The issue reproduced when multilib is enabled globally in local.conf by following config:
>> ```
>> require conf/multilib.conf
>> MULTILIBS ?= "multilib:lib32"
>> DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"
>> ```
>> bitbake meta-go-toolchain will failed with above failure.
>>
>> [snip of meta-go-toolchain.bb]
>> TOOLCHAIN_TARGET_TASK:append = " \ ${@multilib_pkg_extend(d, 'packagegroup-go-sdk-target')} \ "
>> [snip of meta-go-toolchain.bb]
>>
>> go is in packagegroup-go-sdk-target,  it is extended by multilib_pkg_extend.  so both go and lib32-go will be installed.
>> go is added in to packagegroup-go-sdk-target for providing entire toolchain include compiler.
> Maybe the packagegroup shouldn’t be doing that expansion then?

We don't want go to be extended, but packagegroup-go-sdk-target not only include go, it also includes go-runtime/go-runtime-dev, we need to extend go-runtime/go-runtime-dev.

so fix go packaging for multilib as this patch to avoid the conflicts issue.

//Changqing

>
> Ross


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] go: fix multilib file conflicts
       [not found]       ` <1889E2B366748363.2902090@lists.openembedded.org>
@ 2026-01-21  2:00         ` Changqing Li
  0 siblings, 0 replies; 6+ messages in thread
From: Changqing Li @ 2026-01-21  2:00 UTC (permalink / raw)
  To: Ross Burton, openembedded-core@lists.openembedded.org
  Cc: Khem Raj, Alexander Kanavin


On 1/12/26 12:52, Changqing Li via lists.openembedded.org wrote:
>
> On 1/8/26 18:10, Ross Burton wrote:
>> CAUTION: This email comes from a non Wind River email account!
>> Do not click links or open attachments unless you recognize the 
>> sender and know the content is safe.
>>
>> On 6 Jan 2026, at 01:15, Changqing Li via lists.openembedded.org 
>> <changqing.li=windriver.com@lists.openembedded.org> wrote:
>>>
>>> On 1/6/26 02:08, Ross Burton wrote:
>>>> CAUTION: This email comes from a non Wind River email account!
>>>> Do not click links or open attachments unless you recognize the 
>>>> sender and know the content is safe.
>>>>
>>>> On 22 Dec 2025, at 03:24, Changqing Li via lists.openembedded.org 
>>>> <changqing.li=windriver.com@lists.openembedded.org> wrote:
>>>>
>>>>> From: Changqing Li <changqing.li@windriver.com>
>>>>>
>>>>> This is for fixing the following error of 'bitbake meta-go-toolchain'
>>>>> when multilib is enabled:
>>>>> Error: Transaction test error:
>>>>> file /usr/bin/go conflicts between attempted installs of 
>>>>> go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
>>>>> file /usr/bin/gofmt conflicts between attempted installs of 
>>>>> go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32
>>>>>
>>>> Why would you do this though? We don’t support installing bash and 
>>>> lib32-bash either.
>>> Hi, Ross
>>> The issue reproduced when multilib is enabled globally in local.conf 
>>> by following config:
>>> ```
>>> require conf/multilib.conf
>>> MULTILIBS ?= "multilib:lib32"
>>> DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"
>>> ```
>>> bitbake meta-go-toolchain will failed with above failure.
>>>
>>> [snip of meta-go-toolchain.bb]
>>> TOOLCHAIN_TARGET_TASK:append = " \ ${@multilib_pkg_extend(d, 
>>> 'packagegroup-go-sdk-target')} \ "
>>> [snip of meta-go-toolchain.bb]
>>>
>>> go is in packagegroup-go-sdk-target,  it is extended by 
>>> multilib_pkg_extend.  so both go and lib32-go will be installed.
>>> go is added in to packagegroup-go-sdk-target for providing entire 
>>> toolchain include compiler.
>> Maybe the packagegroup shouldn’t be doing that expansion then?
>
> We don't want go to be extended, but packagegroup-go-sdk-target not 
> only include go, it also includes go-runtime/go-runtime-dev, we need 
> to extend go-runtime/go-runtime-dev.
>
> so fix go packaging for multilib as this patch to avoid the conflicts 
> issue.
>
> //Changqing

ping

//Changqing

>
>>
>> Ross
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#229183): https://lists.openembedded.org/g/openembedded-core/message/229183
> Mute This Topic: https://lists.openembedded.org/mt/116896974/3616873
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [changqing.li@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-21  2:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-22  3:24 [PATCH] go: fix multilib file conflicts changqing.li
2026-01-05 18:08 ` [OE-core] " Ross Burton
2026-01-06  1:15   ` Changqing Li
2026-01-08 10:10     ` Ross Burton
2026-01-12  4:52       ` Changqing Li
     [not found]       ` <1889E2B366748363.2902090@lists.openembedded.org>
2026-01-21  2:00         ` Changqing Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox