This repository has been archived by the owner. It is now read-only.

ncurses build failure #43

Closed
non opened this Issue Jun 20, 2012 · 5 comments

Comments

Projects
None yet
5 participants

non commented Jun 20, 2012

Installed brew today. Things were fine until I tried to install ncurses:

In file included from ../c++/cursesm.cc:35:
../c++/cursesm.h:642:In file included from ../c++/cursesf.cc:357:
../c++/cursesf.h::684 :7: error: no matching constructor for initialization of 'NCursesForm'
error: no matching constructor for initialization of 'NCursesMenu'    : NCursesForm (Fields, with_frame, autoDelete_Fields) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    : NCursesMenu (Items, with_frame, autoDelete_Items) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../c++/cursesf.h:420:3: note: candidate constructor not viable: no known conversion from 'NCursesFormField *' to 'NCursesFormField **' for 1st argument; take the address of the argument with &
  NCursesForm (NCursesFormField* Fields[],
  ^
../c++/cursesf.h:404:3: note: candidate constructor not viable: no known conversion from 'NCursesFormField *' to 'int' for 1st argument;
../c++/cursesm.h  NCursesForm( int  nlines,:
281  ^:
3: note: candidate constructor not viable: no known conversion from 'NCursesMenuItem *' to 'NCursesMenuItem **' for 1st argument; take the address of the argument with &
../c++/cursesf.h  NCursesMenu (NCursesMenuItem* Items[],
  ^:435:
3: note: candidate constructor not viable: requires at least 5 arguments, but 3 were provided
  NCursesForm (NCursesFormField* Fields[],
  ^
../c++/cursesf.h:462:3: note: candidate constructor not viable: requires 1 argument, but 3 were provided../c++/cursesm.h:
296  NCursesForm(const NCursesForm& rhs)
  ^
:3: note: candidate constructor not viable: no known conversion from 'NCursesMenuItem *' to 'NCursesMenuItem **' for 1st argument; take the address of the argument with &
  NCursesMenu (NCursesMenuItem* Items[],../c++/cursesf.h
  ^:697:
7: error: no matching constructor for initialization of 'NCursesForm'
    : NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../c++/cursesm.h:265:3: note: candidate constructor not viable: no known conversion from 'NCursesMenuItem *' to 'int' for 1st argument;
  NCursesMenu( int  nlines,
  ^
../c++/cursesm.h:323:../c++/cursesf.h:4353:3: note: candidate constructor not viable: no known conversion from 'NCursesFormField *' to 'NCursesFormField **' for 1st argument; take the address of the argument with &
:  NCursesForm (NCursesFormField* Fields[],
  ^
 ../c++/cursesf.h:404:3:note: candidate constructor not viable: requires 1 argument, but 3 were provided note: candidate constructor not viable: requires at most 4 arguments, but 7 were provided

  NCursesForm( int  nlines,
  ^
  NCursesMenu(const NCursesMenu& rhs)
  ^
../c++/cursesf.h:420:3: note: candidate constructor not viable: requires at most 3 arguments, but 7 were provided
  NCursesForm (NCursesFormField* Fields[],
  ^
../c++/cursesf.h:462:3: note: candidate constructor not viable: requires 1 argument, but 7 were provided
  NCursesForm(const NCursesForm& rhs)
  ^
../c++/cursesm.h:654:7: error: no matching constructor for initialization of 'NCursesMenu'
    : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../c++/cursesm.h:296:3: note: candidate constructor not viable: no known conversion from 'NCursesMenuItem *' to 'NCursesMenuItem **' for 1st argument; take the address of the argument with &
  NCursesMenu (NCursesMenuItem* Items[],
  ^
../c++/cursesm.h:265:3: note: candidate constructor not viable: requires at most 4 arguments, but 6 were provided
  NCursesMenu( int  nlines,
  ^
../c++/cursesm.h:281:3: note: candidate constructor not viable: requires at most 3 arguments, but 6 were provided
  NCursesMenu (NCursesMenuItem* Items[],
  ^
../c++/cursesm.h:323:3: note: candidate constructor not viable: requires 1 argument, but 6 were provided
  NCursesMenu(const NCursesMenu& rhs)
  ^
2 errors generated.
make[1]: *** [../obj_s/cursesm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
2 errors generated.
make[1]: *** [../obj_s/cursesf.o] Error 1
make: *** [all] Error 2
config.log was copied to /Users/erik/Library/Logs/Homebrew
==> Build Environment
CPU: 8-core 64-bit dunno
MacOS: 10.7.4-x86_64
Xcode: 4.3.3
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
MAKEFLAGS: -j8
Error: Failed executing: make (ncurses.rb:23)
These existing issues may help you:
    https://github.com/mxcl/homebrew/issues/12803
Otherwise, please report the bug:
    https://github.com/homebrew/homebrew-dupes/issues/new

gcatlin commented Jul 12, 2012

I'm getting a similar error. It has something to do with clang. Here's a patch that addresses the issue:
http://lists.gnu.org/archive/html/bug-ncurses/2011-04/txtkWQqiQvcZe.txt

The patch was submitted to the ncurses maintainer:
http://lists.gnu.org/archive/html/bug-ncurses/2011-04/msg00002.html

...and was accepted:
http://invisible-island.net/ncurses/NEWS.html#t20110409
ftp://invisible-island.net/ncurses/5.9/ncurses-5.9-20110409.patch.gz

...then corrected later:
http://invisible-island.net/ncurses/NEWS.html#t20120608
ftp://invisible-island.net/ncurses/5.9/ncurses-5.9-20120608.patch.gz

I added the initial patch to my ncurses formula and was able to install it successfully. Here's a gist:
https://gist.github.com/3098450

Here's a more comprehensive, although out of date, solution from a fork of the hombrew-alt ncurses formula:
https://raw.github.com/gvvaughan/homebrew-alt/alternate/versions/ncurses59.rb

Contributor

jacknagel commented Dec 2, 2012

Somebody want to submit a patch against the formula that includes the appropriate clang related patches?

Thanks @gcatlin, the gist worked for me too. Much appreciated.

Contributor

jacknagel commented Mar 11, 2013

I added a macports patch to fix building the c++ bindings with clang.

@jacknagel jacknagel closed this Mar 11, 2013

@DanAlbert DanAlbert added a commit to DanAlbert/lua-ndk that referenced this issue Apr 30, 2017

@DanAlbert DanAlbert Check in the patch for the ncurses Clang fix. e8fb996
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.