我正在尝试从 Sid/Jessie 为我的 Debian Wheezy 安装创建一个 gcc-defaults-1.133 向后移植。由于这需要 dpkg-dev 版本高于 1.17.11,因此我认为我也需要向后移植它。
所以我抓住 dsc 并进入我的 dpkg-1.17.21~bpo70 文件夹。我添加了一些依赖项,然后是:
$ dch --local ~bpo70+ --distribution wheezy-backports "rebuild for wheezy backports"
$ fakeroot debian/rules binary
fakeroot 命令返回:
dh_testdir
install -d build-tree
cd build-tree && ../configure --build=i486-linux-gnu --with-selinux --disable-silent-rules \
CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers" CPPFLAGS="-D_FORTIFY_SOURCE=2" CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers" FCFLAGS="-g -O2 -fstack-protector-strong" FFLAGS="-g -O2 -fstack-protector-strong" GCJFLAGS="-g -O2 -fstack-protector-strong" LDFLAGS="-Wl,-z,relro" OBJCFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" OBJCXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" \
--prefix=/usr \
--mandir=\${datadir}/man \
--infodir=\${datadir}/info \
--sysconfdir=/etc \
--sbindir=/sbin \
--localstatedir=/var \
--with-zlib \
--with-liblzma \
--with-bz2
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/rutherford/python3.4-3.4.1/gcc-defaults-1.133/dpkg-1.17.21~bpo70+2/build-tree':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [build-tree/config.status] Error 77
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 dpkg configure 1.17.21, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ../configure --build=i486-linux-gnu --with-selinux --disable-silent-rules CFLAGS=-g -O2 -fstack-pro
tector-strong -Wformat -Werror=format-security -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-i
nitializers CPPFLAGS=-D_FORTIFY_SOURCE=2 CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=form
at-security -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers FCFLAGS=-g -O2 -fstack-
protector-strong FFLAGS=-g -O2 -fstack-protector-strong GCJFLAGS=-g -O2 -fstack-protector-strong LDFLAG
S=-Wl,-z,relro OBJCFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security OBJCXXFLAGS=-
g -O2 -fstack-protector-strong -Wformat -Werror=format-security --prefix=/usr --mandir=${datadir}/man -
-infodir=${datadir}/info --sysconfdir=/etc --sbindir=/sbin --localstatedir=/var --with-zlib --with-libl
zma --with-bz2
## --------- ##
## Platform. ##
## --------- ##
hostname = myhost
uname -m = i686
uname -r = 3.2.0-4-686-pae
uname -s = Linux
uname -v = #1 SMP Debian 3.2.60-1+deb7u3
/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: /home/rutherford/bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/games
PATH: /usr/games
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2883: checking for gcc
configure:2899: found /usr/bin/gcc
configure:2910: result: gcc
configure:3139: checking for C compiler version
configure:3148: gcc --version >&5
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 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:3159: $? = 0
configure:3148: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share
/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffi
x=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-incl
uded-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --ena
ble-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --en
able-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with
-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linu
x-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
configure:3159: $? = 0
configure:3148: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3159: $? = 4
configure:3148: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3159: $? = 4
configure:3179: checking whether the C compiler works
configure:3201: gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra -Wno
-unused-parameter -Wno-missing-field-initializers -D_FORTIFY_SOURCE=2 -Wl,-z,relro conftest.c >&5
gcc: error: unrecognized command line option '-fstack-protector-strong'
configure:3205: $? = 1
configure:3243: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "dpkg"
| #define PACKAGE_TARNAME "dpkg"
| #define PACKAGE_VERSION "1.17.21"
| #define PACKAGE_STRING "dpkg 1.17.21"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3248: error: in `/home/rutherford/python3.4-3.4.1/gcc-defaults-1.133/dpkg-1.17.21~bpo70+2/bui
ld-tree':
configure:3250: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_BZ2_LIBS_set=
ac_cv_env_BZ2_LIBS_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=set
ac_cv_env_CFLAGS_value='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra
-Wno-unused-parameter -Wno-missing-field-initializers'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-D_FORTIFY_SOURCE=2
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CURSES_LIBS_set=
ac_cv_env_CURSES_LIBS_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextr
a -Wno-unused-parameter -Wno-missing-field-initializers'
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-Wl,-z,relro
ac_cv_env_LIBLZMA_LIBS_set=
ac_cv_env_LIBLZMA_LIBS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PERL_LIBDIR_set=
ac_cv_env_PERL_LIBDIR_value=
ac_cv_env_PERL_set=
ac_cv_env_PERL_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_SELINUX_LIBS_set=
ac_cv_env_SELINUX_LIBS_value=
ac_cv_env_SSD_LIBS_set=
ac_cv_env_SSD_LIBS_value=
ac_cv_env_TAR_set=
ac_cv_env_TAR_value=
ac_cv_env_ZLIB_LIBS_set=
ac_cv_env_ZLIB_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=i486-linux-gnu
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. ##
## ----------------- ##
ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AM_BACKSLASH=''
AM_DEFAULT_V=''
AM_DEFAULT_VERBOSITY=''
AM_V=''
AR=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
BUILD_DSELECT_FALSE=''
BUILD_DSELECT_TRUE=''
BUILD_POD_DOC_FALSE=''
BUILD_POD_DOC_TRUE=''
BUILD_SHARED_FALSE=''
BUILD_SHARED_TRUE=''
BUILD_START_STOP_DAEMON_FALSE=''
BUILD_START_STOP_DAEMON_TRUE=''
BUILD_UPDATE_ALTERNATIVES_FALSE=''
BUILD_UPDATE_ALTERNATIVES_TRUE=''
BZ2_LIBS=''
CC='gcc'
CCDEPMODE=''
CFLAGS='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra -Wno-unused-para
meter -Wno-missing-field-initializers'
COVERAGE_ENABLED_FALSE=''
COVERAGE_ENABLED_TRUE=''
CPP=''
CPPFLAGS='-D_FORTIFY_SOURCE=2'
CURSES_LIBS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra -Wno-unused-pa
rameter -Wno-missing-field-initializers'
CYGPATH_W=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DOXYGEN=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GCOV=''
GETTEXT_MACRO_VERSION=''
GMSGFMT=''
GMSGFMT_015=''
GREP=''
HAVE_ALPHASORT_FALSE=''
HAVE_ALPHASORT_TRUE=''
HAVE_ASPRINTF_FALSE=''
HAVE_ASPRINTF_TRUE=''
HAVE_C99_SNPRINTF_FALSE=''
HAVE_C99_SNPRINTF_TRUE=''
HAVE_DOT=''
HAVE_GETOPT_FALSE=''
HAVE_GETOPT_LONG_FALSE=''
HAVE_GETOPT_LONG_TRUE=''
HAVE_GETOPT_TRUE=''
HAVE_LINKER_VERSION_SCRIPT_FALSE=''
HAVE_LINKER_VERSION_SCRIPT_TRUE=''
HAVE_OBSTACK_FREE_FALSE=''
HAVE_OBSTACK_FREE_TRUE=''
HAVE_SCANDIR_FALSE=''
HAVE_SCANDIR_TRUE=''
HAVE_SETEXECFILECON_FALSE=''
HAVE_SETEXECFILECON_TRUE=''
HAVE_STRERROR_FALSE=''
HAVE_STRERROR_TRUE=''
HAVE_STRNDUP_FALSE=''
HAVE_STRNDUP_TRUE=''
HAVE_STRNLEN_FALSE=''
HAVE_STRNLEN_TRUE=''
HAVE_STRSIGNAL_FALSE=''
HAVE_STRSIGNAL_TRUE=''
HAVE_SYS_ERRLIST_FALSE=''
HAVE_SYS_ERRLIST_TRUE=''
HAVE_UNSETENV_FALSE=''
HAVE_UNSETENV_TRUE=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
INTLLIBS=''
INTL_MACOSX_LIBS=''
LCOV=''
LCOV_GENHTML=''
LD=''
LDFLAGS='-Wl,-z,relro'
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBICONV=''
LIBINTL=''
LIBLZMA_LIBS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBICONV=''
LTLIBINTL=''
LTLIBOBJS=''
MAKEINFO=''
MANIFEST_TOOL=''
MKDIR_P=''
MSGFMT=''
MSGFMT_015=''
MSGMERGE=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE=''
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_COPYRIGHT_HOLDER='Dpkg Developers'
PACKAGE_NAME='dpkg'
PACKAGE_STRING='dpkg 1.17.21'
PACKAGE_TARNAME='dpkg'
PACKAGE_URL=''
PACKAGE_VERSION='1.17.21'
PATH_SEPARATOR=':'
PERL=''
PERL_COVER=''
PERL_COVERAGE=''
PERL_LIBDIR=''
PKG_CONFIG=''
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
PO4A=''
POD2MAN=''
POSUB=''
RANLIB=''
SED=''
SELINUX_LIBS=''
SET_MAKE=''
SHELL='/bin/bash'
SSD_LIBS=''
STRIP=''
TAR=''
USE_NLS=''
USE_PO4A=''
USE_UNICODE=''
VERSION=''
WITH_SELINUX_FALSE=''
WITH_SELINUX_TRUE=''
XGETTEXT=''
XGETTEXT_015=''
XGETTEXT_EXTRA_OPTIONS=''
ZLIB_LIBS=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
admindir=''
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='i486-linux-gnu'
build_alias='i486-linux-gnu'
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='${datadir}/info'
install_sh=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='/var'
logdir=''
mandir='${datadir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
pkgconfdir=''
prefix='/usr'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "dpkg"
#define PACKAGE_TARNAME "dpkg"
#define PACKAGE_VERSION "1.17.21"
#define PACKAGE_STRING "dpkg 1.17.21"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL ""
configure: exit 77
我的发行版的 c 编译器有什么问题以及如何解决它?
答案1
您要向后移植的包通过添加-fstack-protector-strong
到命令行来假设 GCC 4.9+。您的 GCC 版本 (4.7.2) 不支持此标志。
我不确定configure
在这种情况下如何调用,但修复方法是从调用它的脚本中删除此标志。 (我假设您实际上并没有在文件顶部config.log
手动输入那个巨大的命令。)
有旧旗帜做类似的事情,如果你觉得完全删除这个标志不舒服。