Tin 2.6.4 build fails when using --disable-locale
The linker fails with this error if Tin 2.6.4 is configured with "--disable-locale": Linking tin v2.6.4 ... gcc -o ./tin ./heapsort.o ./active.o ./art.o ./attrib.o ./auth.o ./charset.o ./color.o ./config.o ./cook.o ./curses.o ./debug.o ./envarg.o ./feed.o ./filter.o ./getline.o ./global.o ./group.o ./hashstr.o ./header.o ./help.o ./inews.o ./init.o ./joinpath.o ./keymap.o ./lang.o ./langinfo.o ./list.o ./lock.o ./mail.o ./main.o ./memory.o ./mimetypes.o ./misc.o ./my_tmpfile.o ./newsrc.o ./nntplib.o ./nntps.o ./nrctbl.o ./options_menu.o ./page.o ./parsdate.o ./pgp.o ./post.o ./prompt.o ./read.o ./refs.o ./regex.o ./rfc1524.o ./rfc2045.o ./rfc2046.o ./rfc2047.o ./save.o ./screen.o ./search.o ./select.o ./sigfile.o ./signal.o ./snprintf.o ./strftime.o ./string.o ./tags.o ./tcurses.o ./thread.o ./version.o ./wildmat.o ./xref.o -L../pcre -lpcre -lcurses -lz -lrt ./string.o(.text+0xebd): In function `parse_format_string': : undefined reference to `art_mark_width' collect2: ld returned 1 exit status make[1]: *** [tin] Error 1 It seems art_mark_width doesn't exist if NO_LOCALE is defined. I thought this might fix it: --- a/src/string.c 2025-07-21 22:47:17.469944004 +1000 +++ b/src/string.c 2025-07-21 22:47:32.309944924 +1000 @@ -1743,7 +1743,11 @@ /* Article marks */ if ((cCOLS > min_cols && cCOLS < max_cols) && !(flags & ART_MARKS) && (signal_context == cGroup || signal_context == cThread)) { flags |= ART_MARKS; +#if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE) cnt += (art_mark_width + 2); +#else + cnt += 3; +#endif /* MULTIBYTE_ABLE && !NO_LOCALE */ } else out -= 2; break; Then it builds, but I'm getting occasional crashes at the thread view which only happen with my "--disable-locale" build. So maybe I misunderstood that code, or there's another issue.
On Mon, Jul 21, 2025 at 11:19:51PM +1000, Kevin Koster wrote:
The linker fails with this error if Tin 2.6.4 is configured with "--disable-locale":
Linking tin v2.6.4 ... gcc -o ./tin ./heapsort.o ./active.o ./art.o ./attrib.o ./auth.o ./charset.o ./color.o ./config.o ./cook.o ./curses.o ./debug.o ./envarg.o ./feed.o ./filter.o ./getline.o ./global.o ./group.o ./hashstr.o ./header.o ./help.o ./inews.o ./init.o ./joinpath.o ./keymap.o ./lang.o ./langinfo.o ./list.o ./lock.o ./mail.o ./main.o ./memory.o ./mimetypes.o ./misc.o ./my_tmpfile.o ./newsrc.o ./nntplib.o ./nntps.o ./nrctbl.o ./options_menu.o ./page.o ./parsdate.o ./pgp.o ./post.o ./prompt.o ./read.o ./refs.o ./regex.o ./rfc1524.o ./rfc2045.o ./rfc2046.o ./rfc2047.o ./save.o ./screen.o ./search.o ./select.o ./sigfile.o ./signal.o ./snprintf.o ./strftime.o ./string.o ./tags.o ./tcurses.o ./thread.o ./version.o ./wildmat.o ./xref.o -L../pcre -lpcre -lcurses -lz -lrt ./string.o(.text+0xebd): In function `parse_format_string': : undefined reference to `art_mark_width' collect2: ld returned 1 exit status make[1]: *** [tin] Error 1
It seems art_mark_width doesn't exist if NO_LOCALE is defined.
I thought this might fix it:
--- a/src/string.c 2025-07-21 22:47:17.469944004 +1000 +++ b/src/string.c 2025-07-21 22:47:32.309944924 +1000 @@ -1743,7 +1743,11 @@ /* Article marks */ if ((cCOLS > min_cols && cCOLS < max_cols) && !(flags & ART_MARKS) && (signal_context == cGroup || signal_context == cThread)) { flags |= ART_MARKS; +#if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE) cnt += (art_mark_width + 2); +#else + cnt += 3; +#endif /* MULTIBYTE_ABLE && !NO_LOCALE */ } else out -= 2; break;
that's exactly what was done in dev-branch on 2025-02-26. (latest "public" pre-release <ftp://ftp.tin.org/pub/news/clients/tin/v2.6/snapshots/>, even more, has a lot of other changes.
Then it builds, but I'm getting occasional crashes at the thread view which only happen with my "--disable-locale" build. So maybe I misunderstood that code, or there's another issue.
I fear it's the later, I doubt many ppl. are using a NO_LOCALE setup these days and it get any testing at all ...
participants (2)
-
Kevin Koster -
Urs Janßen