On Sun, Apr 12, 2026 at 12:54:42PM +0200, Dennis Preiser wrote:
On Sun, Apr 12, 2026 at 03:38:12PM +0800, Kevin J. McCarthy wrote:
On Sun, Apr 12, 2026 at 01:16:48PM +0800, Kevin J. McCarthy wrote:
> What is installed in your ~/sw/include and lib directory for ncurses,
> and exactly where?

And the same for the system libraries.

Thanks for all the details.  It makes it clearer.

[...]

dennis@coredump:~% ls -l ~/sw/lib/*curses*
-rw-r--r--@ 1 dennis  staff  111536 Apr 12 11:15 
/Users/dennis/sw/lib/libncurses++w.a
-rwxr-xr-x@ 1 dennis  staff  364096 Apr 12 11:15 
/Users/dennis/sw/lib/libncursesw.6.dylib
-rw-r--r--@ 1 dennis  staff  642392 Apr 12 11:15 
/Users/dennis/sw/lib/libncursesw.a
lrwxr-xr-x@ 1 dennis  staff      19 Apr 12 11:15 
/Users/dennis/sw/lib/libncursesw.dylib -> libncursesw.6.dylib

So mutt's configure.ac is looking for a 'ncurses' library first, and then, if that fails, looking for 'ncursesw'. Your install under ~/sw/lib/ only has ncursesw files. So mutt finds the system libraries first and uses them:

dennis@coredump:.../Developer/SDKs/MacOSX.sdk% ls -l usr/lib/*curses*
lrwxr-xr-x  1 root  wheel     18 Mar 25 19:51 usr/lib/libcurses.tbd -> 
libncurses.5.4.tbd
-rw-r--r--  1 root  wheel  21256 Feb 21 23:58 usr/lib/libncurses.5.4.tbd
lrwxr-xr-x  1 root  wheel     18 Mar 25 19:51 usr/lib/libncurses.5.tbd -> 
libncurses.5.4.tbd
lrwxr-xr-x  1 root  wheel     18 Mar 25 19:51 usr/lib/libncurses.tbd -> 
libncurses.5.4.tbd

It's really as simple as that.  If you want mutt to see your ~/sw/lib/
version you'll need it to shadow your system libraries.  Either via
--disable-lib-suffixes or creating symlinks.

I know you tried that before, but *only* creating those lib symlinks still has a problem. The headers are installed under ~/sw/include/ncursesw/. When using the ncurses library file, mutt will look first for ncurses/ncurses.h and then fall back on ncurses.h. Mutt will again find the system ncurses.h file and that will cause the symbol matching issues:

dennis@coredump:.../Developer/SDKs/MacOSX.sdk% ls -l 
usr/include/(*curses|eti|form|menu|panel|term(\.|_|cap)|unc)*
[...]
-rw-r--r--@ 1 root  wheel  161910 Feb 22 00:00 usr/include/curses.h
lrwxr-xr-x  1 root  wheel       8 Mar 25 19:51 usr/include/ncurses.h -> curses.h

Perhaps a symlink from ~sw/include/ncurses to ~/sw/include/ncursesw, or using --enable-overwrite will fix this issue.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to