Re: mutt on macOS and --with-curses=DIR

"Kevin J. McCarthy" <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <adua7Ln4wx03cx0a@qinghai>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmnbmuwACgkQre92hIAx
a9ri+BAAiEXH1XCcjXP1D53SPnDLy/rnGciXdDyOpJ+JO44KqELnReVycZfOzL7J
uGdLP7ILRT1MzcwHgFtuzUakXiEz6ZKjwHI5gU6eBI75xHLj3PTJCHSucwkUB1t3
h3UTCGlcW4WTGLheho/DAJqyhnTRkhSZ7hOMYVz85a13vkk0rzoKhUb1WIn6gHhd
7QkpEYnqt1bFvDEPcN2NDQ2TLO05hTjw6OEKmoG2mqlpMUUB40dQDDBIYRnA3IoF
8RqfZUkLRmNZzxtPJeUmZRmvhFfOXar1xgryj3wR8HdJRBj5zbJFo7PdccVuDHyY
2WBgc4lsz0PT5lryC6E9iMvTZ76g01VwZUVXYNC0eLFIk0K+efI+5kv5GGPx6zK7
gq0wQYmKwUHB6q6P946QTdIpksFI9V2vWrbUYWREHp/1mrZGXFpGIDyePU6hSfSW
8FUBOSxFqyiTSyZZ4QzIZCHiPZ4PP6+RV5O0Ugi+uCHbFJtDrzRDGA34nnBjYW8l
rWuB5b1mmLWbl8VXI6o4j36ZLpzZ3FXY7mcnuB8BF6qxhAyYyFhuk7/4hMhzfbvp
RhFFFqLp82Qp9gfLP35KS4Q4VXHSseiU4+a8460T4tub5LQ+7wF4gYQ/DfmCZqwW
LUouCa5Bwv2oyVco6Mnb/HtGfCG1jcp60pJPhqWWVMYRVbMDgM4=
=XkLn
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.