Skip to contentSkip to conversation

yq: Drop {LINKSHARED}

PATCH Superseded [email protected] 3 participants 6 messages Mar 7, 2023 – Mar 8, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 yq: Drop {LINKSHARED}

From: Mingli Yu <[email protected]>

Drop {LINKSHARED} to fix the below build failure.
WARNING: /build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/temp/run.do_compile.923432:185 exit 1 from 'aarch64-wrs-linux-go install -linkshared -p 48 -v -ldflags="-r /usr/lib64/go/pkg/linux_arm64_dynlink -I /lib64/ld-linux-aarch64.so.1 -extldflags ' -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot -Wl,-rpath-link=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot/usr/lib64/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now'" -trimpath -buildmode=pie go_list_packages'

Before the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 5.2M	/usr/bin/yq

After the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 9.0M	/usr/bin/yq
---
 recipes-devtools/yq/yq_git.bb | 7 +++++++
 1 file changed, 7 insertions(+)
recipes-devtools/yq/yq_git.bb +7 -0
index 45f2f970..b3e00473 100644
@@ -50,6 +50,13 @@ GO_IMPORT = "github.com/mikefarah/yq"
 
 inherit go ptest
 
+go_do_compile() {
+	export TMPDIR="${GOTMPDIR}"
+	if [ -n "${GO_INSTALL}" ]; then
+		${GO} install ${GOBUILDFLAGS} `go_list_packages`
+	fi
+}
+
 do_compile:prepend() {
     # arrange for some of the golang built ins to be found
     (
Signature · 1 line
2.25.1
#1 lore raw
Quoted 34 lines · Mingli

From: Mingli Yu <[email protected]>

Drop {LINKSHARED} to fix the below build failure.
WARNING: /build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/temp/run.do_compile.923432:185 exit 1 from 'aarch64-wrs-linux-go install -linkshared -p 48 -v -ldflags="-r /usr/lib64/go/pkg/linux_arm64_dynlink -I /lib64/ld-linux-aarch64.so.1 -extldflags ' -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot -Wl,-rpath-link=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot/usr/lib64/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now'" -trimpath -buildmode=pie go_list_packages'

Before the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 5.2M   /usr/bin/yq

After the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 9.0M   /usr/bin/yq
---
 recipes-devtools/yq/yq_git.bb | 7 +++++++
 1 file changed, 7 insertions(+)
recipes-devtools/yq/yq_git.bb +0 -0
index 45f2f970..b3e00473 100644

recipes-devtools/yq/yq_git.bb GO_IMPORT = "github.com/mikefarah/yq" · line 58

Quoted 9 lines
recipes-devtools/yq/yq_git.bb +6 -0
@@ -50,6 +50,13 @@ GO_IMPORT = "github.com/mikefarah/yq"
 
 inherit go ptest
 
+go_do_compile() {
+       export TMPDIR="${GOTMPDIR}"
+       if [ -n "${GO_INSTALL}" ]; then
+               ${GO} install ${GOBUILDFLAGS} `go_list_packages`
+       fi
+}

My preference is implement do_compile, versus go_do_compile, since the go.bbclass rarely does the right thing by default.

There's only one other go_do_compile that slipped through my normal checks (buildah), and I have a local patch removing it, that I'll push to master-next shortly. buildah also had linkeshared issues :)

Bruce

Quoted 16 lines
recipes-devtools/yq/yq_git.bb +1 -1
+
 do_compile:prepend() {
     # arrange for some of the golang built ins to be found
     (
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7929): https://lists.yoctoproject.org/g/meta-virtualization/message/7929
Mute This Topic: https://lists.yoctoproject.org/mt/97442079/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#2 lore raw
In reply to [email protected]

Hi

Yu, Mingli <[email protected]> escreveu no dia terça, 7/03/2023 à(s) 02:48:

Quoted 49 lines

From: Mingli Yu <[email protected]>

Drop {LINKSHARED} to fix the below build failure.
WARNING:
/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/temp/run.do_compile.923432:185 exit 1 from 'aarch64-wrs-linux-go install -linkshared -p 48 -v -ldflags="-r /usr/lib64/go/pkg/linux_arm64_dynlink -I /lib64/ld-linux-aarch64.so.1

(quoted diff) +0 -13
-extldflags ' -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong
-O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
--sysroot=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot
-Wl,-rpath-link=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot/usr/lib64/go/pkg/linux_arm64_dynlink
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0
-fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0
-fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0
-fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0
-fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot=
-fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot=
-fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot-native=
-Wl,-z,relro,-z,now'" -trimpath -buildmode=pie `go_list_packages`'

Before the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 5.2M   /usr/bin/yq

After the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 9.0M   /usr/bin/yq
---
 recipes-devtools/yq/yq_git.bb | 7 +++++++
 1 file changed, 7 insertions(+)
recipes-devtools/yq/yq_git.bb +0 -0
index 45f2f970..b3e00473 100644

recipes-devtools/yq/yq_git.bb GO_IMPORT = "github.com/mikefarah/yq" · line 59

Quoted 10 lines
recipes-devtools/yq/yq_git.bb +6 -0
@@ -50,6 +50,13 @@ GO_IMPORT = "github.com/mikefarah/yq"
 
 inherit go ptest
 
+go_do_compile() {
+       export TMPDIR="${GOTMPDIR}"
+       if [ -n "${GO_INSTALL}" ]; then
+               ${GO} install ${GOBUILDFLAGS} `go_list_packages`
+       fi
+}
 

I wonder if it would be more appropriate to disable the linkshared with GO_LINKSHARED = ""

Jose

+

Quoted 18 lines
recipes-devtools/yq/yq_git.bb +0 -1
 do_compile:prepend() {
     # arrange for some of the golang built ins to be found
     (
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#7929):
https://lists.yoctoproject.org/g/meta-virtualization/message/7929
Mute This Topic: https://lists.yoctoproject.org/mt/97442079/5052612
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Best regards,

José Quaresma
#3 lore raw
Quoted 41 lines · Jose Quaresma

Hi

Yu, Mingli <[email protected]> escreveu no dia terça, 7/03/2023 à(s) 02:48:

Quoted 37 lines

From: Mingli Yu <[email protected]>

Drop {LINKSHARED} to fix the below build failure.
WARNING: /build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/temp/run.do_compile.923432:185 exit 1 from 'aarch64-wrs-linux-go install -linkshared -p 48 -v -ldflags="-r /usr/lib64/go/pkg/linux_arm64_dynlink -I /lib64/ld-linux-aarch64.so.1 -extldflags ' -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot -Wl,-rpath-link=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot/usr/lib64/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now'" -trimpath -buildmode=pie go_list_packages'

Before the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 5.2M   /usr/bin/yq

After the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 9.0M   /usr/bin/yq
---
 recipes-devtools/yq/yq_git.bb | 7 +++++++
 1 file changed, 7 insertions(+)
recipes-devtools/yq/yq_git.bb +0 -0
index 45f2f970..b3e00473 100644
@@ -50,6 +50,13 @@ GO_IMPORT = "github.com/mikefarah/yq"
 
 inherit go ptest
 
Quoted 10 lines

recipes-devtools/yq/yq_git.bb GO_IMPORT = "github.com/mikefarah/yq" · line 58

Quoted 6 lines
recipes-devtools/yq/yq_git.bb +6 -0
+go_do_compile() {
+       export TMPDIR="${GOTMPDIR}"
+       if [ -n "${GO_INSTALL}" ]; then
+               ${GO} install ${GOBUILDFLAGS} `go_list_packages`
+       fi
+}

I wonder if it would be more appropriate to disable the linkshared with GO_LINKSHARED = ""

That didn't fix the buildah problem, but yes, this one could be different in the solution.

That being said, I still suggest an entirely new do_compile(), to keep control in the recipe.

Bruce

Quoted 27 lines

Jose

Quoted 10 lines
recipes-devtools/yq/yq_git.bb +1 -1
+
 do_compile:prepend() {
     # arrange for some of the golang built ins to be found
     (
--

2.25.1

--
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7931): https://lists.yoctoproject.org/g/meta-virtualization/message/7931
Mute This Topic: https://lists.yoctoproject.org/mt/97442079/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#4 lore raw

PATCH v2 1/1 yq: drop {LINKSHARED}

From: Mingli Yu <[email protected]>

Redefine do_compile logic to drop {LINKSHARED} to fix the
below build failure.
WARNING: /build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/temp/run.do_compile.923432:185 exit 1 from 'aarch64-wrs-linux-go install -linkshared -p 48 -v -ldflags="-r /usr/lib64/go/pkg/linux_arm64_dynlink -I /lib64/ld-linux-aarch64.so.1 -extldflags ' -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot -Wl,-rpath-link=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot/usr/lib64/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now'" -trimpath -buildmode=pie go_list_packages'

Before the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 5.2M	/usr/bin/yq

After the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 9.0M	/usr/bin/yq
---
 recipes-devtools/yq/yq_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
recipes-devtools/yq/yq_git.bb +2 -1
index 45f2f970..bd474a79 100644
@@ -50,7 +50,7 @@ GO_IMPORT = "github.com/mikefarah/yq"
 
 inherit go ptest
 
-do_compile:prepend() {
+do_compile() {
     # arrange for some of the golang built ins to be found
     (
 	cd ${WORKDIR}/build/src/
@@ -60,6 +60,7 @@ do_compile:prepend() {
     # arrange for the fetched dependencies to be found
     export GOPATH="${GOPATH}:${WORKDIR}/build/vendor/"
     export GO111MODULE=off
+    ${GO} install ${GOBUILDFLAGS} `go_list_packages`
 }
 
 do_install:append() {
Signature · 1 line
2.25.1
#5 lore raw

Re: [meta-virtualization] [PATCH v2] yq: drop {LINKSHARED}

v2 looks much better!

merged.

Bruce

In message: [meta-virtualization] [PATCH v2] yq: drop {LINKSHARED}

Quoted 63 lines · Mingli

From: Mingli Yu <[email protected]>

Redefine do_compile logic to drop {LINKSHARED} to fix the
below build failure.
WARNING: /build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/temp/run.do_compile.923432:185 exit 1 from 'aarch64-wrs-linux-go install -linkshared -p 48 -v -ldflags="-r /usr/lib64/go/pkg/linux_arm64_dynlink -I /lib64/ld-linux-aarch64.so.1 -extldflags ' -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot -Wl,-rpath-link=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot/usr/lib64/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now'" -trimpath -buildmode=pie go_list_packages'

Before the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 5.2M	/usr/bin/yq

After the patch:

 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq
 # du -sh /usr/bin/yq
 9.0M	/usr/bin/yq
---
 recipes-devtools/yq/yq_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
recipes-devtools/yq/yq_git.bb +2 -1
index 45f2f970..bd474a79 100644
@@ -50,7 +50,7 @@ GO_IMPORT = "github.com/mikefarah/yq"
 
 inherit go ptest
 
-do_compile:prepend() {
+do_compile() {
     # arrange for some of the golang built ins to be found
     (
 	cd ${WORKDIR}/build/src/
@@ -60,6 +60,7 @@ do_compile:prepend() {
     # arrange for the fetched dependencies to be found
     export GOPATH="${GOPATH}:${WORKDIR}/build/vendor/"
     export GO111MODULE=off
+    ${GO} install ${GOBUILDFLAGS} `go_list_packages`
 }
 
 do_install:append() {
Signature · 11 lines
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7933): https://lists.yoctoproject.org/g/meta-virtualization/message/7933
Mute This Topic: https://lists.yoctoproject.org/mt/97466079/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-