Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#61498 closed defect (fixed)

dialog @1.3: configure: error: No curses header-files found

Reported by: pejaham Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: catalina bigsur Cc: pejaham, iay (Ian Young), cooljeanius (Eric Gallager)
Port: dialog

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I get an error installing dialog 1.3 under macOS 11.0.1 using Xcode 12.2. associated with ncurses. Other utilities using ncurses like tmux work fine.

Is this a known problem?

Thanks and regards Peter

:info:configure checking pkg-config for ncursesw... yes
:info:configure checking if the ncursesw package files work... no
:info:configure Looking for ncursesw-config
:info:configure checking for ncursesw-config... no
:info:configure checking for ncursesw6-config... ncursesw6-config
:info:configure checking if we have identified curses headers... none
:info:configure configure: error: No curses header-files found
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dialog/dialog/work/dialog-1.3-20180621" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --with-ncursesw 
:info:configure Exit code: 1
:error:configure Failed to configure dialog, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dialog/dialog/work/dialog-1.3-20180621/config.log
:error:configure Failed to configure dialog: configure failure: command execution failed
:debug:configure Error code: NONE

Change History (12)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: pejaham added; Peter Jacobsen removed
Description: modified (diff)
Keywords: catalina bigsur added; dialog w/ ncurses removed
Summary: dialog 1.3 does not compile unter macOS Big Sur 11.0.1dialog @1.3: configure: error: No curses header-files found

Thanks for reporting.

I can verify the problem. The configure script doesn't include the headers it needs, so the tests fail with error like:

configure:13188:1: error: implicit declaration of function 'putwc' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

This is common problem affecting many older software packages, when using Xcode 12 or later, which is required for Big Sur.

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Status: newaccepted

I tried updating to the latest version 1.3-20200327 and it still has this problem, so I'll try to fix it.

comment:3 Changed 3 years ago by iay (Ian Young)

Cc: iay added

comment:4 Changed 3 years ago by sectroyer

Yesterday I updated to Big Sur and noticed dialog doesn't compile. Since 7 weeks have passed from last comment I have decided to take a look. After poking around I noticed in order to compile dialog I had to put "stub" ncurses.h in dialog directory with one like contents:

#include <term_entry.h>

after that it took only:

CFLAGS="-I. -I/opt/local/include/" ./configure  --includedir /opt/local/include/

After that everything compiled correctly :D

Last edited 3 years ago by sectroyer (previous) (diff)

comment:5 Changed 3 years ago by iay (Ian Young)

Although it shows up as the configure step failing to detect a curses header file such as <ncurses.h> (which does in fact exist in the right place if the dependency has been installed), the actual problem here is that configure detects header files by attempting to compile sample programs, and those are failing to compile: configure just sees the failure and misattributes it.

It looks like in many cases this is because the test program that configure is using to detect the appropriate header file references a function(e.g., tgoto) that is not defined there but in a different header, thus hitting the implicit declaration of function 'tgoto' is invalid in C99 error.

The definitions for the code that generates those test programs seems to live in aclocal.m4 but my understanding of the whole C configuration stack is way too thin to have much chance of making progress beyond that.

Having said which, I did find https://dickey.his.com/autoconf/my-autoconf/CHANGES.html#t20210103 which seems to address exactly this thing:

  • AcSplit/CF_NCURSES_CONFIG, AcSplit/CF_NCURSES_LIBS:

change compile-check from tgoto to tigetstr, because tgoto is not prototyped in ncurses' curses.h while tigetstr is prototyped. Lacking the prototype can cause the configure check to fail with a recent clang configuration on macOS, which turn on -Werror=implicit-function-declaration by default (report by Dennis Preiser)

That's dated 2021-01-03 (just a few days ago) so something may be happening upstream. I'm not sure where, though.

comment:6 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:7 Changed 3 years ago by cooljeanius (Eric Gallager)

This blocks installation of bashish for me.

comment:8 Changed 3 years ago by iay (Ian Young)

Current MacPorts version for dialog is 1.3-20180621. Latest version on the author's site is 1.3-20210117 which I would expect to contain the fix mentioned above. I may try to take a look at getting this working, as there does not appear to be a maintainer for this port.

comment:9 Changed 3 years ago by iay (Ian Young)

Seems to just work. I will make a PR.

comment:11 Changed 3 years ago by iay (Ian Young)

Resolution: fixed
Status: acceptedclosed

In 8c44850a1852cc59b97929c31092fb049951a886/macports-ports (master):

dialog: update to 1.3-20210117

  • Allows the port to compile under Big Sur.
  • Add build dependency on the pkgconfig port.
  • Configure running of tests.

Closes #61498.

comment:12 Changed 3 years ago by iay (Ian Young)

Both signing-party and bashish now install under Big Sur.

Note: See TracTickets for help on using tickets.