1

Whenever I try to build an application with Interix's GCC on Windows, this is what happens:

/tmp/grep-2.5.4-src/build$ ../configure --build=x86_64-pc-interix6
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-pc-interix6
checking host system type... x86_64-pc-interix6
checking for gawk... (cached) gawk
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

To me it looks like the problem isn't with the compiler, but rather with the configure file.

How can I fix it so that it works with SUA?

config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU grep configure 2.5.4, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ../configure --build=x86_64-pc-interix6

## --------- ##
## Platform. ##
## --------- ##

hostname = MehrdadVAIO
uname -m = genuineintel
uname -r = 6.1
uname -s = Interix
uname -v = 10.0.7063.0

/usr/bin/uname -p = Intel64_Family_6_Model_37_Stepping_2
/bin/uname -X     = 
System = Interix
Node = <<< my computer name >>>
Release = 6.1
Version = 10.0.7063.0
Machine = genuineintel
Processor = Intel64_Family_6_Model_37_Stepping_2
HostSystem = Windows
HostRelease = 6.1
HostVersion = SP1

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/X11/bin
PATH: /usr/local/vtcl
PATH: /usr/local/Trolltech/Qt-4.1.2/bin
PATH: /opt/gcc64/bin
PATH: /bin
PATH: /opt/gcc.3.3/bin
PATH: /usr/contrib/bin
PATH: /usr/X11R6/bin
PATH: /usr/local/bin
PATH: /usr/contrib/win32/bin
PATH: /dev/fs/C/Windows/System32
PATH: /dev/fs/C/Windows/SUA/common
PATH: /usr/games
PATH: /usr/openwin/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1833: checking for a BSD-compatible install
configure:1889: result: /bin/install -c
configure:1900: checking whether build environment is sane
configure:1943: result: yes
configure:1972: checking for a thread-safe mkdir -p
configure:2011: result: ../install-sh -c -d
configure:2024: checking for gawk
configure:2040: found /usr/contrib/bin/gawk
configure:2051: result: gawk
configure:2062: checking whether make sets $(MAKE)
configure:2083: result: yes
configure:2297: checking build system type
configure:2315: result: x86_64-pc-interix6
configure:2337: checking host system type
configure:2352: result: x86_64-pc-interix6
configure:2378: checking for gawk
configure:2405: result: gawk
configure:2464: checking for gcc
configure:2480: found /opt/gcc64/bin/gcc
configure:2491: result: gcc
configure:2729: checking for C compiler version
configure:2736: gcc --version >&5
gcc (GCC) 4.6.0 20110122 (experimental)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2739: $? = 0
configure:2746: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-pc-interix6
Configured with: ../../gcc/gcc/configure --build=x86_64-unkown-linux-gnu --host=x86_64-pc-interix6 --target=x86_64-pc-interix6 --prefix=/opt/gcc64 --with-local-prefix=/opt/gcc64/local --with-gnu-as --enable-threads=posix --disable-shared --disable-nls --disable-multilib --disable-libssp --disable-decimal-float --disable-fixed-point --enable-checking=release --enable-languages=c --with-gmp-include=/interix/gcc/gnuxx/x86_64-pc-interix6/include --with-gmp-lib=/interix/gcc/gnuxx/x86_64-pc-interix6/lib --with-mpfr-include=/interix/gcc/gnuxx/x86_64-pc-interix6/include --with-mpfr-lib=/interix/gcc/gnuxx/x86_64-pc-interix6/lib --with-mpc-include=/interix/gcc/gnuxx/x86_64-pc-interix6/include --with-mpc-lib=/interix/gcc/gnuxx/x86_64-pc-interix6/lib
Thread model: posix
gcc version 4.6.0 20110122 (experimental) (GCC) 
configure:2749: $? = 0
configure:2756: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2759: $? = 1
configure:2782: checking for C compiler default output file name
configure:2809: gcc -D_ALL_SOURCE -D_ALL_SOURCE -I/usr/local/include  -I/usr/local/ssl/include -I/usr/local/include/php  -lbind -L/usr/local/lib -L/usr/local/ssl/lib conftest.c  >&5
gcc: error trying to exec 'cc1': execvp: No such file or directory
configure:2812: $? = 1
configure:2850: result: 
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU grep"
| #define PACKAGE_TARNAME "grep"
| #define PACKAGE_VERSION "2.5.4"
| #define PACKAGE_STRING "GNU grep 2.5.4"
| #define PACKAGE_BUGREPORT "bug-grep@gnu.org"
| #define GREP 1
| #define PACKAGE "grep"
| #define VERSION "2.5.4"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2856: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-pc-interix6
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-D_ALL_SOURCE
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-D_ALL_SOURCE -I/usr/local/include  -I/usr/local/ssl/include -I/usr/local/include/php'
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=' -lbind -L/usr/local/lib -L/usr/local/ssl/lib'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-pc-interix6
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-pc-interix6
ac_cv_path_install='/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /tmp/grep-2.5.4-src/missing --run aclocal-1.10'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /tmp/grep-2.5.4-src/missing --run tar'
ANSI2KNR=''
AUTOCONF='${SHELL} /tmp/grep-2.5.4-src/missing --run autoconf'
AUTOHEADER='${SHELL} /tmp/grep-2.5.4-src/missing --run autoheader'
AUTOMAKE='${SHELL} /tmp/grep-2.5.4-src/missing --run automake-1.10'
AWK='gawk'
BUILD_INCLUDED_LIBINTL=''
CATALOGS=''
CATOBJEXT=''
CC='gcc'
CCDEPMODE=''
CFLAGS='-D_ALL_SOURCE'
CPP=''
CPPFLAGS='-D_ALL_SOURCE -I/usr/local/include  -I/usr/local/ssl/include -I/usr/local/include/php'
CYGPATH_W='echo'
DATADIRNAME=''
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GENCAT=''
GETCONF=''
GLIBC21=''
GMOFILES=''
GMSGFMT=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
INSTOBJEXT=''
INTLBISON=''
INTLLIBS=''
INTLOBJS=''
INTL_LIBTOOL_SUFFIX_PREFIX=''
LDFLAGS=' -lbind -L/usr/local/lib -L/usr/local/ssl/lib'
LIBICONV=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /tmp/grep-2.5.4-src/missing --run makeinfo'
MKINSTALLDIRS=''
MSGFMT=''
OBJEXT=''
PACKAGE='grep'
PACKAGE_BUGREPORT='bug-grep@gnu.org'
PACKAGE_NAME='GNU grep'
PACKAGE_STRING='GNU grep 2.5.4'
PACKAGE_TARNAME='grep'
PACKAGE_VERSION='2.5.4'
PATH_SEPARATOR=':'
POFILES=''
POSUB=''
RANLIB=''
SEP=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
U=''
USE_INCLUDED_LIBINTL=''
USE_NLS=''
VERSION='2.5.4'
XGETTEXT=''
ac_ct_CC='gcc'
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=' -I$(srcdir)'
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-pc-interix6'
build_alias='x86_64-pc-interix6'
build_cpu='x86_64'
build_os='interix6'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-pc-interix6'
host_alias=''
host_cpu='x86_64'
host_os='interix6'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /tmp/grep-2.5.4-src/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(top_builddir)/../install-sh -c -d'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME "GNU grep"
#define PACKAGE_TARNAME "grep"
#define PACKAGE_VERSION "2.5.4"
#define PACKAGE_STRING "GNU grep 2.5.4"
#define PACKAGE_BUGREPORT "bug-grep@gnu.org"
#define GREP 1
#define PACKAGE "grep"
#define VERSION "2.5.4"

