Ошибка при компиляции FFTW = configure: ошибка: компилятор C не может создать исполняемые файлы
Я пытаюсь скомпилировать FFTW, используя следующие инструкции:
Download FFTW from http://www.fftw.org/download.html
Unzip and navigate to the appropriate folder.
In order to have a universal (32 + 64bit binary), you will build FFTW four
separate times (twice for 32 vs. 64 and twice for float vs. double precision)
and then combine the 32 and 64bit libraries into two fat/universal libraries.
In Terminal, type:
./configure CFLAGS="arch i686"
make
./configure --enable-float CFLAGS="arch i686"
make
mkdir .libs/32
cp libfftw3.a 32/libfftw3.a
cp libfftw3f.a 32/libfftw3f.a
./configure CFLAGS="arch x86_64"
make
./configure --enable-float CFLAGS="arch x86_64"
make
sudo make install
mkdir .libs/64
lipo -create .libs/32/libfftw3.a .libs/64/libfftw3.a -output libfftw3.a
lipo -create .libs/32/libfftw3f.a .libs/64/libfftw3f.a -output libfftw3f.a
cp libfftw3.a /usr/local/lib/libfftw3.a
cp libfftw3f.a /usr/local/lib/libfftw3f.a
To test if the created libraries at fat, type: lipo -info libraryname.a
Однако, когда я пытаюсь ввести первую команду терминала (./configure), я получаю следующую ошибку:
configure: error: C compiler cannot create executables
Я впервые пытаюсь что-то скомпилировать, поэтому любая помощь, касающаяся конкретной ошибки или даже просто ресурсов для меня, чтобы понять команды терминала и компиляцию в целом, была бы очень признательна! Я действительно хочу изучить этот материал, но я даже не могу понять, КАК эффективно его изучить! Заранее спасибо!
Вот файл 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 fftw configure 3.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure CFLAGS=arch i686
## --------- ##
## Platform. ##
## --------- ##
hostname = Davids-Macbook-Pro.local
uname -m = x86_64
uname -r = 12.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~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 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3
Primary memory available: 8.00 gigabytes
Default processor set: 127 tasks, 865 threads, 4 processors
Load average: 2.04, Mach factor: 2.13
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Users/David/Library/Enthought/Canopy_64bit/User/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/local/git/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2742: checking for a BSD-compatible install
configure:2810: result: /usr/bin/install -c
configure:2821: checking whether build environment is sane
configure:2871: result: yes
configure:3012: checking for a thread-safe mkdir -p
configure:3051: result: ./install-sh -c -d
configure:3064: checking for gawk
configure:3094: result: no
configure:3064: checking for mawk
configure:3094: result: no
configure:3064: checking for nawk
configure:3094: result: no
configure:3064: checking for awk
configure:3080: found /usr/bin/awk
configure:3091: result: awk
configure:3102: checking whether make sets $(MAKE)
configure:3124: result: yes
configure:3208: checking whether to enable maintainer-specific portions of Makefiles
configure:3217: result: no
configure:3265: checking build system type
configure:3279: result: x86_64-apple-darwin12.5.0
configure:3299: checking host system type
configure:3312: result: x86_64-apple-darwin12.5.0
configure:3750: checking for gcc
configure:3766: found /usr/bin/gcc
configure:3777: result: gcc
configure:4006: checking for C compiler version
configure:4015: gcc --version >&5
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
configure:4026: $? = 0
configure:4015: gcc -v >&5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
configure:4026: $? = 0
configure:4015: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:4026: $? = 1
configure:4015: gcc -qversion >&5
clang: error: no input files
configure:4026: $? = 1
configure:4046: checking whether the C compiler works
configure:4068: gcc arch i686 conftest.c >&5
clang: error: no such file or directory: 'arch'
clang: error: no such file or directory: 'i686'
configure:4072: $? = 1
configure:4110: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "fftw"
| #define PACKAGE_TARNAME "fftw"
| #define PACKAGE_VERSION "3.3.3"
| #define PACKAGE_STRING "fftw 3.3.3"
| #define PACKAGE_BUGREPORT "fftw@fftw.org"
| #define PACKAGE_URL ""
| #define PACKAGE "fftw"
| #define VERSION "3.3.3"
| #define FFTW_ENABLE_ALLOCA 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4115: error: in `/Users/David/documents/ISSE Source/fftw-3.3.3':
configure:4117: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-apple-darwin12.5.0
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='arch i686'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_MPICC_set=
ac_cv_env_MPICC_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-apple-darwin12.5.0
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} "/Users/David/documents/ISSE Source/fftw-3.3.3/missing" --run aclocal-1.11'
ALLOCA=''
ALTIVEC_CFLAGS=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AR=''
AS=''
AUTOCONF='${SHELL} "/Users/David/documents/ISSE Source/fftw-3.3.3/missing" --run autoconf'
AUTOHEADER='${SHELL} "/Users/David/documents/ISSE Source/fftw-3.3.3/missing" --run autoheader'
AUTOMAKE='${SHELL} "/Users/David/documents/ISSE Source/fftw-3.3.3/missing" --run automake-1.11'
AVX_CFLAGS=''
AWK='awk'
CC='gcc'
CCDEPMODE=''
CFLAGS='arch i686'
CHECK_PL_OPTS=''
COMBINED_THREADS_FALSE=''
COMBINED_THREADS_TRUE=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
C_FFTW_R2R_KIND=''
C_MPI_FINT=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
FGREP=''
FLIBS=''
GREP=''
HAVE_ALTIVEC_FALSE=''
HAVE_ALTIVEC_TRUE='#'
HAVE_AVX_FALSE=''
HAVE_AVX_TRUE='#'
HAVE_NEON_FALSE=''
HAVE_NEON_TRUE='#'
HAVE_SSE2_FALSE=''
HAVE_SSE2_TRUE='#'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LDOUBLE_FALSE=''
LDOUBLE_TRUE='#'
LIBOBJS=''
LIBQUADMATH=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} "/Users/David/documents/ISSE Source/fftw-3.3.3/missing" --run makeinfo'
MANIFEST_TOOL=''
MKDIR_P='./install-sh -c -d'
MPICC=''
MPILIBS=''
MPIRUN=''
MPI_FALSE=''
MPI_TRUE=''
NEON_CFLAGS=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OCAMLBUILD=''
OPENMP_CFLAGS=''
OPENMP_FALSE=''
OPENMP_TRUE=''
OTOOL64=''
OTOOL=''
PACKAGE='fftw'
PACKAGE_BUGREPORT='fftw@fftw.org'
PACKAGE_NAME='fftw'
PACKAGE_STRING='fftw 3.3.3'
PACKAGE_TARNAME='fftw'
PACKAGE_URL=''
PACKAGE_VERSION='3.3.3'
PATH_SEPARATOR=':'
POW_LIB=''
PRECISION='d'
PREC_SUFFIX=''
PTHREAD_CC=''
PTHREAD_CFLAGS=''
PTHREAD_LIBS=''
QUAD_FALSE=''
QUAD_TRUE='#'
RANLIB=''
SED=''
SET_MAKE=''
SHARED_VERSION_INFO='6:2:3'
SHELL='/bin/sh'
SINGLE_FALSE=''
SINGLE_TRUE='#'
SMP_FALSE=''
SMP_TRUE=''
SSE2_CFLAGS=''
STACK_ALIGN_CFLAGS=''
STRIP=''
THREADLIBS=''
THREADS_FALSE=''
THREADS_TRUE=''
VERSION='3.3.3'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
ac_ct_F77=''
acx_pthread_config=''
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='x86_64-apple-darwin12.5.0'
build_alias=''
build_cpu='x86_64'
build_os='darwin12.5.0'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-apple-darwin12.5.0'
host_alias=''
host_cpu='x86_64'
host_os='darwin12.5.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} '\''/Users/David/documents/ISSE Source/fftw-3.3.3/install-sh'\'''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(top_builddir)/./install-sh -c -d'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "fftw"
#define PACKAGE_TARNAME "fftw"
#define PACKAGE_VERSION "3.3.3"
#define PACKAGE_STRING "fftw 3.3.3"
#define PACKAGE_BUGREPORT "fftw@fftw.org"
#define PACKAGE_URL ""
#define PACKAGE "fftw"
#define VERSION "3.3.3"
#define FFTW_ENABLE_ALLOCA 1
configure: exit 77
1 ответ
Я не знаю, где вы получаете документацию, которую вы разместили в своем вопросе, но она содержит опечатку. В частности, CFLAGS
переменная неверна в каждом ./configure
линия. Они должны быть
./configure CFLAGS="-arch i686"
./configure --enable-float CFLAGS="-arch i686"
./configure --enable-float CFLAGS="-arch x86_64"
-
отсутствует в документации и причинах gcc
потерпеть неудачу, так как не понимает вариантов arch
а также i686
отдельно, при первом запуске.
Просто заметьте, если вам не нужен универсальный двоичный файл FFTW, команды для его установки просто
$ ./configure
$ make
$ sudo make install