Apache Thrift Installation on Linux Mint - ./configure returns 'C compiler cannot create executables' error

Apache Thrift Installation on Linux Mint - ./configure returns 'C compiler
cannot create executables' error

I'm trying to install Apache Thrift on my Linux Mint, but I'm getting the
following error when trying to ./configure:
natalia@deep-thought ~/Programs/thrift-0.9.0 $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/natalia/Programs/thrift-0.9.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
Fragments of config.log with the error:
natalia@deep-thought ~/Programs/thrift-0.9.0 $ cat config.log | grep error
-C 5
configure:4045: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.7.2-2ubuntu1' --
with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-
languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc
--disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
configure:4056: $? = 0
configure:4045: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4056: $? = 4
configure:4045: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:4056: $? = 4
configure:4076: checking whether the C compiler works
configure:4098: gcc conftest.c >&5
/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status
configure:4102: $? = 1
configure:4140: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "thrift"
--
| {
|
| ;
| return 0;
| }
configure:4145: error: in `/home/natalia/Programs/thrift-0.9.0':
configure:4147: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
The compilation terminates from "fatal error: no input files", and yet I'm
calling this inside freshly downloaded thrift directory. Has anyone got
any idea why this might be happening?