Package: python2.7 Version: 2.7.9-1 Severity: normal I am unable to build programs using Python's distutils, because it's invoking the wrong compiler. It's trying to use a gcc 4.9 flag, but is invoking gcc 4.7, which aborts due to an unrecognised flag.
I think what's happened here is that it's picked up the non-versioned gcc symlink from the system where Python was compiled. That system only had gcc 4.9 installed, so the symlink pointed at the right compiler. My system has the symlink provided by the stock gcc package, which points at gcc 4.7. The simplest fix is probably to change Python to use a versioned compiler executable. $ python Python 2.7.9 (default, Mar 1 2015, 12:57:24) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from distutils import sysconfig >>> sysconfig.get_config_var('CC') 'x86_64-linux-gnu-gcc -pthread' >>> sysconfig.get_config_var('CFLAGS') '-fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security ' >>> $ x86_64-linux-gnu-gcc -fstack-protector-strong x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-fstack-protector-strong’ x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. $ x86_64-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=x86_64-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.4-3' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.7.4 (Debian 4.7.4-3) $ ls -l /usr/bin/x86_64-linux-gnu-gcc lrwxrwxrwx 1 root root 7 Sep 27 2012 /usr/bin/x86_64-linux-gnu-gcc -> gcc-4.7 -- System Information: Debian Release: 7.8 APT prefers stable APT policy: (990, 'stable'), (500, 'sid'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages python2.7 depends on: ii libpython2.7-stdlib 2.7.9-2 ii mime-support 3.52-1+deb7u1 ii python2.7-minimal 2.7.9-2 python2.7 recommends no packages. Versions of packages python2.7 suggests: ii binutils 2.25-6 pn python2.7-doc <none> -- no debconf information -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ "There is nothing in the world so dangerous --- and I mean *nothing* │ --- as a children's story that happens to be true." --- Master Li Kao, │ _The Bridge of Birds_
signature.asc
Description: OpenPGP digital signature