go: fix multilib file conflicts
PATCH 1/1 go: fix multilib file conflicts
From: Changqing Li <[email protected]>
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
--- meta/recipes-devtools/go/go_1.25.4.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-devtools/go/go_1.25.4.bb +3 -1
@@ -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() {
Signature · 1 line
2.34.1
Quoted 8 lines · Changqing Li via lists.openembedded.org
From: Changqing Li <[email protected]>
This is for fixing the following error of 'bitbake meta-go-toolchain'
when multilib is enabled:
Error: Transaction test error:
file/usr/bin/goconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32 file/usr/bin/gofmtconflicts 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
Quoted 4 lines · Ross Burton
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<[email protected]> wrote:
Quoted 8 lines
Quoted 7 lines
From: Changqing Li<[email protected]>
This is for fixing the following error of 'bitbake meta-go-toolchain'
when multilib is enabled:
Error: Transaction test error:
file/usr/bin/goconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32 file/usr/bin/gofmtconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32Why 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
Quoted 4 lines
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
Quoted 24 lines · Changqing Li via lists.openembedded.org
Quoted 7 lines · Ross Burton
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.Quoted 2 lines · Changqing Li via lists.openembedded.org
From: Changqing Li <[email protected]>
Quoted 7 lines
Quoted 6 lines
This is for fixing the following error of 'bitbake meta-go-toolchain'
when multilib is enabled:
Error: Transaction test error:
file/usr/bin/goconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32 file/usr/bin/gofmtconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32Why 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" ```
Quoted 8 lines
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
Quoted 29 lines · Ross Burton
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.Quoted 25 lines · Changqing Li via lists.openembedded.org
Quoted 7 lines · Ross Burton
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.Quoted 2 lines · Changqing Li via lists.openembedded.org
From: Changqing Li <[email protected]>
Quoted 7 lines
Quoted 6 lines
This is for fixing the following error of 'bitbake meta-go-toolchain'
when multilib is enabled:
Error: Transaction test error:
file/usr/bin/goconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32 file/usr/bin/gofmtconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32Why 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.
Quoted 7 lines
Quoted 6 lines
[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
Quoted 2 lines
Ross
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 37 lines · Changqing Li via lists.openembedded.org
Quoted 35 lines · Ross Burton
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.Quoted 31 lines · Changqing Li via lists.openembedded.org
Quoted 7 lines · Ross Burton
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.Quoted 2 lines · Changqing Li via lists.openembedded.org
From: Changqing Li <[email protected]>
Quoted 7 lines
Quoted 6 lines
This is for fixing the following error of 'bitbake meta-go-toolchain'
when multilib is enabled:
Error: Transaction test error:
file/usr/bin/goconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32 file/usr/bin/gofmtconflicts between attempted installs of go-1.25.4-r0.x86_64_v3 and lib32-go-1.25.4-r0.core2_32Why 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.
Quoted 7 lines
Quoted 1 line
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
Quoted 12 lines
Quoted 3 lines
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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-