Skip to contentSkip to conversation

package/libiconv: enable extra encodings

PATCH Superseded Bernd Kuhls 3 participants 3 messages Jan 28, 2020 – Feb 1, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libiconv: enable extra encodings

Quoting https://www.gnu.org/software/libiconv/

"When configured with the option --enable-extra-encodings, it also
provides support for a few extra encodings:

European languages

    CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
Semitic languages
    CP864
Japanese
    EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3
Chinese
    BIG5-2003 (experimental)
Turkmen
    TDS565

Platform specifics
ATARIST, RISCOS-LATIN1"

Updating Kodi from version 17.6 to 18.5 caused runtime errors on systems with locale support disabled, here Kodi uses libiconv but needs CP437:

ERROR: customConvert: iconv_open() for "CP437" -> "UTF-8" failed,
errno = 22 (Invalid argument)

The size of libiconv.so.2.6.0 grows from 941K to 1,1M.

---
 package/libiconv/libiconv.mk | 1 +
 1 file changed, 1 insertion(+)
package/libiconv/libiconv.mk +1 -0
index 9a8133612b..785b1cac6b 100644
@@ -9,6 +9,7 @@ LIBICONV_SITE = $(BR2_GNU_MIRROR)/libiconv
 LIBICONV_INSTALL_STAGING = YES
 LIBICONV_LICENSE = GPL-3.0+ (iconv program), LGPL-2.0+ (library)
 LIBICONV_LICENSE_FILES = COPYING COPYING.LIB
+LIBICONV_CONF_OPTS = --enable-extra-encodings
 
 # Don't build the preloadable library, as we don't need it (it's only
 # for LD_PRELOAD to replace glibc's iconv, but we never build libiconv
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/libiconv: enable extra encodings

Quoted 21 lines · On Tue, 28 Jan 2020 23:21:40 +0100 Bernd Kuhls <[email protected]> wrote:

Quoting https://www.gnu.org/software/libiconv/

"When configured with the option --enable-extra-encodings, it also
provides support for a few extra encodings:

European languages

    CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
Semitic languages
    CP864
Japanese
    EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3
Chinese
    BIG5-2003 (experimental)
Turkmen
    TDS565

Platform specifics
ATARIST, RISCOS-LATIN1"

Updating Kodi from version 17.6 to 18.5 caused runtime errors on systems with locale support disabled, here Kodi uses libiconv but needs CP437:

Quoted 6 lines

ERROR: customConvert: iconv_open() for "CP437" -> "UTF-8" failed,
errno = 22 (Invalid argument)

The size of libiconv.so.2.6.0 grows from 941K to 1,1M.

In the Kodi use case, a size increase of 160 KB is not important obviously, but libiconv is also used in other situations where size might matter. I don't have a very strongly formed opinion on this, but perhaps this is a case where a Config.in sub-option might be useful, which would be selected by Kodi. Please wait a bit for others feedback before implementing this though, as others may disagree.

Best regards,

Thomas

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

PATCH 1/1 package/libiconv: enable extra encodings

Quoted 29 lines · Thomas Petazzoni
Quoted 26 lines · On Tue, 28 Jan 2020 23:21:40 +0100 Bernd Kuhls <[email protected]> wrote:

Quoting https://www.gnu.org/software/libiconv/

"When configured with the option --enable-extra-encodings, it also
provides support for a few extra encodings:

European languages

    CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
Semitic languages
    CP864
Japanese
    EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3
Chinese
    BIG5-2003 (experimental)
Turkmen
    TDS565

Platform specifics
ATARIST, RISCOS-LATIN1"

Updating Kodi from version 17.6 to 18.5 caused runtime errors on systems with locale support disabled, here Kodi uses libiconv but needs CP437:

ERROR: customConvert: iconv_open() for "CP437" -> "UTF-8" failed,
errno = 22 (Invalid argument)

The size of libiconv.so.2.6.0 grows from 941K to 1,1M.

Quoted 8 lines
Quoted 1 line

In the Kodi use case, a size increase of 160 KB is not important obviously, but libiconv is also used in other situations where size might matter. I don't have a very strongly formed opinion on this, but perhaps this is a case where a Config.in sub-option might be useful, which would be selected by Kodi. Please wait a bit for others feedback before implementing this though, as others may disagree.

I agree. Even if it's only a 15% growth of the packages, so probably about 5%
growth overall in a minimal case, libiconv is often a dependency you don't really want to have but just are forced to. So any size increase is unwanted.

So yes, please make this optional.

Regards,
Arnout