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"?
Related
I'm learning to use the FLTK in Bjarne's Stroustrup's Programming Principles and Practice. However, I'm stuck trying to install fltk-1.1.10 on my macOS (Monterrey 12.4).
When I run the make command, I get this error:
Makefile:28: makeinclude: No such file or directory
if test -f config.status; then \
./config.status --recheck; \
./config.status; \
else \
./configure; \
fi
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.
make: *** [makeinclude] Error 77
Here's the output of the 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 configure, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = Tims-Air
uname -m = x86_64
uname -r = 21.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/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 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
2 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: 512 tasks, 2908 threads, 4 processors
Load average: 3.57, Mach factor: 1.15
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/mysql/bin
PATH: /usr/local/opt/sqlite/bin
PATH: /usr/local/bin
PATH: /Library/Frameworks/Python.framework/Versions/3.8/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/mysql/bin
PATH: /usr/local/opt/sqlite/bin
PATH: /Library/Frameworks/Python.framework/Versions/3.8/bin
PATH: /Users/akojitimothy/Desktop/chromedriver
PATH: /Users/akojitimothy/Desktop/chromedriver
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2125: checking for gcc
configure:2141: found /usr/bin/gcc
configure:2152: result: gcc
configure:2390: checking for C compiler version
configure:2397: gcc --version >&5
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
configure:2400: $? = 0
configure:2407: gcc -v >&5
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
configure:2410: $? = 0
configure:2417: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:2420: $? = 1
configure:2443: checking for C compiler default output file name
configure:2470: gcc -arch i386 -arch i386 conftest.c >&5
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libSystem.tbd (3 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:2473: $? = 1
configure:2511: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define __APPLE_QD__ 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2518: 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_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value=c++
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_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_CC=gcc
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR=''
ARCHFLAGS=''
AUDIOLIBS=''
CAT1EXT=''
CAT3EXT=''
CAT6EXT=''
CC='gcc'
CFLAGS=' -arch i386'
CPP=''
CPPFLAGS=''
CXX='c++'
CXXFLAGS=' -arch i386'
DEFS=''
DSOCOMMAND='echo'
DSOFLAGS=''
DSOLINK=''
DSONAME=''
ECHO_C='ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
FLDSONAME=''
FLLIBBASENAME='libfltk_forms.a'
FLLIBNAME='../lib/libfltk_forms.a'
FLUID='fluid'
FL_API_VERSION='1.1'
FL_MAJOR_VERSION='1'
FL_MINOR_VERSION='1'
FL_PATCH_VERSION='10'
FTCONFIG=''
GLDEMOS='gldemos'
GLDSONAME=''
GLLIB=''
GLLIBBASENAME='libfltk_gl.a'
GLLIBNAME='../lib/libfltk_gl.a'
GREP=''
GROFF=''
HLINKS=''
HTMLDOC=''
IMAGELIBS=''
IMGDSONAME=''
IMGLIBBASENAME='libfltk_images.a'
IMGLIBNAME='../lib/libfltk_images.a'
INSTALL_DATA=''
INSTALL_DESKTOP=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
JPEG=''
JPEGINC=''
LARGEFILE=''
LDFLAGS=' -arch i386'
LIBBASENAME='libfltk.a'
LIBCOMMAND=''
LIBEXT='.a'
LIBNAME='../lib/libfltk.a'
LIBOBJS=''
LIBS=''
LINKFLTK='../lib/libfltk.a'
LINKFLTKFORMS='../lib/libfltk_forms.a'
LINKFLTKGL='../lib/libfltk_gl.a'
LINKFLTKIMG='../lib/libfltk_images.a'
LINKSHARED='../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a'
LTLIBOBJS=''
MAKEDEPEND=''
NROFF=''
OBJEXT=''
OPTIM=''
OSX_ONLY=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PNG=''
PNGINC=''
POSTBUILD=''
PTHREAD_FLAGS=''
RANLIB=''
SHAREDSUFFIX=''
SHELL='/bin/sh'
STATICIMAGELIBS=''
THREADS=''
UNINSTALL_DESKTOP=''
XMKMF=''
XPROP=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ZLIB=''
ZLIBINC=''
ac_ct_CC='gcc'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
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'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define __APPLE_QD__ 1
configure: exit 77
I've tried reading through it but I can't understand what the issue might be. I've verified that I have both gcc and g++ compilers on my computer and I've tried setting the CXX environment variable before running make but I still get the same error.
What are the steps I need to follow to compile the source code and install the toolkit? I'm currently using VSCode and I'm using the run extension for compiling C++ programs. Here's my c_cpp_properties.json file:
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/usr/local/include",
"/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1",
"/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include",
"/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include",
"/Library/Developer/CommandLineTools/usr/include",
"/Users/akojitimothy/Documents/C++ Projects/Programming Principles Exercises/"
],
"defines": [],
"macFrameworkPath": [],
"compilerPath": "/usr/local/bin/gcc-10",
"cStandard": "gnu17",
"intelliSenseMode": "macos-gcc-x64"
}
],
"version": 4
}
and my launch.json file:
{
"configurations": [
{
"name": "C/C++: clang++ build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "C/C++: clang++ build active file"
}
],
"version": "2.0.0"
}
I apologize if this is too much info but I don't understand what might be causing the errors I'm currently getting.
Any help would be much appreciated. Thank you.
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.
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
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.
I'm trying to use MSYS to create the MinGW SDL libraries from the latest SDL 2.0 Mercurial repository. (As of this posting.) I'm following this tutorial, and when I need to configure using MSYS I enter
$ ./configure --prefix=/mingw --enable-stdio-redirect=no
into MSYS. It sputters out the following:
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
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.
I'm using gcc version 2.95 (According to "gcc -v"), the latest MSYS/MSYS-dtk, and the latest SDL 2.0 Mercurial sources. Does anyone know why MSYS might be giving me this error, or has anybody successfully built MinGW binaries from the current SDL 2.0 sources?
EDIT: Here's the config.log file generated by ./config:
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 --prefix=/mingw --enable-stdio-redirect=no
## --------- ##
## Platform. ##
## --------- ##
hostname = NFLODUDE
uname -m = i686
uname -r = 1.0.10(0.46/3/2)
uname -s = MINGW32_NT-6.1
uname -v = 2004-03-15 07:17
/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: .
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /c/Python25/
PATH: /c/Program Files/Common Files/Microsoft Shared/Windows Live
PATH: /c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live
PATH: /c/Program Files (x86)/Microsoft DirectX SDK (August 2007)/Utilities/Bin/x86
PATH: /c/Perl/site/bin
PATH: /c/Perl/bin
PATH: /c/Windows/system32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /c/Program Files/Dell/Dell Wireless WLAN Card
PATH: /c/Program Files (x86)/OpenLibraries/bin
PATH: /c/Program Files/Trend Micro/AMSP
PATH: /c/Program Files (x86)/MySQL/MySQL Server 5.5/bin
PATH: /c/Program Files (x86)/Java/jdk1.6.0_23/bin
PATH: /c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0/
PATH: /c/Program Files/MySQL/MySQL Server 5.5/bin
PATH: /c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/
PATH: /c/Program Files/Microsoft SQL Server/100/Tools/Binn/
PATH: /c/Program Files/Microsoft SQL Server/100/DTS/Binn/
PATH: /c/Program Files (x86)/Java/jdk1.6.0_23/bin
PATH: /c/perl_op/bin
PATH: /c/Program Files (x86)/gtk2/bin
PATH: /c/Program Files (x86)/mlt/bin
PATH: /c/Program Files (x86)/OpenLibraries/bin
PATH: /c/Windows/SysWOW64
PATH: /c/Program Files (x86)/Windows Live/Shared
PATH: /c/Program Files (x86)/GtkSharp/2.12/bin
PATH: .
PATH: /c/Program Files (x86)/QuickTime/QTSystem/
PATH: /c/Program Files (x86)/Google/google_appengine
PATH: /c/Free Pascal Compiler/2.4.4/bin/i386-Win32
PATH: /c/Program Files (x86)/Heroku
PATH: /c/Program Files (x86)/git/bin
PATH: /c/Program Files (x86)/git/cmd
PATH: /c/PHP/
PATH: /c/PHP/ext
PATH: /c/Program Files (x86)/CMake 2.8/bin
PATH: /c/Users/Owner/Documents/Code Projects/Java Projects/LWJGL/lwjgl-2.8.3/native/windows
PATH: /c/Program Files/TortoiseGit/bin
PATH: /c/Program Files/TortoiseHg/
PATH: /c/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Bin
PATH: /c/Ruby193/bin
PATH: /c/Program Files (x86)/Java/jdk1.6.0_23/bin
PATH: /c/Program Files (x86)/g95/bin
PATH: /c/MinGW/bin
PATH: /c/Program Files (x86)/Nmap
PATH: /c/GNUstep/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2098: WARNING: Libtool does not cope well with whitespace in `pwd`
configure:2127: checking build system type
configure:2145: result: i686-pc-mingw32
configure:2167: checking host system type
configure:2182: result: i686-pc-mingw32
configure:2252: checking for gcc
configure:2268: found /c/Free Pascal Compiler/2.4.4/bin/i386-Win32/gcc
configure:2279: result: gcc
configure:2517: checking for C compiler version
configure:2524: gcc --version >&5
2.95
configure:2527: $? = 0
configure:2534: gcc -v >&5
Using builtin specs.
gcc version 2.95 19990728 (release)
configure:2537: $? = 0
configure:2544: gcc -V >&5
gcc.exe: argument to `-V' is missing
configure:2547: $? = 1
configure:2570: checking for C compiler default output file name
configure:2597: gcc conftest.c >&5
Usage: cpp [switches] input output
Switches:
-include <file> Include the contents of <file> before other files
-imacros <file> Accept definition of marcos in <file>
-iprefix <path> Specify <path> as a prefix for next two options
-iwithprefix <dir> Add <dir> to the end of the system include paths
-iwithprefixbefore <dir> Add <dir> to the end of the main include paths
-isystem <dir> Add <dir> to the start of the system include paths
-idirafter <dir> Add <dir> to the end of the system include paths
-I <dir> Add <dir> to the end of the main include paths
-nostdinc Do not search the system include directories
-nostdinc++ Do not search the system include directories for C++
-o <file> Put output into <file>
-pedantic Issue all warnings demanded by strict ANSI C
-traditional Follow K&R pre-processor behaviour
-trigraphs Support ANSI C trigraphs
-lang-c Assume that the input sources are in C
-lang-c89 Assume that the input is C89; deprecated
-lang-c++ Assume that the input sources are in C++
-lang-objc Assume that the input sources are in ObjectiveC
-lang-objc++ Assume that the input sources are in ObjectiveC++
-lang-asm Assume that the input sources are in assembler
-lang-chill Assume that the input sources are in Chill
-std=<std name> Specify the conformance standard; one of:
gnu89, gnu9x, c89, c9x, iso9899:1990,
iso9899:199409, iso9899:199x
-+ Allow parsing of C++ style features
-w Inhibit warning messages
-Wtrigraphs Warn if trigraphs are encountered
-Wno-trigraphs Do not warn about trigraphs
-Wcomment{s} Warn if one comment starts inside another
-Wno-comment{s} Do not warn about comments
-Wtraditional Warn if a macro argument is/would be turned into
a string if -traditional is specified
-Wno-traditional Do not warn about stringification
-Wundef Warn if an undefined macro is used by #if
-Wno-undef Do not warn about testing undefined macros
-Wimport Warn about the use of the #import directive
-Wno-import Do not warn about the use of #import
-Werror Treat all warnings as errors
-Wno-error Do not treat warnings as errors
-Wall Enable all preprocessor warnings
-M Generate make dependencies
-MM As -M, but ignore system header files
-MD As -M, but put output in a .d file
-MMD As -MD, but ignore system header files
-MG Treat missing header file as generated files
-g Include #define and #undef directives in the output
-D<macro> Define a <macro> with string '1' as its value
-D<macro>=<val> Define a <macro> with <val> as its value
-A<question> (<answer>) Assert the <answer> to <question>
-U<macro> Undefine <macro>
-u or -undef Do not predefine any macros
-v Display the version number
-H Print the name of header files as they are used
-C Do not discard comments
-dM Display a list of macro definitions active at end
-dD Preserve macro definitions in output
-dN As -dD except that only the names are preserved
-dI Include #include directives in the output
-ifoutput Describe skipped code blocks in output
-P Do not generate #line directives
-$ Do not include '$' in identifiers
-remap Remap file names when including files.
-h or --help Display this information
cpp: Too many arguments
configure:2600: $? = 1
configure:2638: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2645: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i686-pc-mingw32
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_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_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=i686-pc-mingw32
ac_cv_prog_ac_ct_CC=gcc
## ----------------- ##
## Output variables. ##
## ----------------- ##
ALLOCA=''
ALSA_CFLAGS=''
ALSA_LIBS=''
AR=''
ARTSCONFIG=''
AS=''
BUILD_CFLAGS=''
BUILD_LDFLAGS=''
CC='gcc'
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXFLAGS=''
DEFS=''
DIRECTFBCONFIG=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_SHARED_FALSE=''
ENABLE_SHARED_TRUE=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
ESD_CFLAGS=''
ESD_CONFIG=''
ESD_LIBS=''
EXEEXT=''
EXTRA_CFLAGS=''
EXTRA_LDFLAGS=''
FGREP=''
GREP=''
INCLUDE=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_AGE=''
LT_CURRENT=''
LT_RELEASE=''
LT_REVISION=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJECTS=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PKG_CONFIG=''
POW_LIB=''
RANLIB=''
SDLMAIN_OBJECTS=''
SDL_BINARY_AGE='0'
SDL_CFLAGS=''
SDL_INTERFACE_AGE='0'
SDL_LIBS=''
SDL_MAJOR_VERSION='2'
SDL_MICRO_VERSION='0'
SDL_MINOR_VERSION='0'
SDL_RLD_FLAGS=''
SDL_STATIC_LIBS=''
SDL_VERSION='2.0.0'
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION_OBJECTS=''
WINDRES=''
XMKMF=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_aux_dir='build-scripts'
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
bindir='${exec_prefix}/bin'
build='i686-pc-mingw32'
build_alias=''
build_cpu='i686'
build_os='mingw32'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-mingw32'
host_alias=''
host_cpu='i686'
host_os='mingw32'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='echo'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/mingw'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define _GNU_SOURCE 1
configure: exit 77
I really don't know what to make of config.log, though...
Short answer: your gcc is not ready, needs some dependencies.
Long answer, troubleshooting guide:
Create a simple C file, like this:
main() {}
Try to run:
gcc simple.c
You should get the same message, about creating executables. Now make a verbose gcc call, adding -v switch. You should now know what is the command it cannot run. Maybe it is as? Maybe you need binutils? Maybe you need some library.