Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] Build fails on macOS 10.15.7 #3355

Closed
nickwynja opened this issue Apr 12, 2022 · 4 comments
Closed

[SOLVED] Build fails on macOS 10.15.7 #3355

nickwynja opened this issue Apr 12, 2022 · 4 comments
Labels

Comments

@nickwynja
Copy link

Expected Behaviour

Successful compile.

Actual Behaviour

Introduced with the 'new color objects' (e42ba82), build fails with the following errors:

gui/mutt_curses.c:48:3: error: unknown type name 'cchar_t'; did you mean 'wchar_t'?
  cchar_t cch = { 0 };
  ^~~~~~~
  wchar_t
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stddef.h:74:24: note:
      'wchar_t' declared here
typedef __WCHAR_TYPE__ wchar_t;
                       ^
gui/mutt_curses.c:49:3: error: implicit declaration of function 'setcchar' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
  setcchar(&cch, L" ", ac->attrs, index, NULL);
  ^
gui/mutt_curses.c:50:3: error: implicit declaration of function 'bkgrndset' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
  bkgrndset(&cch);
  ^
gui/mutt_curses.c:50:3: note: did you mean 'bkgdset'?
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/curses.h:535:29: note:
      'bkgdset' declared here
extern NCURSES_EXPORT(void) bkgdset (chtype);                           /* generated */
                            ^
3 errors generated.
make: *** [gui/mutt_curses.o] Error 1

Steps to Reproduce

./configure                                     \
     --notmuch                                  \
     --disable-doc                              \
     --lmdb                                     \
     --with-nls=/usr/local/opt/gettext          \
     --with-lmdb=/usr/local/opt/lmdb            \
&& make                                         \
&& sudo make install

How often does this happen?

  • Always

When did it start to happen?

e42ba82

NeoMutt Version

Building from 20220408 tag or master

Extra Info

  • macOS 10.15.7
  • mac command line tools are up to date
@nickwynja nickwynja added the type:bug Bug label Apr 12, 2022
@nickwynja
Copy link
Author

I see a comment in this discussion:

As jindraj recently discovered, NeoMutt doesn't even compile against decade-old versions of ncurses.

Maybe this is what I'm running into?

@jindraj
Copy link
Member

jindraj commented Apr 12, 2022

Hi Nick,

that's exactly what I was also dealing with. This is what helped me:

  • Install ncurses from brew (you most probably already have it as a dependency of other packages)
brew install ncurses
  • export following variables (mentioned in brew caveats after installation or brew info ncurses)
export LDFLAGS="-L/opt/homebrew/opt/ncurses/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ncurses/include"

@nickwynja
Copy link
Author

@jindraj Thank you! Appreciate the mention of brew info ncurses since my paths were actually:

export LDFLAGS="-L/usr/local/opt/ncurses/lib"
export CPPFLAGS="-I/usr/local/opt/ncurses/include"

@flatcap flatcap pinned this issue Apr 17, 2022
@flatcap flatcap changed the title Build fails on macOS 10.15.7 [SOLVED] Build fails on macOS 10.15.7 Apr 19, 2022
@flatcap
Copy link
Member

flatcap commented May 4, 2022

Update:

It is possible to build with this version of ncurses.

Setting this environment variable before building will enable the header that contains cchar_t.

export EXTRA_CFLAGS='-D_XOPEN_SOURCE_EXTENDED'

@flatcap flatcap unpinned this issue May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants