After upgrading to macOS Sonoma 14.2 (MacBook Pro with Apple M1 Pro
processor), I can't seem to get vile to run. Even after a fresh build, I
see the following error:

$ vile
Cannot setup translation from  to UTF-8

Looking at the source I see this function in eightbit.c:

static void
open_encoding(char *from, char *to)
{
    if (!try_encoding(from, to)) {
        fprintf(stderr, "Cannot setup translation from %s to %s\n", from,
to);
        tidy_exit(BADEXIT);
    }
}

I also tried rebuilding using --with-locale:

$ ./configure -v --with-locale

Unfortunately, the same result. Also, this is on an M1 MacBook Pro, so I
don't have gdb handy.

Compiling using --with-trace, I see these warnings, which look
disconcerting:

trace.c:488:59: warning: overflow in expression; result is 2147483647 with
type 'int' [-Winteger-overflow]
            int c = buffer[j] & ((1 << (8 * sizeof(VIDEO_TEXT))) - 1);
                                                                 ^
trace.c:488:30: warning: shift count >= width of type
[-Wshift-count-overflow]
            int c = buffer[j] & ((1 << (8 * sizeof(VIDEO_TEXT))) - 1);
                                    ^  ~~~~~~~~~~~~~~~~~~~~~~~~

Hoping someone with better development tools on Apple silicon can reproduce
this issue and provide more helpful debugging info. Thanks.

-- David

Reply via email to