Mingw32 not recognizing wx-widgets - c++

I'm trying to use mingw32 to compile an application for windows32. It has a makefile, and when I normally use ./configure, it works fine.
However, when I set the host as --host=i686-w64-mingw32, this happens:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-w64-mingw32
checking target system type... i686-w64-mingw32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-w64-mingw32-strip... i686-w64-mingw32-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking building for Win32... yes
checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-w64-mingw32-gcc accepts -g... yes
checking for i686-w64-mingw32-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of i686-w64-mingw32-gcc... gcc3
checking for i686-w64-mingw32-g++... i686-w64-mingw32-g++
checking whether we are using the GNU C++ compiler... yes
checking whether i686-w64-mingw32-g++ accepts -g... yes
checking dependency style of i686-w64-mingw32-g++... gcc3
checking for i686-w64-mingw32-ranlib... i686-w64-mingw32-ranlib
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.8... cross compiling; assumed OK...
yes
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.8.9... no
configure: error:
wxWidgets does not seem to be installed on your system.
If you think wxWidgets >= 2.8.9 is installed,
please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable.
What's causing this? As you can see from the successful ./configure, I have wxWidgets 3.0.2 installed. MinGW version 4.0.4-2 is installed. Do these versions work with each other? Obviously wxWidgets is configured and everything because it normally works. I can't figure out why it suddenly can't find wxwidgets just because the host is different.
Config.log file:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sound-of-sorting configure 0.6.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --host=i686-w64-mingw32 --with-wx-prefix=/usr/i686-w64-mingw32
## --------- ##
## Platform. ##
## --------- ##
hostname = JOHNCENA
uname -m = x86_64
uname -r = 4.4.0-43-Microsoft
uname -s = Linux
uname -v = #1-Microsoft Wed Dec 31 14:42:53 PST 2014
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/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/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /mnt/c/ProgramData/Oracle/Java/javapath_target_3578562
PATH: /mnt/c/Windows/System32
PATH: /mnt/c/Windows
PATH: /mnt/c/Windows/System32/wbem
PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /mnt/c/Windows/System32
PATH: /mnt/c/Windows
PATH: /mnt/c/Windows/System32/wbem
PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /mnt/c/Program Files/Microsoft DNX/Dnvm
PATH: /mnt/c/Program Files/Microsoft SQL Server/110/Tools/Binn
PATH: /mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit
PATH: /mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common
PATH: /mnt/c/Windows/System32
PATH: /mnt/c/Windows
PATH: /mnt/c/Windows/System32/wbem
PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /mnt/c/Users/Bendy/AppData/Local/Microsoft/WindowsApps
PATH: /snap/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2067: checking build system type
configure:2081: result: x86_64-unknown-linux-gnu
configure:2101: checking host system type
configure:2114: result: i686-w64-mingw32
configure:2134: checking target system type
configure:2147: result: i686-w64-mingw32
configure:2190: checking for a BSD-compatible install
configure:2258: result: /usr/bin/install -c
configure:2269: checking whether build environment is sane
configure:2324: result: yes
configure:2383: checking for i686-w64-mingw32-strip
configure:2399: found /usr/bin/i686-w64-mingw32-strip
configure:2410: result: i686-w64-mingw32-strip
configure:2475: checking for a thread-safe mkdir -p
configure:2514: result: /bin/mkdir -p
configure:2521: checking for gawk
configure:2537: found /usr/bin/gawk
configure:2548: result: gawk
configure:2559: checking whether make sets $(MAKE)
configure:2581: result: yes
configure:2671: checking building for Win32
configure:2676: result: yes
configure:2730: checking for i686-w64-mingw32-gcc
configure:2746: found /usr/bin/i686-w64-mingw32-gcc
configure:2757: result: i686-w64-mingw32-gcc
configure:3026: checking for C compiler version
configure:3035: i686-w64-mingw32-gcc --version >&5
i686-w64-mingw32-gcc (GCC) 5.3.1 20160211
Copyright (C) 2015 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:3046: $? = 0
configure:3035: i686-w64-mingw32-gcc -v >&5
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/5.3-win32/lto-wrapper
Target: i686-w64-mingw32
Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir='/usr/lib/gcc-mingw-w64' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32 --with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld --disable-libatomic
Thread model: win32
gcc version 5.3.1 20160211 (GCC)
configure:3046: $? = 0
configure:3035: i686-w64-mingw32-gcc -V >&5
i686-w64-mingw32-gcc: error: unrecognized command line option '-V'
i686-w64-mingw32-gcc: fatal error: no input files
compilation terminated.
configure:3046: $? = 1
configure:3035: i686-w64-mingw32-gcc -qversion >&5
i686-w64-mingw32-gcc: error: unrecognized command line option '-qversion'
i686-w64-mingw32-gcc: fatal error: no input files
compilation terminated.
configure:3046: $? = 1
configure:3066: checking whether the C compiler works
configure:3088: i686-w64-mingw32-gcc -g -Wno-unused-local-typedefs conftest.c >&5
configure:3092: $? = 0
configure:3140: result: yes
configure:3143: checking for C compiler default output file name
configure:3145: result: a.exe
configure:3151: checking for suffix of executables
configure:3158: i686-w64-mingw32-gcc -o conftest.exe -g -Wno-unused-local-typedefs conftest.c >&5
configure:3162: $? = 0
configure:3184: result: .exe
configure:3206: checking whether we are cross compiling
configure:3214: i686-w64-mingw32-gcc -o conftest.exe -g -Wno-unused-local-typedefs conftest.c >&5
configure:3218: $? = 0
configure:3225: ./conftest.exe
./conftest.exe: Invalid argument
configure:3229: $? = 1
configure:3244: result: yes
configure:3249: checking for suffix of object files
configure:3271: i686-w64-mingw32-gcc -c -g -Wno-unused-local-typedefs conftest.c >&5
configure:3275: $? = 0
configure:3296: result: o
configure:3300: checking whether we are using the GNU C compiler
configure:3319: i686-w64-mingw32-gcc -c -g -Wno-unused-local-typedefs conftest.c >&5
configure:3319: $? = 0
configure:3328: result: yes
configure:3337: checking whether i686-w64-mingw32-gcc accepts -g
configure:3357: i686-w64-mingw32-gcc -c -g conftest.c >&5
configure:3357: $? = 0
configure:3398: result: yes
configure:3415: checking for i686-w64-mingw32-gcc option to accept ISO C89
configure:3478: i686-w64-mingw32-gcc -c -g -Wno-unused-local-typedefs conftest.c >&5
configure:3478: $? = 0
configure:3491: result: none needed
configure:3522: checking for style of include used by make
configure:3550: result: GNU
configure:3576: checking dependency style of i686-w64-mingw32-gcc
configure:3687: result: gcc3
configure:3716: checking for i686-w64-mingw32-g++
configure:3732: found /usr/bin/i686-w64-mingw32-g++
configure:3743: result: i686-w64-mingw32-g++
configure:3814: checking for C++ compiler version
configure:3823: i686-w64-mingw32-g++ --version >&5
i686-w64-mingw32-g++ (GCC) 5.3.1 20160211
Copyright (C) 2015 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:3834: $? = 0
configure:3823: i686-w64-mingw32-g++ -v >&5
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/5.3-win32/lto-wrapper
Target: i686-w64-mingw32
Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir='/usr/lib/gcc-mingw-w64' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32 --with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld --disable-libatomic
Thread model: win32
gcc version 5.3.1 20160211 (GCC)
configure:3834: $? = 0
configure:3823: i686-w64-mingw32-g++ -V >&5
i686-w64-mingw32-g++: error: unrecognized command line option '-V'
i686-w64-mingw32-g++: fatal error: no input files
compilation terminated.
configure:3834: $? = 1
configure:3823: i686-w64-mingw32-g++ -qversion >&5
i686-w64-mingw32-g++: error: unrecognized command line option '-qversion'
i686-w64-mingw32-g++: fatal error: no input files
compilation terminated.
configure:3834: $? = 1
configure:3838: checking whether we are using the GNU C++ compiler
configure:3857: i686-w64-mingw32-g++ -c -g -Wno-unused-local-typedefs conftest.cpp >&5
configure:3857: $? = 0
configure:3866: result: yes
configure:3875: checking whether i686-w64-mingw32-g++ accepts -g
configure:3895: i686-w64-mingw32-g++ -c -g conftest.cpp >&5
configure:3895: $? = 0
configure:3936: result: yes
configure:3961: checking dependency style of i686-w64-mingw32-g++
configure:4072: result: gcc3
configure:4090: checking for i686-w64-mingw32-ranlib
configure:4106: found /usr/bin/i686-w64-mingw32-ranlib
configure:4117: result: i686-w64-mingw32-ranlib
configure:4234: checking for sdl-config
configure:4252: found /usr/bin/sdl-config
configure:4265: result: /usr/bin/sdl-config
configure:4275: checking for SDL - version >= 1.2.8
configure:4377: result: yes
configure:4513: checking for wx-config
configure:4532: found /usr/i686-w64-mingw32/bin/wx-config
configure:4545: result: /usr/i686-w64-mingw32/bin/wx-config
configure:4560: checking for wxWidgets version >= 2.8.9
configure:4675: result: no
configure:4749: error:
wxWidgets does not seem to be installed on your system.
If you think wxWidgets >= 2.8.9 is installed,
please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i686-w64-mingw32
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=.exe
ac_cv_host=i686-w64-mingw32
ac_cv_objext=o
ac_cv_path_SDL_CONFIG=/usr/bin/sdl-config
ac_cv_path_WX_CONFIG_PATH=/usr/i686-w64-mingw32/bin/wx-config
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=i686-w64-mingw32-gcc
ac_cv_prog_CXX=i686-w64-mingw32-g++
ac_cv_prog_RANLIB=i686-w64-mingw32-ranlib
ac_cv_prog_STRIP=i686-w64-mingw32-strip
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_prog_make_make_set=yes
ac_cv_target=i686-w64-mingw32
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=gcc3
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run aclocal-1.12'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AUTOCONF='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run autoconf'
AUTOHEADER='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run autoheader'
AUTOMAKE='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run automake-1.12'
AWK='gawk'
CC='i686-w64-mingw32-gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -Wno-unused-local-typedefs'
CPPFLAGS=''
CXX='i686-w64-mingw32-g++'
CXXDEPMODE='depmode=gcc3'
CXXFLAGS='-g -Wno-unused-local-typedefs'
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT='.exe'
GOT_RESCOMP_FALSE=''
GOT_RESCOMP_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
OBJEXT='o'
ON_WIN32_FALSE='#'
ON_WIN32_TRUE=''
PACKAGE='sound-of-sorting'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='sound-of-sorting'
PACKAGE_STRING='sound-of-sorting 0.6.5'
PACKAGE_TARNAME='sound-of-sorting'
PACKAGE_URL=''
PACKAGE_VERSION='0.6.5'
PATH_SEPARATOR=':'
RANLIB='i686-w64-mingw32-ranlib'
SDL_CFLAGS='-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT'
SDL_CONFIG='/usr/bin/sdl-config'
SDL_LIBS='-L/usr/lib/x86_64-linux-gnu -lSDL'
SET_MAKE=''
SHELL='/bin/bash'
STRIP='i686-w64-mingw32-strip'
VERSION='0.6.5'
WX_CFLAGS=''
WX_CFLAGS_ONLY=''
WX_CONFIG_PATH='/usr/i686-w64-mingw32/bin/wx-config'
WX_CPPFLAGS=''
WX_CXXFLAGS=''
WX_CXXFLAGS_ONLY=''
WX_LIBS=''
WX_LIBS_STATIC=''
WX_RESCOMP=''
WX_VERSION=''
WX_VERSION_MAJOR=''
WX_VERSION_MICRO=''
WX_VERSION_MINOR=''
ac_ct_CC=''
ac_ct_CXX=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE='#'
am__fastdepCXX_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-w64-mingw32'
host_alias='i686-w64-mingw32'
host_cpu='i686'
host_os='mingw32'
host_vendor='w64'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='i686-w64-mingw32'
target_alias=''
target_cpu='i686'
target_os='mingw32'
target_vendor='w64'
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "sound-of-sorting"
#define PACKAGE_TARNAME "sound-of-sorting"
#define PACKAGE_VERSION "0.6.5"
#define PACKAGE_STRING "sound-of-sorting 0.6.5"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "sound-of-sorting"
#define VERSION "0.6.5"
configure: exit 1

You're trying to cross-compile from Linux to Windows. For this to work, you need a Windows version of wxWidgets and not the native Linux one which is found in your first example.
Do you actually want to cross-compile? Your phrase about "just because the host is different" leaves a doubt about whether you actually do it intentionally.

Related

When building the library matio, the configure script throws the error "C compiler cannot create executables"

For building the library matio, I first need to execute a configure script and afterwards run make. The configure script however throws the following error:
configure: error: in `/home/user/matio-master':
configure: error: C compiler cannot create executables
More specifically, the error happens while executing core tests. Below you see a section of the config.log. What could be the reason for the fail and how can I fix it?
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2135: checking for a BSD-compatible install
configure:2203: result: /usr/bin/install -c
configure:2214: checking whether build environment is sane
configure:2274: result: yes
configure:2415: checking for a thread-safe mkdir -p
configure:2454: result: /bin/mkdir -p
configure:2467: checking for gawk
configure:2483: found /bin/gawk
configure:2494: result: gawk
configure:2505: checking whether make sets $(MAKE)
configure:2527: result: yes
configure:2622: checking whether to enable maintainer-specific portions of Makefiles
configure:2631: result: no
configure:2651: checking build system type
configure:2669: result: x86_64-pc-linux-gnu
configure:2691: checking host system type
configure:2706: result: x86_64-pc-linux-gnu
configure:2819: checking for pgcc
configure:2849: result: no
configure:2819: checking for icc
configure:2849: result: no
configure:2819: checking for gcc
configure:2835: found /home/user/gcc
configure:2846: result: gcc
configure:2880: checking for C compiler version
configure:2888: gcc --version >&5
gcc (GCC) 6.3.0
Copyright (C) 2016 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:2892: $? = 0
configure:2899: gcc -v >&5
Using built-in specs.
COLLECT_GCC=/cadappl_sde/ictools/gcc/6.3.0/bin/gcc
COLLECT_LTO_WRAPPER=/sysmnt/cadappl_sde/ictools/gcc/6.3.0/bin/../libexec/gcc/x86_64-redhat-linux/6.3.0/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../gcc-6.3.0/configure --prefix=/cadappl_sde/ictools/gcc/6.3.0 --with-isl=/cadappl_sde/ictools/gcc/6.3.0 --with-gmp=/cadappl_sde/ictools/gcc/6.3.0 --with-mpfr=/cadappl_sde/ictools/gcc/6.3.0 --with-mpc=/cadappl_sde/ictools/gcc/6.3.0 --enable-static --enable-shared --enable-bootstrap --enable-checking=release --disable-werror --disable-nls --enable-threads=posix --disable-libunwind-exceptions --enable-__cxa_atexit --enable-gnu-unique-object --enable-languages=c,c++,fortran,java,go,objc,obj-c++ --enable-c99 --disable-libada --enable-plugin --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --enable-libstdcxx-time --enable-long-long --disable-multilib
Thread model: posix
gcc version 6.3.0 (GCC)
configure:2903: $? = 0
configure:2910: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2914: $? = 1
configure:2937: checking for C compiler default output file name
configure:2959: gcc -L/boost_filesystem -L/boost_system conftest.c >&5
configure:2963: $? = 0
configure:3001: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "MATIO"
| #define PACKAGE_TARNAME "matio"
| #define PACKAGE_VERSION "1.5.13"
| #define PACKAGE_STRING "MATIO 1.5.13"
| #define PACKAGE_BUGREPORT "t-beu#users.sourceforge.net"
| #define PACKAGE "matio"
| #define VERSION "1.5.13"
| #define MATIO_PLATFORM "x86_64-pc-linux-gnu"
| #define MATIO_MAJOR_VERSION 1
| #define MATIO_MINOR_VERSION 5
| #define MATIO_RELEASE_LEVEL 13
| #define MATIO_VERSION 1513
| #define MATIO_VERSION_STR "1.5.13"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3007: error: in `/home/user/matio-master':
configure:3010: error: C compiler cannot create executables
See `config.log' for more details.

building gcc 5.2.0 from source: configure: error: C compiler cannot create executables

I am trying to build gcc 5.2.0 from source in my local $HOME directory and I get the following errors:
gcc-gcc_5_2_0_release> ./configure --prefix=$HOME/usr/local
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/home/s31941/tmp/gcc-gcc_5_2_0_release':
configure: error: C compiler cannot create executables
See `config.log' for more details.
here is a copy of the 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 configure, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ ./configure --prefix=/home/username/usr/local
## --------- ##
## Platform. ##
## --------- ##
hostname = fmsserv
uname -m = x86_64
uname -r = 3.0.101-0.46-default
uname -s = Linux
uname -v = #1 SMP Wed Dec 17 11:04:10 UTC 2014 (8356111)
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/username/usr/local/bin
PATH: /home/username/tools/git/bin
PATH: /home/username/tools/java/jre1.8.0_40/bin
PATH: /home/username/tools/eclipse
PATH: .
PATH: /usr/NX/bin
PATH: /usr/lib64/mpi/gcc/openmpi/bin
PATH: /home/username/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/bin/X11
PATH: /usr/X11R6/bin
PATH: /usr/games
PATH: /opt/kde3/bin
PATH: /usr/lib/mit/bin
PATH: /usr/lib/mit/sbin
PATH: /opt/gnome/bin
PATH: /usr/lib/qt3/bin
PATH: /home/fms/bin
PATH: /usr/gnat/bin
PATH: .
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2292: checking build system type
configure:2306: result: x86_64-unknown-linux-gnu
configure:2353: checking host system type
configure:2366: result: x86_64-unknown-linux-gnu
configure:2386: checking target system type
configure:2399: result: x86_64-unknown-linux-gnu
configure:2453: checking for a BSD-compatible install
configure:2521: result: /usr/bin/install -c
configure:2532: checking whether ln works
configure:2554: result: yes
configure:2558: checking whether ln -s works
configure:2562: result: yes
configure:2569: checking for a sed that does not truncate output
configure:2633: result: /usr/bin/sed
configure:2642: checking for gawk
configure:2658: found /usr/bin/gawk
configure:2669: result: gawk
configure:3183: checking for libatomic support
configure:3193: result: yes
configure:3202: checking for libcilkrts support
configure:3212: result: yes
configure:3240: checking for libitm support
configure:3250: result: yes
configure:3259: checking for libsanitizer support
configure:3269: result: yes
configure:3278: checking for libvtv support
configure:3288: result: yes
configure:4074: checking for gcc
configure:4090: found /usr/bin/gcc
configure:4101: result: gcc
configure:4330: checking for C compiler version
configure:4339: gcc --version >&5
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
Copyright (C) 2008 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:4350: $? = 0
configure:4339: gcc -v >&5
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux)
configure:4350: $? = 0
configure:4339: gcc -V >&5
gcc: '-V' option must have argument
configure:4350: $? = 1
configure:4339: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:4350: $? = 1
configure:4370: checking for C compiler default output file name
configure:4392: gcc conftest.c >&5
gcc: error trying to exec 'cc1': execvp: No such file or directory
configure:4396: $? = 1
configure:4433: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4439: error: in `/home/username/tmp/gcc-gcc_5_2_0_release':
configure:4443: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set=
ac_cv_env_AR_value=
ac_cv_env_AS_FOR_TARGET_set=
ac_cv_env_AS_FOR_TARGET_value=
ac_cv_env_AS_set=
ac_cv_env_AS_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_FOR_TARGET_set=
ac_cv_env_CXX_FOR_TARGET_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_DLLTOOL_FOR_TARGET_set=
ac_cv_env_DLLTOOL_FOR_TARGET_value=
ac_cv_env_DLLTOOL_set=
ac_cv_env_DLLTOOL_value=
ac_cv_env_GCC_FOR_TARGET_set=
ac_cv_env_GCC_FOR_TARGET_value=
ac_cv_env_GCJ_FOR_TARGET_set=
ac_cv_env_GCJ_FOR_TARGET_value=
ac_cv_env_GFORTRAN_FOR_TARGET_set=
ac_cv_env_GFORTRAN_FOR_TARGET_value=
ac_cv_env_GOC_FOR_TARGET_set=
ac_cv_env_GOC_FOR_TARGET_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LD_FOR_TARGET_set=
ac_cv_env_LD_FOR_TARGET_value=
ac_cv_env_LD_set=
ac_cv_env_LD_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LIPO_FOR_TARGET_set=
ac_cv_env_LIPO_FOR_TARGET_value=
ac_cv_env_LIPO_set=
ac_cv_env_LIPO_value=
ac_cv_env_NM_FOR_TARGET_set=
ac_cv_env_NM_FOR_TARGET_value=
ac_cv_env_NM_set=
ac_cv_env_NM_value=
ac_cv_env_OBJCOPY_FOR_TARGET_set=
ac_cv_env_OBJCOPY_FOR_TARGET_value=
ac_cv_env_OBJCOPY_set=
ac_cv_env_OBJCOPY_value=
ac_cv_env_OBJDUMP_FOR_TARGET_set=
ac_cv_env_OBJDUMP_FOR_TARGET_value=
ac_cv_env_OBJDUMP_set=
ac_cv_env_OBJDUMP_value=
ac_cv_env_RANLIB_FOR_TARGET_set=
ac_cv_env_RANLIB_FOR_TARGET_value=
ac_cv_env_RANLIB_set=
ac_cv_env_RANLIB_value=
ac_cv_env_READELF_FOR_TARGET_set=
ac_cv_env_READELF_FOR_TARGET_value=
ac_cv_env_READELF_set=
ac_cv_env_READELF_value=
ac_cv_env_STRIP_FOR_TARGET_set=
ac_cv_env_STRIP_FOR_TARGET_value=
ac_cv_env_STRIP_set=
ac_cv_env_STRIP_value=
ac_cv_env_WINDMC_FOR_TARGET_set=
ac_cv_env_WINDMC_FOR_TARGET_value=
ac_cv_env_WINDMC_set=
ac_cv_env_WINDMC_value=
ac_cv_env_WINDRES_FOR_TARGET_set=
ac_cv_env_WINDRES_FOR_TARGET_value=
ac_cv_env_WINDRES_set=
ac_cv_env_WINDRES_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_build_configargs_set=
ac_cv_env_build_configargs_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_host_configargs_set=
ac_cv_env_host_configargs_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_env_target_configargs_set=
ac_cv_env_target_configargs_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_path_SED=/usr/bin/sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_target=x86_64-unknown-linux-gnu
acx_cv_prog_LN=ln
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR=''
AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET=''
AS=''
AS_FOR_BUILD='$(AS)'
AS_FOR_TARGET=''
AWK='gawk'
BISON=''
BUILD_CONFIG=''
CC='gcc'
CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET=''
CFLAGS=''
CFLAGS_FOR_BUILD=''
CFLAGS_FOR_TARGET=''
COMPILER_AS_FOR_TARGET=''
COMPILER_LD_FOR_TARGET=''
COMPILER_NM_FOR_TARGET=''
CONFIGURE_GDB_TK=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
CXXFLAGS_FOR_BUILD=''
CXXFLAGS_FOR_TARGET=''
CXX_FOR_BUILD='$(CXX)'
CXX_FOR_TARGET=''
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS=''
DLLTOOL=''
DLLTOOL_FOR_BUILD='$(DLLTOOL)'
DLLTOOL_FOR_TARGET=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
EXPECT=''
EXTRA_CONFIGARGS_LIBJAVA='--disable-static'
FLAGS_FOR_TARGET=''
FLEX=''
GCC_FOR_TARGET=''
GCC_SHLIB_SUBDIR=''
GCJ_FOR_BUILD='$(GCJ)'
GCJ_FOR_TARGET=''
GDB_TK=''
GFORTRAN_FOR_BUILD='$(GFORTRAN)'
GFORTRAN_FOR_TARGET=''
GNATBIND=''
GNATMAKE=''
GOC_FOR_BUILD='$(GOC)'
GOC_FOR_TARGET=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD=''
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LDFLAGS_FOR_TARGET=''
LD_FOR_BUILD='$(LD)'
LD_FOR_TARGET=''
LEX=''
LIBOBJS=''
LIBS=''
LIPO=''
LIPO_FOR_TARGET=''
LN='ln'
LN_S='ln -s'
LTLIBOBJS=''
M4=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO=''
NM=''
NM_FOR_BUILD='$(NM)'
NM_FOR_TARGET=''
OBJCOPY=''
OBJCOPY_FOR_TARGET=''
OBJDUMP=''
OBJDUMP_FOR_TARGET=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET=''
RAW_CXX_FOR_TARGET=''
READELF=''
READELF_FOR_TARGET=''
RPATH_ENVVAR=''
RUNTEST=''
SED='/usr/bin/sed'
SHELL='/bin/sh'
STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='./configure --prefix=/home/username/usr/local'
WINDMC=''
WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET=''
WINDRES=''
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET=''
YACC=''
ac_ct_CC='gcc'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_configargs=''
build_configdirs='build-libiberty build-libcpp build-texinfo build-flex build-bison build-m4 build-fixincludes'
build_cpu='x86_64'
build_libsubdir='build-x86_64-unknown-linux-gnu'
build_noncanonical='x86_64-unknown-linux-gnu'
build_os='linux-gnu'
build_subdir='build-x86_64-unknown-linux-gnu'
build_tooldir=''
build_vendor='unknown'
compare_exclusions=''
configdirs='intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
do_compare=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
extra_host_libiberty_configure_flags=''
extra_isl_gmp_configure_flags=''
extra_liboffloadmic_configure_flags=''
extra_linker_plugin_configure_flags=''
extra_linker_plugin_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
gmpinc=''
gmplibs=''
host='x86_64-unknown-linux-gnu'
host_alias=''
host_configargs=''
host_cpu='x86_64'
host_noncanonical='x86_64-unknown-linux-gnu'
host_os='linux-gnu'
host_shared=''
host_subdir='host-x86_64-unknown-linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
islinc=''
isllibs=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
poststage1_ldflags=''
poststage1_libs=''
prefix='/home/username/usr/local'
program_transform_name='s,y,y,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags=''
stage1_checking=''
stage1_languages=''
stage1_ldflags=''
stage1_libs=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='x86_64-unknown-linux-gnu'
target_alias=''
target_configargs=''
target_configdirs='target-libgcc target-libbacktrace target-libgloss target-newlib target-libgomp target-libcilkrts target-liboffloadmic target-libatomic target-libitm target-libstdc++-v3 target-libsanitizer target-libvtv target-libmpx target-libssp target-libquadmath target-libgfortran target-boehm-gc target-libffi target-zlib target-libjava target-libobjc target-libada target-libgo target-rda'
target_cpu='x86_64'
target_noncanonical='x86_64-unknown-linux-gnu'
target_os='linux-gnu'
target_subdir='x86_64-unknown-linux-gnu'
target_vendor='unknown'
tooldir=''
## ------------------- ##
## File substitutions. ##
## ------------------- ##
alphaieee_frag=''
host_makefile_frag='/dev/null'
ospace_frag=''
serialization_dependencies=''
target_makefile_frag=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
configure: exit 77
Any help determining whats wrong would be greatly appreciated.
gcc-gcc_5_2_0_release> which ld
/usr/bin/ld
gcc-gcc_5_2_0_release> which gcc
/usr/bin/gcc
gcc-gcc_5_2_0_release> ld --version
GNU ld (GNU Binutils; SUSE Linux Enterprise 11) 2.23.1
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
gcc-gcc_5_2_0_release> gcc --version
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
Copyright (C) 2008 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.
First, it is documented that GCC should not be built inside its source tree:
First, we highly recommend that GCC be built into a separate directory from the sources which does not reside within the source tree.
Then you need to be sure that the prefix tree exists. I believe that your choice $HOME/usr/local/ is a poor one (it is confusing). I suggest using $HOME/soft/ instead.
If you have a Debian or similar distribution, be sure to aptitude install build-dep gcc g++ before configuring (You might need some deb-src line in your /etc/apt/sources.list file). This will download all the software required to build GCC. Don't forget to aptitude install gcc g++ build-essential in all cases (to have a working gcc & g++ system compilers). On SUSE, try to find the equivalent packages and commands: gcc-c++ package, build service.
So I suggest to start again. Use
mkdir -p -$HOME/tmp/softbuilds
mkdir -p $HOME/soft/
cd $HOME/tmp/
## the following URL is not the best one, choose carefully the server
wget http://open-source-box.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
cd softbuilds
tar xvf ../gcc-5.2.0.tar.bz2
mkdir _GCC-5.2_Build
cd _GCC-5.2_Build
../gcc-5.2.0/configure --help
## you could add some other configure options here:
../gcc-5.2.0/configure --prefix=$HOME/soft --program-suffix=-mine \
--enable-plugins --enable-languages=c,c++,jit,lto,go \
--enable-check=release --enable-host-shared
If the configuration step succeeded, you compile the thing with
make -j 3
Then (perhaps a few hours later) install it with:
make #to be sure all went ok
make install
Then add $HOME/soft/bin/ to your PATH (e.g. by editing .bashrc ...) and use gcc-mine as your compiler (e.g. make CC=gcc-mine)
If you want to always use your GCC, and if $HOME/bin/ is early in your $PATH, you might make symlinks from $HOME/soft/bin/gcc-mine to $HOME/bin/gcc (and likewise for g++-mine ...).
BTW, you could later install the MELT meta-plugin for your GCC. I have released MELT 1.2.0 for GCC 4.9 & 5.x a few days ago (end of july 2015).
configure:4370: checking for C compiler default output file name
configure:4392: gcc conftest.c >&5
gcc: error trying to exec 'cc1': execvp: No such file or directory
This indicates that your host compiler isn't working. Make sure it works before attempting to configure other software.
Whether it's caused by a missing package on your system, some environment variable you set that messes with the way GCC works, or perhaps even some local filesystem corruption, you'll see the same problem just compiling a simple "Hello, world!" program from the command line.
Fix that first, and only then start trying to build larger software packages.

How to build QuantLib on mac os x 10.9.5

So far I'm unable to build QuantLib 1.5 on os x 10.9.5 following the official instructions http://quantlib.org/install/macosx.shtml
./configure --enable-static --with-boost-include=/opt/local/include/ \
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/ \
CXXFLAGS="-stlib=libstdc++ -mmacosx-version-min=10.6" \
LDFLAGS="-stlib=libstdc++ -mmacosx-version-min=10.6"
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gawk... (cached) awk
checking for -gcc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `~/Downloads/qlib/QuantLib-1.5':
configure: error: C compiler cannot create executables
See `config.log' for more details
$ make && sudo make install
make: *** No targets specified and no makefile found. Stop.
So what may be wrong? And how can I fix it?
Here is an excerpt from Config log:
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2416: checking for a BSD-compatible install
configure:2484: result: /usr/bin/install -c
configure:2495: checking whether build environment is sane
configure:2550: result: yes
configure:2701: checking for a thread-safe mkdir -p
configure:2740: result: config/install-sh -c -d
configure:2747: checking for gawk
configure:2777: result: no
configure:2747: checking for mawk
configure:2777: result: no
configure:2747: checking for nawk
configure:2777: result: no
configure:2747: checking for awk
configure:2763: found /usr/bin/awk
configure:2774: result: awk
configure:2785: checking whether make sets $(MAKE)
configure:2807: result: yes
configure:2836: checking whether make supports nested variables
configure:2853: result: yes
configure:2987: checking for gawk
configure:3014: result: awk
configure:3069: checking for -gcc
configure:3099: result: no
configure:3109: checking for gcc
configure:3125: found /usr/bin/gcc
configure:3136: result: gcc
configure:3365: checking for C compiler version
configure:3374: gcc --version >&5
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
configure:3385: $? = 0
configure:3374: gcc -v >&5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
configure:3385: $? = 0
configure:3374: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3385: $? = 1
configure:3374: gcc -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:3385: $? = 1
configure:3405: checking whether the C compiler works
configure:3427: gcc -I/opt/local/include -stlib=libstdc++ -mmacosx-version-min=10.6 -L/opt/local/lib conftest.c >&5
clang: error: unknown argument: '-stlib=libstdc++'
configure:3431: $? = 1
configure:3469: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "QuantLib"
| #define PACKAGE_TARNAME "QuantLib"
| #define PACKAGE_VERSION "1.5"
| #define PACKAGE_STRING "QuantLib 1.5"
| #define PACKAGE_BUGREPORT "quantlib-dev#lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "QuantLib"
| #define VERSION "1.5"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3474: error: in `~/Downloads/qlib/QuantLib-1.5':
configure:3476: error: C compiler cannot create executables
See `config.log' for more details
If you have this problem
checking whether the C compiler works... no
It means that you have not installed the command line tools properly for your Xcode. Please download and install it.
Your clue is in the config.log: "clang: error: unknown argument: '-stlib=libstdc++' "
change -stlib to -stdlib, it should compile and build.
See this related answer on how to configure gcc. The reason is, like me, you probably installed GCC with homebrew or something, therefore not using Apple's default.
I installed GCC 5.3 with homebrew.
Worked for me by just taking out -stdlib option all together.

sqlcipher ./configuration Windows

How can I compile Sqlcipher on windows?
I'm trying this:
Git Clone sqlcipher C:\sqlcipher
Install MINGW32 C:\MINGW32
Install msys C:\MINGW32\msys\1.0
Install tcltk-8.4.1-1 C:\MINGW32\bin tclsh84 to tclsh.exe
Install Win32OpenSSL-1_0_1f C:\OpenSSL-Win32
1- Run C:\MINGW32\msys\1.0\msys.exe
2 - Cmd mysys command cd c:sqlcipher
3 - ./configure --prefix=C:/Qt/Qt5.2.1/5.2.1/mingw48_32/plugins/sqldrivers/qsqlcipher CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
returns the error:
./configure: line 470: sed: command not found
./configure: line 469: expr:command not found
./configure: line 470: sed: command not found
./configure: line 484: sed: command not found
Updated
Config.log
configure:2484: checking build system type
configure:2498: result: i686-pc-mingw32
configure:2518: checking host system type
configure:2531: result: i686-pc-mingw32
configure:2599: checking for gcc
configure:2615: found /bin/gcc
configure:2626: result: gcc
configure:2855: checking for C compiler version
configure:2864: gcc --version >&5
gcc.exe (GCC) 4.8.1
Copyright (C) 2013 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:2875: $? = 0
configure:2864: gcc -v >&5
Using built-in specs.
COLLECT_GCC=C:\MinGW\msys\1.0\bin\gcc.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
configure:2875: $? = 0
configure:2864: gcc -V >&5
gcc.exe: error: unrecognized command line option '-V'
gcc.exe: fatal error: no input files
compilation terminated.
configure:2875: $? = 1
configure:2864: gcc -qversion >&5
gcc.exe: error: unrecognized command line option '-qversion'
gcc.exe: fatal error: no input files
compilation terminated.
configure:2875: $? = 1
configure:2895: checking whether the C compiler works
configure:2917: gcc conftest.c >&5
gcc.exe: error: CreateProcess: No such file or directory
configure:2921: $? = 1
configure:2959: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "sqlcipher"
| #define PACKAGE_TARNAME "sqlcipher"
| #define PACKAGE_VERSION "3.8.0.2"
| #define PACKAGE_STRING "sqlcipher 3.8.0.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2964: error: in `/c/sqlcipher':
configure:2966: error: C compiler cannot create executables
See `config.log' for more details

Can't compile SQLCipher on Windows

I'm trying to compile SQLCipher. I've downloaded source code from http://sqlcipher.net/.
Then I'm doing from this post:
[http://groups.google.com/group/sqlcipher/browse_thread/thread/55c6296b56bf4533:][1]
[1]
I installed MinGW (set path to gcc: d:\MinGW\bin), OpenSSL and ActiveState Perl. I copyied file libeay32.dll to sqlcipher directory. Than I try execute this command:
./configure --disable-tcl CFLAGS="-DSQLITE_HAS_CODEC
-I/path/to/openssl/include" LDFLAGS="-leay32"
and I got error:
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
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.
Config.log shows:
configure:2537: $? = 0
configure:2544: gcc -v >&5
Using built-in specs.
COLLECT_GCC=D:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)
configure:2548: $? = 0
configure:2555: gcc -V >&5
gcc.exe: '-V' option must have argument
configure:2559: $? = 1
configure:2582: checking for C compiler default output file name
configure:2604: gcc -DSQLITE_HAS_CODEC -l/d/OpenSSL-Win32/bin -libeay32 conftest.c >&5
**d:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -ld:/OpenSSL-Win32/bin
d:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -libeay32**
collect2: ld returned 1 exit status
I don't know what is -leay32. I copied file libeay32.dll to sqlcipher directory. In D there is directory OpenSSL-Win32.
Thanks
Try this for your configure command:
./configure –disable-tcl CFLAGS=”-DSQLITE_HAS_CODEC –Ic:/path/to/openssl/include –Lc:/path/to/openssl/lib –leay32”
-leay32 is a library flag, so think of it like "-l eay32". It's referred to as "eay32" because the library flag ignores the "lib" of "libeay32".