Skip to content

Instantly share code, notes, and snippets.

@akisute
Last active July 3, 2017 05:16
Show Gist options
  • Save akisute/7227384 to your computer and use it in GitHub Desktop.
Save akisute/7227384 to your computer and use it in GitHub Desktop.
How to build ncurses-5.9 for iOS :D
# Just comment out these lines in L4428 before ./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
CFLAGS='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk' ./configure --prefix="." --host="armv7-apple-darwin" --with-widec
make install
@MisesEnForce
Copy link

I took ncurses-5.9 from ftp://ftp.gnu.org/gnu/ncurses/, changed dir to the extracted dir, built a build directory in it, and configured as follows :

../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

Then I did make -j 4 and add this kind of errors :

../../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

Any idea ? Thx in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment