cisco / ChezScheme

Chez Scheme
Apache License 2.0
6.89k stars 983 forks source link

mat failures with macOS 14's iconv #797

Closed burgerrg closed 4 months ago

burgerrg commented 5 months ago

Using c08129636735db7f4703875094a44d42a48d59d1 on arm64osx on macOS 14.3 and a6osx on macOS 14.2.1, the following mats fail:

Bug in mat iconv-codec clause 6 at line 710, char 7 of ../../mats/io.ms
Bug in mat iconv-codec clause 14 at line 1004, char 7 of ../../mats/io.ms
Bug in mat iconv-codec clause 14 at line 1004, char 7 of ../../mats/io.ms
Bug in mat iconv-codec clause 6 at line 710, char 7 of ../../mats/io.ms
Bug in mat iconv-codec clause 14 at line 1004, char 7 of ../../mats/io.ms
Bug in mat iconv-codec clause 14 at line 1004, char 7 of ../../mats/io.ms

The mat for codec GB18030 on line 710 of io.ms fails when make-codec-buffer returns a 4-byte buffer instead of the default 1024-byte buffer. Apparently this iconv-based codec needs more bytes. At 17 bytes it passes.

The mat for codec UTF-8 on line 1004 of io.ms fails unconditionally. It also fails using Chez Scheme 9.5.8 on a6osx, so I think the problem may be due to a change in macOS 14's iconv.

These mats pass on macOS 12, so I suspect the problem involves the newer iconv in macOS 14.

When I install libiconv using Homebrew on macOS 14 and configure Chez Scheme to link against it, all the mats pass.

ncihnegn commented 5 months ago

There are many reports about macOS Sonoma iconv compatibility issues. For example, https://github.com/orgs/Homebrew/discussions/4884.