* [Buildroot] [PATCH 1/1] package/gptfdisk: fix popt static build
@ 2022-11-06 23:04 Fabrice Fontaine
2022-11-07 22:07 ` Thomas Petazzoni via buildroot
2022-11-15 8:19 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-11-06 23:04 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Fabrice Fontaine
Fix the following static build failure with popt and iconv raised since
bump to version 1.0.9 in commit 69015ce94ac3ffe7f349ec37868eea0d0ffec90e
and
https://sourceforge.net/p/gptfdisk/code/ci/122b58ad82f1a144226d262c87241ee035ed1aff
(which added an unified Makefile):
/home/autobuild/autobuild/instance-0/output-1/host/bin/mips64el-buildroot-linux-uclibc-g++ crc32.o support.o guid.o gptpart.o mbrpart.o basicmbr.o mbr.o gpt.o bsd.o parttypes.o attributes.o diskio.o diskio-unix.o sgdisk.o gptcl.o -static -liconv -lpopt -o sgdisk
/home/autobuild/autobuild/instance-0/output-1/host/lib/gcc/mips64el-buildroot-linux-uclibc/11.3.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/lib64/../lib64/libpopt.a(poptint.o): in function `strdup_locale_from_utf8':
poptint.c:(.text+0x113c): undefined reference to `libiconv_open'
As can be seen above, this build failure is raised because -liconv is
added before -lpopt so use pkgconfig and SGDISK_LDLIBS
The addition of -liconv in LDLIBS could probably be removed in a
follow-up patch for next branch
Fixes:
- http://autobuild.buildroot.org/results/c9f2c9e737c2dd1cd4c1a08a5e8a48165179282d
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/gptfdisk/gptfdisk.mk | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/package/gptfdisk/gptfdisk.mk b/package/gptfdisk/gptfdisk.mk
index 0df9cda08f..f3fc930202 100644
--- a/package/gptfdisk/gptfdisk.mk
+++ b/package/gptfdisk/gptfdisk.mk
@@ -15,7 +15,8 @@ GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_CGDISK) += cgdisk
GPTFDISK_DEPENDENCIES += util-linux
ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y)
-GPTFDISK_DEPENDENCIES += popt
+GPTFDISK_DEPENDENCIES += host-pkgconf popt
+GPTFDISK_SGDISK_LDLIBS += `$(PKG_CONFIG_HOST_BINARY) --libs popt`
endif
ifeq ($(BR2_PACKAGE_GPTFDISK_CGDISK),y)
GPTFDISK_DEPENDENCIES += ncurses
@@ -32,7 +33,8 @@ endif
define GPTFDISK_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
- LDLIBS='$(GPTFDISK_LDLIBS)' $(GPTFDISK_TARGETS_y)
+ LDLIBS='$(GPTFDISK_LDLIBS)' \
+ SGDISK_LDLIBS='$(GPTFDISK_SGDISK_LDLIBS)' $(GPTFDISK_TARGETS_y)
endef
define GPTFDISK_INSTALL_TARGET_CMDS
--
2.35.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/gptfdisk: fix popt static build
2022-11-06 23:04 [Buildroot] [PATCH 1/1] package/gptfdisk: fix popt static build Fabrice Fontaine
@ 2022-11-07 22:07 ` Thomas Petazzoni via buildroot
2022-11-15 8:19 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-07 22:07 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, buildroot
On Mon, 7 Nov 2022 00:04:50 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following static build failure with popt and iconv raised since
> bump to version 1.0.9 in commit 69015ce94ac3ffe7f349ec37868eea0d0ffec90e
> and
> https://sourceforge.net/p/gptfdisk/code/ci/122b58ad82f1a144226d262c87241ee035ed1aff
> (which added an unified Makefile):
>
> /home/autobuild/autobuild/instance-0/output-1/host/bin/mips64el-buildroot-linux-uclibc-g++ crc32.o support.o guid.o gptpart.o mbrpart.o basicmbr.o mbr.o gpt.o bsd.o parttypes.o attributes.o diskio.o diskio-unix.o sgdisk.o gptcl.o -static -liconv -lpopt -o sgdisk
> /home/autobuild/autobuild/instance-0/output-1/host/lib/gcc/mips64el-buildroot-linux-uclibc/11.3.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/lib64/../lib64/libpopt.a(poptint.o): in function `strdup_locale_from_utf8':
> poptint.c:(.text+0x113c): undefined reference to `libiconv_open'
>
> As can be seen above, this build failure is raised because -liconv is
> added before -lpopt so use pkgconfig and SGDISK_LDLIBS
>
> The addition of -liconv in LDLIBS could probably be removed in a
> follow-up patch for next branch
>
> Fixes:
> - http://autobuild.buildroot.org/results/c9f2c9e737c2dd1cd4c1a08a5e8a48165179282d
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/gptfdisk/gptfdisk.mk | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/gptfdisk: fix popt static build
2022-11-06 23:04 [Buildroot] [PATCH 1/1] package/gptfdisk: fix popt static build Fabrice Fontaine
2022-11-07 22:07 ` Thomas Petazzoni via buildroot
@ 2022-11-15 8:19 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-11-15 8:19 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fix the following static build failure with popt and iconv raised since
> bump to version 1.0.9 in commit 69015ce94ac3ffe7f349ec37868eea0d0ffec90e
> and
> https://sourceforge.net/p/gptfdisk/code/ci/122b58ad82f1a144226d262c87241ee035ed1aff
> (which added an unified Makefile):
> /home/autobuild/autobuild/instance-0/output-1/host/bin/mips64el-buildroot-linux-uclibc-g++
> crc32.o support.o guid.o gptpart.o mbrpart.o basicmbr.o mbr.o gpt.o
> bsd.o parttypes.o attributes.o diskio.o diskio-unix.o sgdisk.o gptcl.o
> -static -liconv -lpopt -o sgdisk
> /home/autobuild/autobuild/instance-0/output-1/host/lib/gcc/mips64el-buildroot-linux-uclibc/11.3.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld:
> /home/autobuild/autobuild/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/lib64/../lib64/libpopt.a(poptint.o):
> in function `strdup_locale_from_utf8':
> poptint.c:(.text+0x113c): undefined reference to `libiconv_open'
> As can be seen above, this build failure is raised because -liconv is
> added before -lpopt so use pkgconfig and SGDISK_LDLIBS
> The addition of -liconv in LDLIBS could probably be removed in a
> follow-up patch for next branch
> Fixes:
> - http://autobuild.buildroot.org/results/c9f2c9e737c2dd1cd4c1a08a5e8a48165179282d
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2022.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-15 8:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-06 23:04 [Buildroot] [PATCH 1/1] package/gptfdisk: fix popt static build Fabrice Fontaine
2022-11-07 22:07 ` Thomas Petazzoni via buildroot
2022-11-15 8:19 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox