Skip to contentSkip to conversation

gettext-tiny: Make libiconv only target dependency

PATCH New Alexey Brodkin 3 participants 7 messages Apr 8, 2019 – Apr 9, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gettext-tiny: Make libiconv only target dependency

Looks like a copy-paste issue in
commit ea1e7ee60682 ("package/gettext: turn into virtual package").

This creates a funny circular dependency in minimalistic configs with uClibc:
------------------------->8---------------------
make libiconv-graph-depends
Getting dependency tree...

Recursion detected for : toolchain
which is a dependency of: host-gettext-tiny
which is a dependency of: host-gettext
which is a dependency of: host-flex
which is a dependency of: host-binutils
which is a dependency of: host-gcc-final
which is a dependency of: toolchain-buildroot
which is a dependency of: toolchain
make: *** [libiconv-graph-depends] Error 1
------------------------->8---------------------

But real problem in build failure because we try to build libiconv for target before toolchain is built.

Cc Thomas Petazzoni <[email protected]>
Cc Vadim Kochan <[email protected]>
---
 package/gettext-tiny/gettext-tiny.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/gettext-tiny/gettext-tiny.mk +1 -1
index 4fa014e8dd..f07903d203 100644
@@ -50,7 +50,7 @@ endef
 HOST_GETTEXT_TINY_POST_PATCH_HOOKS += HOST_GETTEXT_TINY_COPY_EXTRA_FILES
 
 ifeq ($(BR2_ENABLE_LOCALE),)
-HOST_GETTEXT_TINY_DEPENDENCIES = libiconv
+GETTEXT_TINY_DEPENDENCIES = libiconv
 endif
 
 define HOST_GETTEXT_TINY_BUILD_CMDS
Signature · 1 line
2.16.2
#1 lore raw

PATCH 1/1 gettext-tiny: Make libiconv only target dependency

Hello,

package/gettext-tiny/gettext-tiny.mk endef · line 54

Quoted 11 lines · On Mon, 8 Apr 2019 17:04:42 +0300 Alexey Brodkin…
package/gettext-tiny/gettext-tiny.mk +1 -1
index 4fa014e8dd..f07903d203 100644
@@ -50,7 +50,7 @@ endef
 HOST_GETTEXT_TINY_POST_PATCH_HOOKS += HOST_GETTEXT_TINY_COPY_EXTRA_FILES
 
 ifeq ($(BR2_ENABLE_LOCALE),)
-HOST_GETTEXT_TINY_DEPENDENCIES = libiconv
+GETTEXT_TINY_DEPENDENCIES = libiconv
 endif

Hm, the issue I see is that gettext-tiny/Config.in does not select BR2_PACKAGE_LIBICONV, so we would run into the error that libiconv is used as a dependency but not selected.

While looking at this, I realize that gettext-gnu does have the conditional dependency on libiconv, but does not select it. libiconv seems to no longer be needed since commit 187b4d68e0ad9e92492345c5863da40e32863eda, but we forgot to remove the libiconv conditional dependency in gettext-gnu.mk.

Vadim, do you confirm ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 gettext-tiny: Make libiconv only target dependency

Hi Thomas, Alexey, All

Quoted 21 lines · Thomas Petazzoni

Hello,

package/gettext-tiny/gettext-tiny.mk endef · line 54

Quoted 11 lines · On Mon, 8 Apr 2019 17:04:42 +0300 Alexey Brodkin…
package/gettext-tiny/gettext-tiny.mk +1 -1
index 4fa014e8dd..f07903d203 100644
@@ -50,7 +50,7 @@ endef
 HOST_GETTEXT_TINY_POST_PATCH_HOOKS += HOST_GETTEXT_TINY_COPY_EXTRA_FILES
 
 ifeq ($(BR2_ENABLE_LOCALE),)
-HOST_GETTEXT_TINY_DEPENDENCIES = libiconv
+GETTEXT_TINY_DEPENDENCIES = libiconv
 endif

Hm, the issue I see is that gettext-tiny/Config.in does not select BR2_PACKAGE_LIBICONV, so we would run into the error that libiconv is used as a dependency but not selected.

Quoted 8 lines

While looking at this, I realize that gettext-gnu does have the conditional dependency on libiconv, but does not select it. libiconv seems to no longer be needed since commit 187b4d68e0ad9e92492345c5863da40e32863eda, but we forgot to remove the libiconv conditional dependency in gettext-gnu.mk.

Vadim, do you confirm ?

libiconv is needed by msgfmt and msgmerge during "translation" on the host so I think host-gettext-tiny should depend on host-libiconv.

Sorry for this issue!

Regards,
Vadim Kochan

#3 lore raw

PATCH 1/1 gettext-tiny: Make libiconv only target dependency

Quoted 2 lines · On Tue, 9 Apr 2019 00:54:10 +0300 Vadim Kochan <[email protected]> wrote:

libiconv is needed by msgfmt and msgmerge during "translation" on the host so I think host-gettext-tiny should depend on host-libiconv.

There is no such thing as "host-libiconv". We do not need it, because we assume the host system is iconv-capable.

The only thing gettext-tiny does for the target is install the wrapper gettext program, so it certainly does not need libiconv.

The right fix is to remove this conditional libiconv dependency entirely, and probably we should do the same for the gettext-gnu package.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 gettext-tiny: Make libiconv only target dependency

Hi Thomas, Alexey, All

Quoted 9 lines · Thomas Petazzoni
Quoted 2 lines · On Tue, 9 Apr 2019 00:54:10 +0300 Vadim Kochan <[email protected]> wrote:

libiconv is needed by msgfmt and msgmerge during "translation" on the host so I think host-gettext-tiny should depend on host-libiconv.

There is no such thing as "host-libiconv". We do not need it, because we assume the host system is iconv-capable.

Quoted 7 lines

The only thing gettext-tiny does for the target is install the wrapper gettext program, so it certainly does not need libiconv.

The right fix is to remove this conditional libiconv dependency entirely, and probably we should do the same for the gettext-gnu package.

Thanks for the explanation!

Regards,
Vadim Kochan

#5 lore raw

PATCH 1/1 gettext-tiny: Make libiconv only target dependency

Hi Vadim,

Quoted 23 lines

-----Original Message-----
From: Vadim Kochan <[email protected]>
Sent: Tuesday, April 9, 2019 9:40 AM
To: Thomas Petazzoni <[email protected]>
Cc: Alexey Brodkin <[email protected]>; buildroot at busybox.net; ARC Buildroot mailing list <[email protected]>
Subject: Re: [Buildroot] [PATCH] gettext-tiny: Make libiconv only target dependency

Hi Thomas, Alexey, All

Quoted 12 lines · Thomas Petazzoni
Quoted 2 lines · On Tue, 9 Apr 2019 00:54:10 +0300 Vadim Kochan <[email protected]> wrote:

libiconv is needed by msgfmt and msgmerge during "translation" on the host so I think host-gettext-tiny should depend on host-libiconv.

There is no such thing as "host-libiconv". We do not need it, because we assume the host system is iconv-capable.

The only thing gettext-tiny does for the target is install the wrapper gettext program, so it certainly does not need libiconv.

Quoted 6 lines
Quoted 4 lines

The right fix is to remove this conditional libiconv dependency entirely, and probably we should do the same for the gettext-gnu package.

Thanks for the explanation!

Are you going to prepare a fix mentioned by Thomas or should I do it myself?

-Alexey

#6 lore raw

PATCH 1/1 gettext-tiny: Make libiconv only target dependency

Hi Alexey,

Quoted 30 lines · Alexey Brodkin

Hi Vadim,

Quoted 28 lines

-----Original Message-----
From: Vadim Kochan <[email protected]>
Sent: Tuesday, April 9, 2019 9:40 AM
To: Thomas Petazzoni <[email protected]>
Cc: Alexey Brodkin <[email protected]>; buildroot at busybox.net; ARC Buildroot mailing list <[email protected]>
Subject: Re: [Buildroot] [PATCH] gettext-tiny: Make libiconv only target dependency

Hi Thomas, Alexey, All

Quoted 16 lines · Thomas Petazzoni
Quoted 2 lines · On Tue, 9 Apr 2019 00:54:10 +0300 Vadim Kochan <[email protected]> wrote:

libiconv is needed by msgfmt and msgmerge during "translation" on the host so I think host-gettext-tiny should depend on host-libiconv.

There is no such thing as "host-libiconv". We do not need it, because we assume the host system is iconv-capable.

The only thing gettext-tiny does for the target is install the wrapper gettext program, so it certainly does not need libiconv.

The right fix is to remove this conditional libiconv dependency entirely, and probably we should do the same for the gettext-gnu package.

Quoted 5 lines
Quoted 1 line

Thanks for the explanation!

Are you going to prepare a fix mentioned by Thomas or should I do it myself?

-Alexey

Sure I will do it, but a bit later today.

Regards,
Vadim Kochan