configure: exit 77
user541686
  • 205,094
  • 128
  • 528
  • 886
  • It says "See config.log". What is there to be seen? – Linus Kleen Jan 11 '12 at 19:35
  • First, show us the output you get when you do it in another directory; the `No such file or directory` error is distracting. Second, follow the advice and take a look at `config.log`; show us the relevant contents if necessary. – Keith Thompson Jan 11 '12 at 19:36

1 Answers1

1

It's looking for cc1 as a compiler and can't find it, which is why it's failing.

gcc: error trying to exec 'cc1': execvp: No such file or directory.

So it's not that the compiler can't create executables, but that it can't find it. gcc invokes cc1. Check your system for it, or perhaps your PATH.

Dan Fego
  • 13,644
  • 6
  • 48
  • 59
  • Shoot, I glanced at the log but totally missed that. :) I know what the path should be, but how do I do this properly so that it doesn't mess with Win32 stuff? – user541686 Jan 11 '12 at 19:43
  • I just quickly looked around at the problem, which pointed out that you _shouldn't_ need `cc1` in your path, and suggested making sure `gcc` was installed properly. However, if you want the PATH to work during configuration, you can just do: `PATH=${PATH}:/path/to/cc1 ./configure`. – Dan Fego Jan 11 '12 at 19:47
  • +1 Yeah I thought gcc installed fine, I don't know... but I just tried that, and now the log file says `/usr/lib/x86/safecrt0.o: file not recognized: File format not recognized`... I think it's because it's trying to compile it with x86 instead of x64 but I'm not sure why the installation seems so messed up. Any ideas? – user541686 Jan 11 '12 at 19:53
  • @Mehrdad: If I were in your shoes, I'd first try compiling x64, to see if you get the same error. I assume you haven't done anything strange with the install, right? – Dan Fego Jan 11 '12 at 19:57
  • Yeah I'm using the x64 compiler, but it's using the x86 libraries. Will try and see if I can get it working. As for doing anything strange -- I don't think so, but I've installed the [SUA tools](http://www.suacommunity.com/tool_warehouse.aspx)... it looked as though the install went fine, though. – user541686 Jan 11 '12 at 20:04
  • So I'm seeing that `ld` is getting called with the command line `ld -stack 0x4000000,0x10000 /usr/lib/x86/safecrt0.o -L/usr/local/lib -L/opt/gcc.3.3/lib -L/usr/lib/x86 -L/opt/gcc.3.3/.. /tmp/ccw4i4P9.o -lgcc -lcsafe -lpsxdll -lcsafe -lpsxdll -lgcc`... I can't figure out why it's looking at `/usr/lib/x86` though, since it's not even in my PATH (or anywhere else I can see). Ideas? – user541686 Jan 11 '12 at 21:07
  • OOOOOH I got `configure` to work!!! It was because of the environmental variables `LIBRARY_PATH` (which was originally including `/usr/lib/x86` and which I set to `/usr/lib:/opt/gcc64/lib/gcc/x86_64-pc-interix6/4.6.0`) and I believe also `LD_LIBRARY_PATH` (similar issue). Also, for anyone experiencing this, [this page](http://www.suacommunity.com/faqs.aspx#405) should be pretty helpful. :) Thanks so much for your help! – user541686 Jan 11 '12 at 21:25
  • @Mehrdad: Wow, I've used `LIBRARY_PATH` before myself and for some reason it didn't come to mind... I thought it must have been something else! Anyway, glad you fixed it! – Dan Fego Jan 11 '12 at 21:37