简体   繁体   English

为armv7-apple-darwin构建ncurses

[英]Building ncurses for armv7-apple-darwin

I got ncurses-5.9 from gnu's ftp , extracted and changed dir to the ncurse directory and did this : 我从gnu的ftp中获得了ncurses-5.9,解压缩并将目录更改为ncurse目录,然后执行了以下操作:

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 : 配置进行得很好,但是make -j 4触发了这个:

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 : 我进行了一些挖掘,发现了这一点: https : //gist.github.com/akisute/7227384这使我可以编辑configure脚本并注释其以下几行:

    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 : 然后我再次configure 'd并make -j 4 ,它触发了相同类型的错误:

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 ? 我该如何预防呢?

That was fixed a while ago, shortly after 5.9 release (see the notes about clang in 2012 and 2011 ). 这是在5.9版本发布后不久才解决的(请参阅有关2012年2011年 clang的说明)。

6.0 is the current release (since August 2015 ). 6.0是当前版本(自20158月起 )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 跨越建筑binutils 2.25.1 for iOS8.4(arm64-apple-darwin14.0.0) - cross building binutils 2.25.1 for iOS8.4 (arm64-apple-darwin14.0.0) PJSIP Siphon(ld:-lpj-arm-apple-darwin9找不到库) - PJSIP Siphon(ld: library not found for -lpj-arm-apple-darwin9) 苹果clang和sse指令形成armv7(移动处理器) - apple clang and sse instructions form armv7 ( mobile processors ) Apple Mach-O链接器错误-armv7 - Apple Mach-O Linker Error - armv7 找不到目标“armv7-apple-ios”的模块“IQKeyboardManagerSwift”; - Could not find module 'IQKeyboardManagerSwift' for target 'armv7-apple-ios'; 导出版本时也出错,找不到iOS arm-apple-darwin9-as.exe - Error exporting release too iOS arm-apple-darwin9-as.exe not found 在构建应用程序目标时,在文件XCTest中缺少必需的体系结构armv7 - missing required architecture armv7 in file XCTest on building application target 构建应用程序时出错:架构 armv7 的未定义符号 - Error building app: Undefined symbols for architecture armv7 为armv7,armv7s,arm64,i386和通用构建ffmpeg iOS库 - Building ffmpeg iOS libraries for armv7, armv7s, arm64, i386 and universal 使用arm-apple-darwin10-llvm-gcc-4.2在MacOS上交叉编译问题 - Cross Compile issues on MacOS with arm-apple-darwin10-llvm-gcc-4.2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM