configure: error: C++ compiler cannot create executables on macOS - c++

I am trying to run the IPHREEQC section1.
I am using a macOS Catalina Version 10.15.7 Unfortunately, every time I enter ./configure I have the error below:
[IPHREEQC][1]bob#LIBRLTMCKM0FWJ1W iphreeqc-3.6.2-15100 % ./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... 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 whether make supports nested variables... (cached) yes
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/Users/bob/Desktop/Work/iphreeqc-3.6.2-15100':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
The 'config.log' section says
*This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by IPhreeqc configure 3.6.2-15100, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = LIBRLTMCKM0FWJ1W
uname -m = x86_64
uname -r = 19.6.0
uname -s = Darwin
uname -v = Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 8.00 gigabytes
Default processor set: 365 tasks, 1435 threads, 4 processors
Load average: 3.31, Mach factor: 1.55
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/X11/bin
PATH: /Library/Apple/usr/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2581: checking for a BSD-compatible install
configure:2649: result: /usr/bin/install -c
configure:2660: checking whether build environment is sane
configure:2715: result: yes
configure:2866: checking for a thread-safe mkdir -p
configure:2905: result: config/install-sh -c -d
configure:2912: checking for gawk
configure:2942: result: no
configure:2912: checking for mawk
configure:2942: result: no
configure:2912: checking for nawk
configure:2942: result: no
configure:2912: checking for awk
configure:2928: found /usr/bin/awk
configure:2939: result: awk
configure:2950: checking whether make sets $(MAKE)
configure:2972: result: yes
configure:3001: checking whether make supports nested variables
configure:3018: result: yes
configure:3158: checking whether make supports nested variables
configure:3175: result: yes
configure:3253: checking for g++
configure:3269: found /usr/local/bin/g++
configure:3280: result: g++
configure:3307: checking for C++ compiler version
configure:3316: g++ --version >&5
g++ (GCC) 9.2.0
Copyright (C) 2019 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:3327: $? = 0
configure:3316: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin19/9.2.0/lto-wrapper
Target: x86_64-apple-darwin19
Configured with: ../gcc-9.2.0/configure --build=x86_64-apple-darwin19 --disable-nls --enable-checking=release --with-system-zlib --disable-multilib --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk --enable-languages=c,c++,fortran --with-gmp=/usr/local --with-mpc=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 9.2.0 (GCC)
configure:3327: $? = 0
configure:3316: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:3327: $? = 1
configure:3316: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'; did you mean '--version'?
g++: fatal error: no input files
compilation terminated.
configure:3327: $? = 1
configure:3347: checking whether the C++ compiler works
configure:3369: g++ conftest.cpp >&5
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
configure:3373: $? = 1
configure:3411: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "IPhreeqc"
| #define PACKAGE_TARNAME "iphreeqc"
| #define PACKAGE_VERSION "3.6.2-15100"
| #define PACKAGE_STRING "IPhreeqc 3.6.2-15100"
| #define PACKAGE_BUGREPORT "charlton#usgs.gov"
| #define PACKAGE_URL ""
| #define PACKAGE "iphreeqc"
| #define VERSION "3.6.2-15100"
| #define SWIG_SHARED_OBJ 1
| #define USE_PHRQ_ALLOC 1
| #define NDEBUG 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3416: error: in `/Users/bob/Desktop/Work/iphreeqc-3.6.2-15100':
configure:3418: error: C++ compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
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_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=
ac_cv_env_FC_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
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_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /Users/bob/Desktop/Work/iphreeqc-3.6.2-15100/config/missing aclocal-1.15'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
AR=''
AUTOCONF='${SHELL} /Users/bob/Desktop/Work/iphreeqc-3.6.2-15100/config/missing autoconf'
AUTOHEADER='${SHELL} /Users/bob/Desktop/Work/iphreeqc-3.6.2-15100/config/missing autoheader'
AUTOMAKE='${SHELL} /Users/bob/Desktop/Work/iphreeqc-3.6.2-15100/config/missing automake-1.15'
AWK='awk'
BUILD_FORTRAN_FALSE=''
BUILD_FORTRAN_TRUE=''
CC=''
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX='g++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FC=''
FCFLAGS=''
FCLIBS=''
FC_MODEXT=''
FFLAGS=''
FGREP=''
FORTRAN_MODULE_FALSE=''
FORTRAN_MODULE_TRUE=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAKEINFO='${SHELL} /Users/bob/Desktop/Work/iphreeqc-3.6.2-15100/config/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='config/install-sh -c -d'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='iphreeqc'
PACKAGE_BUGREPORT='charlton#usgs.gov'
PACKAGE_NAME='IPhreeqc'
PACKAGE_STRING='IPhreeqc 3.6.2-15100'
PACKAGE_TARNAME='iphreeqc'
PACKAGE_URL=''
PACKAGE_VERSION='3.6.2-15100'
PATH_SEPARATOR=':'
POW_LIB=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='3.6.2-15100'
ac_ct_AR=''
ac_ct_CC=''
ac_ct_CXX='g++'
ac_ct_DUMPBIN=''
ac_ct_FC=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /Users/bob/Desktop/Work/iphreeqc-3.6.2-15100/config/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_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "IPhreeqc"
#define PACKAGE_TARNAME "iphreeqc"
#define PACKAGE_VERSION "3.6.2-15100"
#define PACKAGE_STRING "IPhreeqc 3.6.2-15100"
#define PACKAGE_BUGREPORT "charlton#usgs.gov"
#define PACKAGE_URL ""
#define PACKAGE "iphreeqc"
#define VERSION "3.6.2-15100"
#define SWIG_SHARED_OBJ 1
#define USE_PHRQ_ALLOC 1
#define NDEBUG 1
configure: exit 77
How do I fix this error?

The issue arises from the ./configure script being confused about which g++ to use: the GNU g++ downloaded from Sourceforge and installed in /usr/local/bin, and Apple's XCode g++ located in /usr/bin. In my case, what did the trick was temporarily removing /usr/local/bin from my $PATH variable by doing:
echo $PATH
to see what was in it (/usr/local/bin, /usr/bin, and a number of other folders), then
export PATH=/usr/bin:[same other folders as in the output to the echo command, except /usr/local/bin]
and running ./configure. That basically told the ./configure script to ignore the folder /usr/local/bin where the Sourceforge GNU g++ was installed and only use Apple's XCode g++, located in /usr/bin.
I figured it out by looking at config.log in detail. Irrespective of whether I was linking the Sourceforge or Apple g++ to the "g++" command (via alias g++=...), the ./configure script was finding by default the Sourceforge g++ and trying to run Apple commands on it, which I think is why the script said the C++ compiler was not working. By ignoring /usr/local/bin, it found by default the Apple g++ instead.

Related

Configuration error when installing PLUMED - configure: error: C++ compiler cannot create executables

I was trying to install a software called PLUMED from https://github.com/plumed/plumed2.git. However, I kept having the following error message when executing the command ./configure --prefix=/home/wei-tse/Documents/Software/PLUMED/plumed2_build:
configure: Optional modules are disabled by default
checking for mpic++... mpic++
checking whether the C++ compiler works... no
configure: error: in `/home/wei-tse/Documents/Software/PLUMED/plumed2':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
This is weird because I didn't have this error message when I installed PLUMED for the first time (like a year ago though). I've checked config.log and looked up possible solutions to this problem, but I still have no clue about how to solve this. Could anyone help me with this? config.log is attached as below. Thank you so much!!
The content of 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 PLUMED configure 2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/home/wei-tse/Documents/Software/PLUMED/plumed2_build
## --------- ##
## Platform. ##
## --------- ##
hostname = castlepeak
uname -m = x86_64
uname -r = 5.3.0-40-generic
uname -s = Linux
uname -v = #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020
/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/bin/dssp
PATH: /home/wei-tse/amber18/bin
PATH: /home/wei-tse/Documents/KBD_project
PATH: /home/wei-tse/Documents/Software/openeye/arch/Ubuntu-16.04-x64/quacpac
PATH: /usr/local/bin/dssp
PATH: /home/wei-tse/amber18/bin
PATH: /home/wei-tse/Documents/KBD_project
PATH: /home/wei-tse/Documents/Software/openeye/arch/Ubuntu-16.04-x64/quacpac
PATH: /usr/local/bin/dssp
PATH: /home/wei-tse/amber18/bin
PATH: /home/wei-tse/Documents/KBD_project
PATH: /home/wei-tse/Documents/Software/openeye/arch/Ubuntu-16.04-x64/quacpac
PATH: /usr/local/gromacs/bin
PATH: /usr/local/bin/dssp
PATH: /home/wei-tse/amber18/bin
PATH: /home/wei-tse/Documents/KBD_project
PATH: /home/wei-tse/Documents/Software/openeye/arch/Ubuntu-16.04-x64/quacpac
PATH: /usr/local/bin/dssp
PATH: /home/wei-tse/amber18/bin
PATH: /home/wei-tse/Documents/KBD_project
PATH: /home/wei-tse/Documents/Software/openeye/arch/Ubuntu-16.04-x64/quacpac
PATH: /home/wei-tse/.local/bin
PATH: /usr/local/bin/dssp
PATH: /home/wei-tse/amber18/bin
PATH: /home/wei-tse/Documents/KBD_project
PATH: /home/wei-tse/Documents/Software/openeye/arch/Ubuntu-16.04-x64/quacpac
PATH: /home/wei-tse/anaconda3/bin
PATH: /home/wei-tse/anaconda3/condabin
PATH: /home/wei-tse/.local/bin
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: /snap/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2424: Optional modules are disabled by default
configure:3366: checking for mpic++
configure:3382: found /home/wei-tse/anaconda3/bin/mpic++
configure:3393: result: mpic++
configure:3420: checking for C++ compiler version
configure:3429: mpic++ --version >&5
/home/wei-tse/anaconda3/bin/mpic++: line 283: x86_64-conda_cos6-linux-gnu-c++: command not found
configure:3440: $? = 127
configure:3429: mpic++ -v >&5
mpicxx for MPICH version 3.3.2
/home/wei-tse/anaconda3/bin/mpic++: line 299: x86_64-conda_cos6-linux-gnu-c++: command not found
configure:3440: $? = 127
configure:3429: mpic++ -V >&5
/home/wei-tse/anaconda3/bin/mpic++: line 283: x86_64-conda_cos6-linux-gnu-c++: command not found
configure:3440: $? = 127
configure:3429: mpic++ -qversion >&5
/home/wei-tse/anaconda3/bin/mpic++: line 283: x86_64-conda_cos6-linux-gnu-c++: command not found
configure:3440: $? = 127
configure:3460: checking whether the C++ compiler works
configure:3482: mpic++ -O3 conftest.cpp >&5
/home/wei-tse/anaconda3/bin/mpic++: line 283: x86_64-conda_cos6-linux-gnu-c++: command not found
configure:3486: $? = 127
configure:3524: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "PLUMED"
| #define PACKAGE_TARNAME "plumed"
| #define PACKAGE_VERSION "2"
| #define PACKAGE_STRING "PLUMED 2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3529: error: in `/home/wei-tse/Documents/Software/PLUMED/plumed2':
configure:3531: error: C++ compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_BASH_COMPLETION_DIR_set=
ac_cv_env_BASH_COMPLETION_DIR_value=
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_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=
ac_cv_env_FC_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LDSHARED_set=
ac_cv_env_LDSHARED_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_MPIEXEC_set=
ac_cv_env_MPIEXEC_value=
ac_cv_env_PYTHON_BIN_set=
ac_cv_env_PYTHON_BIN_value=
ac_cv_env_SOEXT_set=
ac_cv_env_SOEXT_value=
ac_cv_env_STATIC_LIBS_set=
ac_cv_env_STATIC_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
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_prog_ac_ct_CXX=mpic++
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR_CR=''
BASH_COMPLETION_DIR=''
CC=''
CFLAGS=''
CPPFLAGS=''
CXX='mpic++'
CXXCPP=''
CXXFLAGS='-O3'
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FC=''
FCFLAGS=''
GREP=''
LDFLAGS=''
LDSHARED=''
LD_RO=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MPIEXEC=''
OBJEXT=''
OPENMP_CXXFLAGS=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='PLUMED'
PACKAGE_STRING='PLUMED 2'
PACKAGE_TARNAME='plumed'
PACKAGE_URL=''
PACKAGE_VERSION='2'
PATH_SEPARATOR=':'
PYTHON_BIN=''
SHELL='/bin/bash'
SOEXT=''
STATIC_LIBS=''
ac_ct_CC=''
ac_ct_CXX='mpic++'
ac_ct_FC=''
bindir='${exec_prefix}/bin'
build_alias=''
build_dir=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
disable_dependency_tracking=''
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dot=''
doxygen=''
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
make_doc=''
make_pdfdoc=''
make_static_archive=''
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
pkgconfig_bin=''
prefix='/home/wei-tse/Documents/Software/PLUMED/plumed2_build'
program_can_run=''
program_can_run_mpi=''
program_name=''
program_transform_name='s,x,x,'
psdir='${docdir}'
readelf=''
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
use_absolute_soname=''
use_loader_path=''
xxd=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "PLUMED"
#define PACKAGE_TARNAME "plumed"
#define PACKAGE_VERSION "2"
#define PACKAGE_STRING "PLUMED 2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
configure: exit 77

./configure cannot not find a working compiler while building gmp library with MSYS2

I'm trying to build gmp-6.1.2 on Windows using MSYS2 with ./configure --enable-cxx command. I get the following error:
configure: error: could not find a working compiler, see config.log for details
Below is the content of 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 MP configure 6.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --enable-cxx
## --------- ##
## Platform. ##
## --------- ##
hostname = computer-name
uname -m = x86_64
uname -r = 2.11.1(0.329/5/3)
uname -s = MINGW64_NT-10.0
uname -v = 2018-09-10 14:19
/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: /mingw64/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /c/Windows/System32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /usr/bin/site_perl
PATH: /usr/bin/vendor_perl
PATH: /usr/bin/core_perl
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2885: loading site script /mingw64/etc/config.site
| # This file is in public domain.
| # Original author: Karlson2k (Evgeny Grin)
| # Written for MSys2/MinGW64 to help running 'configure' scripts
|
| # Defaults for MinGW64-targeted programs
|
| # Set proper selfname on bash and fallback to default name on other shells
| test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site
|
| # Set default 'host' to speedup configure
| if test -z "$build_alias"; then
| build_alias="${MSYSTEM_CHOST-x86_64-w64-mingw32}" && \
| $as_echo "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5
| fi
|
| # Set default 'prefix' to "/mingw64"
| if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \
| ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then
| prefix="${MSYSTEM_PREFIX-/mingw64}" && \
| $as_echo "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5
| fi
config.site:13: default build_alias set to x86_64-w64-mingw32
config.site:20: default prefix set to /mingw64
configure:3055: checking build system type
configure:3069: result: x86_64-w64-mingw32
configure:3089: checking host system type
configure:3102: result: x86_64-w64-mingw32
configure:3139: checking for a BSD-compatible install
configure:3207: result: /usr/bin/install -c
configure:3218: checking whether build environment is sane
configure:3273: result: yes
configure:3424: checking for a thread-safe mkdir -p
configure:3463: result: /usr/bin/mkdir -p
configure:3470: checking for gawk
configure:3486: found /usr/bin/gawk
configure:3497: result: gawk
configure:3508: checking whether make sets $(MAKE)
configure:3534: result: no
configure:3559: checking whether make supports nested variables
configure:3576: result: no
configure:3705: checking whether to enable maintainer-specific portions of Makefiles
configure:3714: result: no
User:
ABI=
CC=
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=64 x32 32
cclist=gcc icc cc
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer -m64 conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc -O
Test compile:
configure:5872: cc -O conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -mx32
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer -mx32 conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc
Test compile:
configure:5872: cc conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5872: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: icc -c conftest.c >&5
./configure: line 5780: icc: command not found
configure:5782: $? = 127
configure:5801: icc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler icc -no-gcc
Test compile:
configure:5872: icc -no-gcc conftest.c >&5
./configure: line 5873: icc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc -O
Test compile:
configure:5872: cc -O conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:7200: error: could not find a working compiler, see config.log for details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-w64-mingw32
ac_cv_env_ABI_set=
ac_cv_env_ABI_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_BUILD_set=
ac_cv_env_CC_FOR_BUILD_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_CPP_FOR_BUILD_set=
ac_cv_env_CPP_FOR_BUILD_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_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_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_M4_set=
ac_cv_env_M4_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
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-w64-mingw32
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_make_make_set=no
am_cv_make_support_nested_variables=no
## ----------------- ##
## Output variables. ##
## ----------------- ##
ABI=''
ACLOCAL='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing aclocal-1.15'
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='1'
AM_DEFAULT_VERBOSITY='1'
AM_V='1'
AR=''
AS=''
ASMFLAGS=''
AUTOCONF='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing autoconf'
AUTOHEADER='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing autoheader'
AUTOMAKE='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing automake-1.15'
AWK='gawk'
CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo'
CC=''
CCAS=''
CC_FOR_BUILD=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CPP_FOR_BUILD=''
CXX=''
CXXCPP=''
CXXFLAGS=''
CYGPATH_W='cygpath -w'
DEFN_LONG_LONG_LIMB=''
DEFS=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
EXEEXT=''
EXEEXT_FOR_BUILD=''
FGREP=''
GMP_LDFLAGS=''
GMP_LIMB_BITS=''
GMP_NAIL_BITS='0'
GREP=''
HAVE_CLOCK_01=''
HAVE_CPUTIME_01=''
HAVE_GETRUSAGE_01=''
HAVE_GETTIMEOFDAY_01=''
HAVE_HOST_CPU_FAMILY_power='0'
HAVE_HOST_CPU_FAMILY_powerpc='0'
HAVE_SIGACTION_01=''
HAVE_SIGALTSTACK_01=''
HAVE_SIGSTACK_01=''
HAVE_STACK_T_01=''
HAVE_SYS_RESOURCE_H_01=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBCURSES=''
LIBGMPXX_LDFLAGS=''
LIBGMP_DLL=''
LIBGMP_LDFLAGS=''
LIBM=''
LIBM_FOR_BUILD=''
LIBOBJS=''
LIBREADLINE=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
M4=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='gmp'
PACKAGE_BUGREPORT='gmp-bugs#gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html'
PACKAGE_NAME='GNU MP'
PACKAGE_STRING='GNU MP 6.1.2'
PACKAGE_TARNAME='gmp'
PACKAGE_URL='http://www.gnu.org/software/gmp/'
PACKAGE_VERSION='6.1.2'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE='MAKE=make'
SHELL='/bin/sh'
SPEED_CYCLECOUNTER_OBJ='pentium.lo'
STRIP=''
TAL_OBJECT=''
TUNE_LIBS=''
TUNE_SQR_OBJ=''
U_FOR_BUILD=''
VERSION='6.1.2'
WANT_CXX_FALSE=''
WANT_CXX_TRUE=''
WITH_READLINE_01=''
YACC=''
YFLAGS=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__isrc=''
am__leading_dot='.'
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-w64-mingw32'
build_alias='x86_64-w64-mingw32'
build_cpu='x86_64'
build_os='mingw32'
build_vendor='w64'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
gmp_srclinks=''
host='x86_64-w64-mingw32'
host_alias=''
host_cpu='x86_64'
host_os='mingw32'
host_vendor='w64'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
mpn_objects=''
mpn_objs_in_libgmp=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/mingw64'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "GNU MP"
#define PACKAGE_TARNAME "gmp"
#define PACKAGE_VERSION "6.1.2"
#define PACKAGE_STRING "GNU MP 6.1.2"
#define PACKAGE_BUGREPORT "gmp-bugs#gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html"
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
#define PACKAGE "gmp"
#define VERSION "6.1.2"
#define WANT_FFT 1
#define HAVE_HOST_CPU_x86_64 1
#define HOST_DOS64 1
configure: exit 1
Definitely, $CC is empty. I have gcc installed with MinGW so I tried to assign /c/MinGW/bin/gcc.exe to $CC but that didn't work either.
I know there are similar questions but none of those solutions solves my problem.

treemix configure error on MacOS 10.12.4

I got a compiling error to install treemix 1.3 on the latest MacOS 10.12.4 (Sierra). I tried some commands according to the similar problems like the issue in the treemix group and the question in stackoverflow.
What should I do next? Is it better to re-install gcc or g++ through homebrew?
$ ./configure --prefix=/usr/local CPPFLAGS=-l/usr/local/include LDFLAGS=-L/usr/local/lib CC=g++
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/Users/kfdas/Downloads/treemix-1.13':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
Then see 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 TreeMix configure 1.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/usr/local CPPFLAGS=-l/usr/local/include LDFLAGS=-L/usr/local/lib CC=g++
## --------- ##
## Platform. ##
## --------- ##
hostname = kfdas.local
uname -m = x86_64
uname -r = 16.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 331 tasks, 1461 threads, 4 processors
Load average: 1.18, Mach factor: 2.81
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Users/kfdas/anaconda/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Users/kfdas/.cabal/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /usr/local/bin
PATH: /Users/kfdas/opt/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/X11/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1957: checking for g++
configure:1973: found /usr/bin/g++
configure:1984: result: g++
configure:2011: checking for C++ compiler version
configure:2020: g++ --version >&5
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
configure:2031: $? = 0
configure:2020: g++ -v >&5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:2031: $? = 0
configure:2020: g++ -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:2031: $? = 1
configure:2020: g++ -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:2031: $? = 1
configure:2051: checking whether the C++ compiler works
configure:2073: g++ -l/usr/local/include -L/usr/local/lib conftest.cpp >&5
ld: library not found for -l/usr/local/include
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:2077: $? = 1
configure:2115: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "TreeMix"
| #define PACKAGE_TARNAME "treemix"
| #define PACKAGE_VERSION "1.13"
| #define PACKAGE_STRING "TreeMix 1.13"
| #define PACKAGE_BUGREPORT "joepickrell#gmail.com"
| #define PACKAGE_URL "http://treemix.googlecode.com/"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2120: error: in `/Users/kfdas/Downloads/treemix-1.13':
configure:2122: error: C++ compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=g++
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-Qunused-arguments
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-l/usr/local/include
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=set
ac_cv_env_LDFLAGS_value=-L/usr/local/lib
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=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_ac_ct_CXX=g++
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AM_BACKSLASH=''
AM_DEFAULT_V=''
AM_DEFAULT_VERBOSITY=''
AM_V=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
BOOST_CPPFLAGS=''
BOOST_LDFLAGS=''
CC='g++'
CCDEPMODE=''
CFLAGS='-Qunused-arguments'
CPPFLAGS='-l/usr/local/include'
CXX='g++'
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W=''
DEFS=''
DEPDIR=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EXEEXT=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
LDFLAGS='-L/usr/local/lib'
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO=''
MKDIR_P=''
OBJEXT=''
PACKAGE=''
PACKAGE_BUGREPORT='joepickrell#gmail.com'
PACKAGE_NAME='TreeMix'
PACKAGE_STRING='TreeMix 1.13'
PACKAGE_TARNAME='treemix'
PACKAGE_URL='http://treemix.googlecode.com/'
PACKAGE_VERSION='1.13'
PATH_SEPARATOR=':'
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION=''
ac_ct_CC=''
ac_ct_CXX='g++'
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot=''
am__nodep=''
am__quote=''
am__tar=''
am__untar=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "TreeMix"
#define PACKAGE_TARNAME "treemix"
#define PACKAGE_VERSION "1.13"
#define PACKAGE_STRING "TreeMix 1.13"
#define PACKAGE_BUGREPORT "joepickrell#gmail.com"
#define PACKAGE_URL "http://treemix.googlecode.com/"
configure: exit 77
I got the same result without CC=g++ option.
versions of g++ and gcc are
$ g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ brew info gsl
gsl: stable 2.3 (bottled)
Numerical library for C and C++
https://www.gnu.org/software/gsl/
/usr/local/Cellar/gsl/2.3 (273 files, 8.6MB) *
Poured from bottle on 2017-05-12 at 13:07:01
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gsl.rb

Compiling VNC Server Binary Files (for Android)

Hey folks I'm trying to compile a ELF binary server files from here: https://github.com/LibVNC/libvncserver
To do this I follow the steps here: ./configure --host=arm-eabi CC=arm-linux-androideabi-gcc (starting line 10 - 31). I set the NDK toolchains correctly and now I'm trying to run the $configure command.
I'm using a 14.04 Ubuntu Machine.
When I run the command:
$./configure --host=arm-eabi CC=arm-linux-androideabi-gcc
I get the following output:
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10#
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10# ./configure --host=arm-eabi CC=arm-linux-androideabi-gcc
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-eabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for arm-eabi-gcc... arm-linux-androideabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10':
configure: error: C compiler cannot create executables
See `config.log' for more details
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10#
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10#
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10#
and when I look at the config.log file I see this (can't find the problem :( ):
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by LibVNCServer configure 0.9.10, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --host=arm-eabi CC=arm-linux-androideabi-gcc
## --------- ##
## Platform. ##
## --------- ##
hostname = ip-172-31-35-74
uname -m = x86_64
uname -r = 3.13.0-48-generic
uname -s = Linux
uname -v = #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015
/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/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2612: checking for a BSD-compatible install
configure:2680: result: /usr/bin/install -c
configure:2691: checking whether build environment is sane
configure:2746: result: yes
configure:2805: checking for arm-eabi-strip
configure:2835: result: no
configure:2845: checking for strip
configure:2861: found /usr/bin/strip
configure:2872: result: strip
configure:2897: checking for a thread-safe mkdir -p
configure:2936: result: /bin/mkdir -p
configure:2943: checking for gawk
configure:2959: found /usr/bin/gawk
configure:2970: result: gawk
configure:2981: checking whether make sets $(MAKE)
configure:3003: result: yes
configure:3032: checking whether make supports nested variables
configure:3049: result: yes
configure:3185: checking whether make supports nested variables
configure:3202: result: yes
configure:3241: checking for arm-eabi-gcc
configure:3268: result: arm-linux-androideabi-gcc
configure:3537: checking for C compiler version
configure:3546: arm-linux-androideabi-gcc --version >&5
./configure: line 3548: arm-linux-androideabi-gcc: command not found
configure:3557: $? = 127
configure:3546: arm-linux-androideabi-gcc -v >&5
./configure: line 3548: arm-linux-androideabi-gcc: command not found
configure:3557: $? = 127
configure:3546: arm-linux-androideabi-gcc -V >&5
./configure: line 3548: arm-linux-androideabi-gcc: command not found
configure:3557: $? = 127
configure:3546: arm-linux-androideabi-gcc -qversion >&5
./configure: line 3548: arm-linux-androideabi-gcc: command not found
configure:3557: $? = 127
configure:3577: checking whether the C compiler works
configure:3599: arm-linux-androideabi-gcc conftest.c >&5
./configure: line 3601: arm-linux-androideabi-gcc: command not found
configure:3603: $? = 127
configure:3641: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "LibVNCServer"
| #define PACKAGE_TARNAME "libvncserver"
| #define PACKAGE_VERSION "0.9.10"
| #define PACKAGE_STRING "LibVNCServer 0.9.10"
| #define PACKAGE_BUGREPORT "https://github.com/LibVNC/libvncserver"
| #define PACKAGE_URL ""
| #define PACKAGE "libvncserver"
| #define VERSION "0.9.10"
| #define VERSION_MAJOR 0
| #define VERSION_MINOR 9
| #define VERSION_PATCHLEVEL 10
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3646: error: in `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10':
configure:3648: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CC_set=set
ac_cv_env_CC_value=arm-linux-androideabi-gcc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_GNUTLS_CFLAGS_set=
ac_cv_env_GNUTLS_CFLAGS_value=
ac_cv_env_GNUTLS_LIBS_set=
ac_cv_env_GNUTLS_LIBS_value=
ac_cv_env_GTK_CFLAGS_set=
ac_cv_env_GTK_CFLAGS_value=
ac_cv_env_GTK_LIBS_set=
ac_cv_env_GTK_LIBS_value=
ac_cv_env_JPEG_LDFLAGS_set=
ac_cv_env_JPEG_LDFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_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=arm-eabi
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=arm-linux-androideabi-gcc
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/missing aclocal-1.14'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
ANDROID_FALSE=''
ANDROID_TRUE=''
AR=''
AS=''
AUTOCONF='${SHELL} /home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/missing autoconf'
AUTOHEADER='${SHELL} /home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/missing autoheader'
AUTOMAKE='${SHELL} /home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/missing automake-1.14'
AWK='gawk'
CC='arm-linux-androideabi-gcc'
CCDEPMODE=''
CFLAGS=''
CONFIG_LIBVA_FALSE=''
CONFIG_LIBVA_TRUE=''
CPP=''
CPPFLAGS=''
CRYPT_LIBS=''
CYGIPC_FALSE=''
CYGIPC_TRUE=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GNUTLS_CFLAGS=''
GNUTLS_LIBS=''
GREP=''
GTK_CFLAGS=''
GTK_LIBS=''
HAVE_GNUTLS_FALSE=''
HAVE_GNUTLS_TRUE=''
HAVE_LIBGTK_FALSE=''
HAVE_LIBGTK_TRUE=''
HAVE_LIBJPEG_FALSE=''
HAVE_LIBJPEG_TRUE=''
HAVE_LIBPNG_FALSE=''
HAVE_LIBPNG_TRUE=''
HAVE_LIBPTHREAD_FALSE=''
HAVE_LIBPTHREAD_TRUE=''
HAVE_LIBSDL_FALSE=''
HAVE_LIBSDL_TRUE=''
HAVE_LIBSSL_FALSE=''
HAVE_LIBSSL_TRUE=''
HAVE_LIBZ_FALSE=''
HAVE_LIBZ_TRUE=''
HAVE_MP3LAME_FALSE=''
HAVE_MP3LAME_TRUE=''
HAVE_RPM_FALSE=''
HAVE_RPM_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
JPEG_LDFLAGS=''
LD=''
LDFLAGS=''
LIBGCRYPT_CFLAGS=''
LIBGCRYPT_CONFIG=''
LIBGCRYPT_LIBS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LINUX_FALSE=''
LINUX_TRUE=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/missing makeinfo'
MANIFEST_TOOL=''
MINGW_FALSE=''
MINGW_TRUE=''
MKDIR_P='/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OSX_FALSE=''
OSX_TRUE=''
OTOOL64=''
OTOOL=''
PACKAGE='libvncserver'
PACKAGE_BUGREPORT='https://github.com/LibVNC/libvncserver'
PACKAGE_NAME='LibVNCServer'
PACKAGE_STRING='LibVNCServer 0.9.10'
PACKAGE_TARNAME='libvncserver'
PACKAGE_URL=''
PACKAGE_VERSION='0.9.10'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
RANLIB=''
RPMSOURCEDIR=''
SDL_CFLAGS=''
SDL_LIBS=''
SED=''
SET_MAKE=''
SHELL='/bin/bash'
SSL_LIBS=''
STRIP='strip'
VA_LIBS=''
VERSION='0.9.10'
WITH_FFMPEG_FALSE=''
WITH_FFMPEG_TRUE=''
WITH_TIGHTVNC_FILETRANSFER_FALSE=''
WITH_TIGHTVNC_FILETRANSFER_TRUE=''
WITH_WEBSOCKETS_FALSE=''
WITH_WEBSOCKETS_TRUE=''
WSOCKLIB=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='arm-eabi'
host_alias='arm-eabi'
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/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}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
with_ffmpeg=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "LibVNCServer"
#define PACKAGE_TARNAME "libvncserver"
#define PACKAGE_VERSION "0.9.10"
#define PACKAGE_STRING "LibVNCServer 0.9.10"
#define PACKAGE_BUGREPORT "https://github.com/LibVNC/libvncserver"
#define PACKAGE_URL ""
#define PACKAGE "libvncserver"
#define VERSION "0.9.10"
#define VERSION_MAJOR 0
#define VERSION_MINOR 9
#define VERSION_PATCHLEVEL 10
configure: exit 77
./configure: line 3548: arm-linux-androideabi-gcc: command not found
You need to specify full path to gcc or add its location to path
Solved! The solution is providing the full pass to the gcc ... for some reason despite running echo $PATH or echo $CC it showed it there but was giving me an error as if the compiler couldn't be found when I executed the $configure command. Was solved by simply providing the full directory to the gcc when running the $configure command.

static compilation of proftpd on AIX

I'd like to compile proftpd on AIX to make it deployable on other server without having to reinstall all gnu lib library on each server.
I already manage to compile it dynamicaly, but I can't manage to get it compile with the option
LDFLAG="-Wl,-static"
like advise in the official proftpd documentation.
here the config.log error I get
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.61. Invocation command line was
$ ./configure LDFLAGS=-Wl,-static --with-modules=mod_tls:mod_sql:mod_sql_mysql:mod_sql_passwd:mod_sftp:mod_sftp_sql --without-getopt --enable-openssl --with-includes=/opt/freeware/include:/opt/freeware/include/mysql/mysql/:/home/poney2/src_proftpd/libmath_header/ --with-libraries=/opt/freeware/lib:/opt/freeware/lib/mysql/mysql/:/home/poney2/src_proftpd/libmath_lib --prefix=/home/poney/proftpd_bin --exec-prefix=/home/poney/proftpd_bin/proftpd
## --------- ##
## Platform. ##
## --------- ##
hostname = serverName
uname -m = 00C876004C00
uname -r = 1
uname -s = AIX
uname -v = 6
/usr/bin/uname -p = powerpc
/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 = 6.1.0.0
/bin/universe = unknown
PATH: /usr/bin
PATH: /etc
PATH: /usr/sbin
PATH: /usr/ucb
PATH: /home/poney/bin
PATH: /usr/bin/X11
PATH: /sbin
PATH: .
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2122: checking build system type
configure:2140: result: powerpc-ibm-aix6.1.0.0
configure:2162: checking host system type
configure:2177: result: powerpc-ibm-aix6.1.0.0
configure:2199: checking target system type
configure:2214: result: powerpc-ibm-aix6.1.0.0
configure:2346: checking for gcc
configure:2362: found /usr/bin/gcc
configure:2373: result: gcc
configure:2611: checking for C compiler version
configure:2618: gcc --version >&5
gcc (GCC) 4.4.6
Copyright (C) 2010 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:2621: $? = 0
configure:2628: gcc -v >&5
Using built-in specs.
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../gcc-4.4.6/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --host=powerpc-ibm-aix6.1.0.0
Thread model: aix
gcc version 4.4.6 (GCC)
configure:2631: $? = 0
configure:2638: gcc -V >&5
gcc: '-V' option must have argument
configure:2641: $? = 1
configure:2664: checking for C compiler default output file name
configure:2691: gcc -Wl,-static conftest.c >&5
ld: 0706-012 The -t flag is not recognized.
ld: 0706-012 The -a flag is not recognized.
ld: 0706-012 The -t flag is not recognized.
ld: 0706-027 The -i flag is ignored.
ld: 0706-012 The -c flag is not recognized.
collect2: ld returned 255 exit status
configure:2694: $? = 1
configure:2732: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PR_BUILD_OPTS " 'LDFLAGS=-Wl,-static' '--with-modules=mod_tls:mod_sql:mod_sql_mysql:mod_sql_passwd:mod_sftp:mod_sftp_sql' '--without-getopt' '--enable-openssl' '--with-includes=/opt/freeware/include:/opt/freeware/include/mysql/mysql/:/home/poney2/src_proftpd/libmath_header/' '--with-libraries=/opt/freeware/lib:/opt/freeware/lib/mysql/mysql/:/home/poney2/src_proftpd/libmath_lib' '--prefix=/home/poney/proftpd_bin' '--exec-prefix=/home/poney/proftpd_bin/proftpd'"
| #define PR_PLATFORM "AIX6 (AIX6_1_0_0)"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2738: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=powerpc-ibm-aix6.1.0.0
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_CPP_set=''
ac_cv_env_CPP_value=''
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-Wl,-static
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=''
ac_cv_env_host_alias_value=''
ac_cv_env_target_alias_set=''
ac_cv_env_target_alias_value=''
ac_cv_host=powerpc-ibm-aix6.1.0.0
ac_cv_prog_ac_ct_CC=gcc
ac_cv_target=powerpc-ibm-aix6.1.0.0
## ----------------- ##
## Output variables. ##
## ----------------- ##
ADDL_CPPFLAGS=''
ADDL_DIRS=''
ALLOCA=''
AR=''
ARGZ_H=''
BINDIR=''
BUILD_SHARED_MODULE_OBJS=''
BUILD_STATIC_MODULE_ARCHIVES=''
BUILD_STATIC_MODULE_OBJS=''
CC='gcc'
CFLAGS=''
CONFIG_SHELL='/bin/sh'
CPP=''
CPPFLAGS=''
CURSES_LIBS=''
DATADIR=''
DEFS=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='ECHO_N=''
ECHO_T=''
EGREP=''
ENABLE_NLS=''
ENABLE_TESTS=''
EXEEXT=''
FGREP=''
GLUE_MODULE_OBJS=''
GREP=''
INCLTDL=''
INCLUDEDIR=''
INCLUDES=''
INSTALL_DATA=''
INSTALL_DEPS=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP=''
LD=''
LDFLAGS='-Wl,-static'
LIBADD_DL=''
LIBADD_DLD_LINK=''
LIBADD_DLOPEN=''
LIBADD_SHL_LOAD=''
LIBDIRS=''
LIBEXECDIR=''
LIBLTDL=''
LIBOBJS=''
LIBRARIES=''
LIBS=''
LIBTOOL=''
LIBTOOL_DEPS=''
LIB_DEPS=''
LIB_OBJS=''
LIPO=''
LN_S=''
LOCALSTATEDIR=''
LTDLDEPS=''
LTDLINCL=''
LTDLOPEN=''
LTLIBOBJS=''
LT_CONFIG_H=''
LT_DLLOADERS=''
LT_DLPREOPEN=''
MAIN_LDFLAGS=''
MAIN_LIBS=''
MODULE_DEPS=''
MODULE_LDFLAGS=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OSREL='-DAIX6_1_0_0'
OSTYPE='-DAIX6'
OTOOL64=''
OTOOL=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PREFIX=''
RANLIB=''
SBINDIR=''
SED=''
SET_MAKE=''
SHARED_MODULE_DIRS=''
SHARED_MODULE_LIBS=''
SHARED_MODULE_OBJS=''
SHELL='/bin/sh'
STATIC_MODULE_DIRS=''
STATIC_MODULE_OBJS=''
STRIP=''
SYSCONFDIR=''
UTILS_LIBS=''
VERSION=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
bindir='${exec_prefix}/bin'
build='powerpc-ibm-aix6.1.0.0'
build_alias=''
build_cpu='powerpc'
build_os='aix6.1.0.0'
build_vendor='ibm'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='/home/poney/proftpd_bin/proftpd'
host='powerpc-ibm-aix6.1.0.0'
host_alias=''
host_cpu='powerpc'
host_os='aix6.1.0.0'
host_vendor='ibm'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_group=''
install_user=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='print -r'
ltdl_LIBOBJS=''
ltdl_LTLIBOBJS=''
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
pkgconfigdir=''
prefix='/home/poney/proftpd_bin'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
subdirs=''
sys_symbol_underscore=''
sysconfdir='${prefix}/etc'
target='powerpc-ibm-aix6.1.0.0'
target_alias=''
target_cpu='powerpc'
target_os='aix6.1.0.0'
target_vendor='ibm'
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PR_BUILD_OPTS " 'LDFLAGS=-Wl,-static' '--with-modules=mod_tls:mod_sql:mod_sql_mysql:mod_sql_passwd:mod_sftp:mod_sftp_sql' '--without-getopt' '--enable-openssl' '--with-includes=/opt/freeware/include:/opt/freeware/include/mysql/mysql/:/home/poney2/src_proftpd/libmath_header/' '--with-libraries=/opt/freeware/lib:/opt/freeware/lib/mysql/mysql/:/home/poney2/src_proftpd/libmath_lib' '--prefix=/home/poney/proftpd_bin' '--exec-prefix=/home/poney/proftpd_bin/proftpd'"
#define PR_PLATFORM "AIX6 (AIX6_1_0_0)"
PS: I already try -Bstatic -all-static and -static flags but they are ignored.
Possible answer
Part of solution for me is modyfing the libpath to add a folder to this where I will put all the lib to pack it as a tar file and deploy the proftpd installation folder with the lib inside, it's not clean but it does work:
LDFLAGS="-Wl,-blibpath:/a/new/lib/path"
I do not validate my answer as it's not the real answer but that could help some of you.
PS: Please take into account that this is working with IBM XL C Compiler and should work on GCC as well
The output of the configure script shows:
configure:2691: gcc -Wl,-static conftest.c >&5
ld: 0706-012 The -t flag is not recognized.
ld: 0706-012 The -a flag is not recognized.
ld: 0706-012 The -t flag is not recognized.
ld: 0706-027 The -i flag is ignored.
ld: 0706-012 The -c flag is not recognized.
collect2: ld returned 255 exit status
This indicates that the -Wl option is successfully passing the option to ld, but ld does not recognize the option. As you're using AIX ld, it requires using -dn along with -bsvr4 with the link line, so, for example the flags option should read -Wl,-bsvr4 -Wl,-dn.
There is a note at the end of the man page for ld on AIX which states that:
The application can also have to be linked again whenever an updated release of the operating system is installed. Any application that is statically linked is not binary portable from any fix or release level to any other fix or release level.
Depending on the complexity of the final link line for proftpd, you can use the options -bstatic and -bdynamic to prompt the loading of static libraries for specific items; so in my case my final link line looked like:
gcc -o proftpd <lots of .o files> -L/home/user/Development/experiments/proftpd-1.3.4d/lib -lsupp -lcrypt -ldl -L/home/user/Development/experiments/proftpd-1.3.4d/lib/libcap -lcap -lpam
Now in this case, it means that it depends on libcrypt, which isn't a default shipped library, so I rejig the link line so that it has the -lcrypt wrapped:
-Wl,-bstatic -lcrypt -Wl,-bdynamic
and now it links with the static version of the crypt library, and no longer mentions it as part of the run-time link dependencies.
As an addenda to this, you should only static link the libraries that aren't shipped by default on the OS in question, and I note that proftpd supports dynamically loading modules, which means that you should only statically link the required modules.
In general, though, if you're building to deploy on another system, I would advise creating static-only copies of the dependent libraries that you're using and explicitly pass them into the configure options. This keeps the build environment clean from the run-time environment.
Can you try using only "-static" instead of "-Wl,-static"?