NCursesW is failing to compile +universal

Michael_google gmail_Gersten keybounce at gmail.com
Wed Sep 9 09:54:35 PDT 2009


On Mon, Sep 7, 2009 at 9:07 AM, Michael_google
gmail_Gersten<keybounce at gmail.com> wrote:
> I have no clue what to do next here. You are listed as the maintainer
> for this port.
>
> Kleiman-ibook:~ michael$ sudo port -p install gtk2 +universal
> Password:
> --->  Computing dependencies for gtk2
> --->  Configuring ncursesw
> --->  Configuring ncursesw for architecture ppc
> --->  Configuring ncursesw for architecture i386
> Error: Target org.macports.configure returned: configure failure:
> shell command " cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncursesw/work/ncurses-5.7-i386"
> && ./configure --prefix=/opt/local --disable-dependency-tracking
> --disable-dependency-tracking --enable-widec --disable-rpath
> --with-shared --without-debug --without-ada --enable-safe-sprintf
> --enable-sigwinch --mandir=/opt/local/share/man
> --with-manpage-format=normal --disable-dependency-tracking
> --host=i386-apple-darwin9.8.0 --with-build-cc='/usr/bin/gcc-4.0'
> --with-build-cpp='/usr/bin/cpp-4.0'
> --with-build-cppflags=-D_XOPEN_SOURCE_EXTENDED --enable-big-core
> --with-chtype=long --with-bool='unsigned char' " returned error 1
> Command output: checking for nawk... no
> checking for awk... awk
> checking for egrep... (cached) grep -E
> checking for a BSD compatible install... /usr/bin/install -c
> checking for tdlint... no
> checking for lint... no
> checking for alint... no
> checking whether ln -s works... yes
> checking for long file names... yes
> checking if we should assume mixed-case filenames... auto
> checking if filesystem supports mixed-case filenames... no
> checking whether make sets ${MAKE}... yes
> checking for ctags... yes
> checking for makeflags variable...
> checking for i386-apple-darwin9.8.0-ranlib... no
> checking for ranlib... ranlib
> checking for i386-apple-darwin9.8.0-ld... no
> checking for ld... ld
> checking for i386-apple-darwin9.8.0-ar... no
> checking for ar... ar
> checking for archiver options (symbol AR_OPTS)... rv
> checking if you have specified an install-prefix...
> checking for native build C compiler... /usr/bin/gcc-4.0
> checking for native build C preprocessor... /usr/bin/cpp-4.0
> checking for native build C flags...
> checking for native build C preprocessor-flags... -D_XOPEN_SOURCE_EXTENDED
> checking for native build linker-flags...
> checking for native build linker-libraries...
> configure: error: Cross-build requires two compilers.
> Use --with-build-cc to specify the native compiler.
>
> Error: The following dependencies failed to build: atk gettext ncurses
> ncursesw glib2 perl5 perl5.8 pkgconfig cairo fontconfig freetype zlib
> libpixman libpng xrender xorg-libX11 autoconf help2man
> p5-locale-gettext m4 automake libtool xorg-bigreqsproto
> xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp
> xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto
> xorg-xtrans xorg-renderproto jasper jpeg pango Xft2 shared-mime-info
> intltool gnome-common p5-getopt-long p5-pathtools p5-scalar-list-utils
> p5-xml-parser libxml2 tiff xorg-libXcomposite xorg-compositeproto
> xorg-libXext xorg-libXfixes xorg-fixesproto xorg-libXcursor
> xorg-libXdamage xorg-damageproto xorg-libXi xorg-libXinerama
> xorg-xineramaproto xorg-libXrandr xorg-randrproto
> Error: Status 1 encountered during processing.


Alright, I found this change seems to work:
Kleiman-ibook:ncurses-5.7-i386 michael$ sudo ./configure
--prefix=/opt/local --disable-dependency-tracking
--disable-dependency-tracking --enable-widec --disable-rpath
--with-shared --without-debug --without-ada --enable-safe-sprintf
--enable-sigwinch --mandir=/opt/local/share/man
--with-manpage-format=normal --disable-dependency-tracking
--host=i386-apple-darwin9.8.0 --with-build-cc='/usr/bin/gcc-4.0'
--with-build-cpp='/usr/bin/cpp-4.0'
--with-build-cppflags=-D_XOPEN_SOURCE_EXTENDED --enable-big-core
--with-chtype=long --with-bool='unsigned char' CFLAGS='-arch i386'

With the "CFLAGS='arch i386'", it will now build i386 programs, and
can tell that it is cross compiling, and configure works.

However, I am concerned -- this is specifying gcc 4.0 for local
builds, not the default (which is 4.2).

I'm at the point where if this does not work, I'm just going to give
up and use the partially-working, out of date native gtk library
instead of the macports gtk library. (And why does gtk need ncurses if
it's an X program? I know, it's used by something deep in the
dependency tree. :-)

Nope, turns out it needs CFLAGS='-arch i386' CXXFLAGS='-arch i386'

To clarify: The old build was specifying the cross compiler flags
correctly, but was NOT specifying the build arch. Hence, the cross
compiler test did not come out correct, and the program does not
build.


More information about the macports-dev mailing list