1

I got ncurses-5.9 from gnu's ftp, extracted and changed dir to the ncurse directory and did this :

mkdir build && cd build
../configure --prefix=/usr/local/GNU-CROSS/ncurses-6.0/ CC="clang -fembed-bitcode -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk -Wno-error -Wno-implicit-function-declaration -mios-version-min=8.4 -no-integrated-as -arch armv7 -target armv7-apple-darwin" CPP="clang -E" CPPFLAGS="-fembed-bitcode -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk -Wno-error -Wno-implicit-function-declaration -mios-version-min=8.4 -no-integrated-as -arch armv7 -target armv7-apple-darwin" --host=armv7-apple-darwin --with-widec

The configure went well, but the make -j 4 triggered this :

In file included from ../../c++/cursesf.cc:35:
../../c++/cursesf.h:684:7: error: no matching constructor for initialization of
      'NCursesForm'
    : NCursesForm (Fields, with_frame, autoDelete_Fields) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../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
  NCursesForm( int  nlines,
  ^
../../c++/cursesf.h:462:3: note: candidate constructor not viable: requires
      single argument 'rhs', but 3 arguments were provided
  NCursesForm(const NCursesForm& rIn file included from ../../c++/cursesm.cc:35:
../../c++/cursesm.h:642:7: error: no matching constructor for initialization of
      'NCursesMenu'
    : NCursesMenu (Items, with_frame, autoDelete_Items) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../c++/cursesm.h:281:3: note: candidate constructor hs)
  ^
../../c++/cursesf.h:435:3: note: candidate constructor not viable: requires at
      least 5 arguments, but 3 were provided
  NCursesForm (NCursesFormField* Fields[],
  ^
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: ../../c++/cursesm.h:296error:: 3: no matchingnote : constructor candidatefor  constructorinitialization  notof 
viable:       'NCursesForm'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: no known
      conversion from 'NCursesMenuItem *' to 'int' for 1st argument
  NCursesMenu( int  nlines,
  ^
../../c++/cursesm.h:323:3: note: candidate constructor not viable: requires
      single argument 'rhs', but 3 arguments were provided
  NCursesMenu(const NCursesMenu& rhs)
  ^
../../c++/cursesm.h:654:7: error: no matching constructor for initialization of
      'NCursesMenu'
    : NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../c++/cursesf.h:435:3: note: ../../c++/cursesm.hcandidate: 296constructor: 3not:  viable: nonote : known
candidate       conversionconstructor  fromnot  'NCursesFormField *'viable:  tono  'NCursesFormField **'known 
for       conversion1st 
from       argument;'NCursesMenuItem *'  taketo  the'NCursesMenuItem **'  addressfor  of1st 
the       argument;argument  takewith  the& address
 of the argument with &
  NCursesForm (NCursesFormField* Fields[],
  ^
  NCursesMenu (NCursesMenuItem* Items[],
  ^
../../c++/cursesf.h:404:3: note: candidate constructor not viable: requires at
      most 4 arguments, but 7 were provided
  NCursesForm( int  nlines,
  ^
../../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
      single argument 'rhs', but 7 arguments were provided
  NCursesForm(const NCursesForm& rhs)
  ^
../../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
      single argument 'rhs', but 6 arguments were provided
  NCursesMenu(const NCursesMenu& rhs)
  ^
2 errors generated.
make[1]: *** [../objects/cursesm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
2 errors generated.
make[1]: *** [../objects/cursesf.o] Error 1
make: *** [all] Error 2

I digged a bit and came across this : https://gist.github.com/akisute/7227384 which made me edit the configure script and comment its following lines :

    if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
        { { echo "$as_me:4429: error: Cross-build requires two compilers.
Use --with-build-cc to specify the native compiler." >&5
echo "$as_me: error: Cross-build requires two compilers.
Use --with-build-cc to specify the native compiler." >&2;}
   { (exit 1); exit 1; }; }
    fi

Then I configure'd again and did make -j 4 which triggered the same kind of errors :

In file included from ../../c++/cursesf.cc:35:
../../c++/cursesf.h:684:7: error: no matching constructor for initialization of
      'NCursesForm'
    : NCursesForm (Fields, with_frame, autoDelete_Fields) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../c++/cursesm.cc:35:
../../c++/cursesm.h:642:7: error: no matching constructor for initialization of
      'NCursesMenu'
    : NCursesMenu (Items, with_frame, autoDelete_Items) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../c++/cursesf.h../../c++/cursesm.h::420281::33::  notenote: : candidatecandidate  constructorconstructor  notnot  viable:viable:  nono  knownknown

            conversionconversion  fromfrom  'NCursesFormField *''NCursesMenuItem *'  toto  'NCursesFormField **''NCursesMenuItem **'  forfor  1st1st

            argument;argument;  taketake  thethe  addressaddress  ofof  thethe  argumentargument  withwith  &&

  NCursesForm (NCursesFormField* Fields[],
  NCursesMenu (NCursesMenuItem* Items[],
  ^
  ^
../../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:../../c++/cursesf.h :404:note3::  candidate noteconstructor:  notcandidate  viable:constructor  nonot  knownviable:
       noconversion  knownfrom
       'NCursesMenuItem *'conversion  tofrom  'int''NCursesFormField *'  forto  1st'int'  argumentfor 
1st argument
  NCursesMenu( int  nlines,
  ^  NCursesForm( int  nlines,

  ^
../../c++/cursesm.h:323../../c++/cursesf.h::3462:: 3: note: notecandidate:  constructorcandidate  notconstructor  viable:not  requiresviable:
       requiressingle
       argumentsingle  'rhs',argument  but'rhs',  3but  arguments3  werearguments  providedwere 
provided
  NCursesMenu(const NCursesMenu& rhs)
  NCursesForm(const NCursesForm& rhs)
  ^
  ^
../../c++/cursesf.h:435:3: note: candidate constructor not viable: requires at
      least 5 arguments, but 3 were provided
  NCursesForm (NCursesFormField* Fields[],
  ^
../../c++/cursesm.h:654:7: error: no matching constructor for initialization of
      'NCursesMenu'
../../c++/cursesf.h:697:7: error: no matching constructor for initialization of
      'NCursesForm'
    : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    : NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../c++/cursesm.h:296:3: note: candidate constructor not viable: no ../../c++/cursesf.hknown:
435      :conversion3 :from  'NCursesMenuItem *' noteto:  'NCursesMenuItem **'candidate  forconstructor  1stnot
       viable:argument;  notake  knownthe
       addressconversion  offrom  the'NCursesFormField *'  argumentto  with'NCursesFormField **'  &for 
1st
      argument; take the address of the argument with &  NCursesMenu (NCursesMenuItem* Items[],

  ^
../../c++/cursesm.h:265:3:   NCursesForm (NCursesFormField* Fields[],note
:   ^candidate
 constructor not viable: requires at
../../c++/cursesf.h      :most404 :43 :arguments,  but note6:  werecandidate  providedconstructor 
not viable: requires at
      most 4   NCursesMenu( int  nlines,arguments,
 but  ^ 
7 were provided
../../c++/cursesm.h:281:3: note: candidate constructor  NCursesForm( int  nlines, 
not   ^viable:
 requires at
      most 3../../c++/cursesf.h :arguments,420 :but3 :6  were noteprovided: 
candidate constructor not viable: requires at
      most 3 arguments, but  NCursesMenu (NCursesMenuItem* Items[], 
7   ^were
 provided
../../c++/cursesm.h:323:3: note: candidate constructor   NCursesForm (NCursesFormField* Fields[],not
 viable:  ^ 
requires
      single argument 'rhs', ../../c++/cursesf.hbut: 4626: 3arguments:  were providednote: 
candidate constructor not viable: requires
      single argument 'rhs', but  NCursesMenu(const NCursesMenu& rhs) 
7   ^arguments
 were provided
  NCursesForm(const NCursesForm& rhs)
  ^
2 errors generated.
2 errors generated.
make[1]: *** [../objects/cursesm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [../objects/cursesf.o] Error 1
make: *** [all] Error 2

How could I prevent this ?

Olórin
  • 3,367
  • 2
  • 22
  • 42

1 Answers1

0

That was fixed a while ago, shortly after 5.9 release (see the notes about clang in 2012 and 2011).

6.0 is the current release (since August 2015).

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
  • Ok, I tried the 6.0 again (in fact I was failing with the 6.0 so I went back to 5.9) and I (of course still) have after `./configure` (with the same options as in my question) and `make -j 4` the following error : `../ncurses/./tinfo/lib_baudrate.c:77:10: fatal error: 'sys/ttydev.h' file not found` – Olórin Nov 01 '15 at 17:11
  • That's a different question: [bug report](http://invisible-island.net/ncurses/ncurses.faq.html#report_bugs). – Thomas Dickey Nov 01 '15 at 17:50
  • Done. Precision : same issue with armv7 replaced by arm64. – Olórin Nov 01 '15 at 18:00
  • Either way, the question was about the C++ binding. A different question about a specific platform is unlikely to get a useful answer on SO. – Thomas Dickey Nov 01 '15 at 18:19