在 Qubes OS Debian 中编译 Python 3.6.0+ 时出现问题

在 Qubes OS Debian 中编译 Python 3.6.0+ 时出现问题

我尝试从Debian内部模板Qubes OS(gcc 4.9.2)中的源代码编译Python 3.6.0和最新的CPython。

我已经设法做到了这一点,但configure详细查看输出,我注意到许多库和函数似乎不可用,对于其中一些,配置脚本对系统调用给出了肯定的响应,但对系统调用给出了否定的响应函数,例如getrandom()

...
checking for the Linux getrandom() syscall... yes
checking for the getrandom() function... no
...


我找到了中使用的测试代码configure,我自己编译并测试了它,它工作得很好:

#include <unistd.h>
#include <sys/syscall.h>
#include <linux/random.h>

int main() {
    const int flags = 0;
    char buffer[1];
    int n;
    /* ignore the result, Python checks for ENOSYS at runtime */
    (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
    return 0;
}

所以我不明白为什么configure似乎不喜欢这些功能。**


另一件事是它找不到g++,但我已经安装了它并且工作正常:

checking for g++... no

configure:

    By default, distutils will build C++ extension modules with "g++".
    If this is not intended, then set CXX on the configure command line.


我来自Ubuntu,所以我想知道这是否是一个有关模板的问题Debian,或者是配置错误或缺少组件因素,我可以轻松解决,继续在里面使用 Debian 。Qubes OSDebianQubes OS



完整的configure输出问题(带优化):

user@work-debian:~/Downloads/Python-3.6.0$ ./configure --enable-optimizations --with-lto  | grep " no"

checking for python3.6... no
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking for --without-gcc... no
checking for --with-icc... no
checking whether we are cross compiling... no
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for the Android API level... not Android
checking for case-insensitive build directory... no
checking for --enable-shared... no
checking for --enable-profiling... no
checking for --with-pydebug... no
checking for -llvm-profdata... no
checking whether gcc accepts and needs -fno-strict-aliasing... no
checking if we can turn on gcc unreachable code warning... no
checking whether pthreads are available without options... no
checking whether gcc accepts -Kpthread... no
checking whether gcc accepts -Kthread... no
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
checking sys/bsdtty.h usability... no
checking sys/bsdtty.h presence... no
checking for sys/bsdtty.h... no
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/kern_control.h usability... no
checking sys/kern_control.h presence... no
checking for sys/kern_control.h... no
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/lock.h usability... no
checking sys/lock.h presence... no
checking for sys/lock.h... no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking sys/sys_domain.h usability... no
checking sys/sys_domain.h presence... no
checking for sys/sys_domain.h... no
checking sys/termio.h usability... no
checking sys/termio.h presence... no
checking for sys/termio.h... no
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking bluetooth.h usability... no
checking bluetooth.h presence... no
checking for bluetooth.h... no
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking for library containing opendir... none required
checking bluetooth/bluetooth.h usability... no
checking bluetooth/bluetooth.h presence... no
checking for bluetooth/bluetooth.h... no
checking Solaris LFS bug... no
checking whether to enable large file support... no
checking for --enable-framework... no
checking for dyld... no
checking for sendfile in -lsendfile... no
checking for shl_load in -ldld... no
checking for textdomain in -lintl... no
checking aligned memory access is required... no
checking for --with-address-sanitizer... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for --with-libs... no
checking for pkg-config... no
checking for --with-system-expat... no
checking for --with-system-libmpdec... no
checking for --enable-loadable-sqlite-extensions... no
checking for --with-valgrind... no
checking for --with-dtrace... no
checking MACHDEP_OBJS... none
checking for getentropy... no
checking for lchmod... no
checking for plock... no
checking for pthread_init... no
checking for strlcpy... no
checking for _getpty... no
checking for kqueue... no
checking for ctermid_r... no
checking for broken unsetenv... no
checking for chflags... no
checking for lchflags... no
checking for openpty... no
checking for fseek64... no
checking for ftell64... no
checking getaddrinfo bug... no
checking for struct stat.st_flags... no
checking for struct stat.st_gen... no
checking for struct stat.st_birthtime... no
checking for time.h that defines altzone... no
checking whether char is unsigned... no
checking if sockaddr has sa_len member... no
checking for --with-fpectl... no
checking whether C doubles are big-endian IEEE 754 binary64... no
checking whether C doubles are ARM mixed-endian IEEE 754 binary64... no
checking whether we can use gcc inline assembler to get and set mc68881 fpcr... no
checking for x87-style double rounding... no
checking whether log1p drops the sign of negative zero... no
checking for broken sem_getvalue... no
checking digit size for Python's longs... no value specified
checking for UCS-4 tcl... no
checking whether byte ordering is bigendian... no
checking for broken nice()... no
checking for broken poll()... no
checking for tv_nsec2 in struct stat... no
checking for /dev/ptc... no
checking for broken mbstowcs... no
checking for --with-computed-gotos... no value specified
checking for glibc _FORTIFY_SOURCE/memmove bug... no
checking for gcc ipa-pure-const bug... no
checking for the getrandom() function... no

完整的configure输出问题(没有优化):

user@work-debian:~/Downloads/Python-3.6.0$ ./configure | grep " no"

checking for python3.6... no
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking for --without-gcc... no
checking for --with-icc... no
checking whether we are cross compiling... no
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for the Android API level... not Android
checking for case-insensitive build directory... no
checking for --enable-shared... no
checking for --enable-profiling... no
checking for --with-pydebug... no
checking for -llvm-profdata... no
checking whether gcc accepts and needs -fno-strict-aliasing... no
checking if we can turn on gcc unreachable code warning... no
checking whether pthreads are available without options... no
checking whether gcc accepts -Kpthread... no
checking whether gcc accepts -Kthread... no
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
checking sys/bsdtty.h usability... no
checking sys/bsdtty.h presence... no
checking for sys/bsdtty.h... no
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/kern_control.h usability... no
checking sys/kern_control.h presence... no
checking for sys/kern_control.h... no
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/lock.h usability... no
checking sys/lock.h presence... no
checking for sys/lock.h... no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking sys/sys_domain.h usability... no
checking sys/sys_domain.h presence... no
checking for sys/sys_domain.h... no
checking sys/termio.h usability... no
checking sys/termio.h presence... no
checking for sys/termio.h... no
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking bluetooth.h usability... no
checking bluetooth.h presence... no
checking for bluetooth.h... no
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking for library containing opendir... none required
checking bluetooth/bluetooth.h usability... no
checking bluetooth/bluetooth.h presence... no
checking for bluetooth/bluetooth.h... no
checking Solaris LFS bug... no
checking whether to enable large file support... no
checking for --enable-framework... no
checking for dyld... no
checking for sendfile in -lsendfile... no
checking for shl_load in -ldld... no
checking for textdomain in -lintl... no
checking aligned memory access is required... no
checking for --with-address-sanitizer... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for --with-libs... no
checking for pkg-config... no
checking for --with-system-expat... no
checking for --with-system-libmpdec... no
checking for --enable-loadable-sqlite-extensions... no
checking for --with-valgrind... no
checking for --with-dtrace... no
checking MACHDEP_OBJS... none
checking for getentropy... no
checking for lchmod... no
checking for plock... no
checking for pthread_init... no
checking for strlcpy... no
checking for _getpty... no
checking for kqueue... no
checking for ctermid_r... no
checking for broken unsetenv... no
checking for chflags... no
checking for lchflags... no
checking for openpty... no
checking for fseek64... no
checking for ftell64... no
checking getaddrinfo bug... no
checking for struct stat.st_flags... no
checking for struct stat.st_gen... no
checking for struct stat.st_birthtime... no
checking for time.h that defines altzone... no
checking whether char is unsigned... no
checking if sockaddr has sa_len member... no
checking for --with-fpectl... no
checking whether C doubles are big-endian IEEE 754 binary64... no
checking whether C doubles are ARM mixed-endian IEEE 754 binary64... no
checking whether we can use gcc inline assembler to get and set mc68881 fpcr... no
checking for x87-style double rounding... no
checking whether log1p drops the sign of negative zero... no
checking for broken sem_getvalue... no
checking digit size for Python's longs... no value specified
checking for UCS-4 tcl... no
checking whether byte ordering is bigendian... no
checking for broken nice()... no
checking for broken poll()... no
checking for tv_nsec2 in struct stat... no
checking for /dev/ptc... no
checking for broken mbstowcs... no
checking for --with-computed-gotos... no value specified
checking for glibc _FORTIFY_SOURCE/memmove bug... no
checking for gcc ipa-pure-const bug... no
checking for the getrandom() function... no

checking for python3.6... no
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking for --without-gcc... no
checking for --with-icc... no
checking whether we are cross compiling... no
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
  If this is not intended, then set CXX on the configure command line.
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for the Android API level... not Android
checking for case-insensitive build directory... no
checking for --enable-shared... no
checking for --enable-profiling... no
checking for --with-pydebug... no
checking for --enable-optimizations... no
checking for --with-lto... no
checking for -llvm-profdata... no
checking whether gcc accepts and needs -fno-strict-aliasing... no
checking if we can turn on gcc unreachable code warning... no
checking whether pthreads are available without options... no
checking whether gcc accepts -Kpthread... no
checking whether gcc accepts -Kthread... no
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
checking sys/bsdtty.h usability... no
checking sys/bsdtty.h presence... no
checking for sys/bsdtty.h... no
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/kern_control.h usability... no
checking sys/kern_control.h presence... no
checking for sys/kern_control.h... no
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/lock.h usability... no
checking sys/lock.h presence... no
checking for sys/lock.h... no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking sys/sys_domain.h usability... no
checking sys/sys_domain.h presence... no
checking for sys/sys_domain.h... no
checking sys/termio.h usability... no
checking sys/termio.h presence... no
checking for sys/termio.h... no
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking bluetooth.h usability... no
checking bluetooth.h presence... no
checking for bluetooth.h... no
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking for library containing opendir... none required
checking bluetooth/bluetooth.h usability... no
checking bluetooth/bluetooth.h presence... no
checking for bluetooth/bluetooth.h... no
checking Solaris LFS bug... no
checking whether to enable large file support... no
checking for --enable-framework... no
checking for dyld... no
checking for sendfile in -lsendfile... no
checking for shl_load in -ldld... no
checking for textdomain in -lintl... no
checking aligned memory access is required... no
checking for --with-address-sanitizer... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for --with-libs... no
checking for pkg-config... no
checking for --with-system-expat... no
checking for --with-system-libmpdec... no
checking for --enable-loadable-sqlite-extensions... no
checking for --with-valgrind... no
checking for --with-dtrace... no
checking MACHDEP_OBJS... none
checking for getentropy... no
checking for lchmod... no
checking for plock... no
checking for pthread_init... no
checking for strlcpy... no
checking for _getpty... no
checking for kqueue... no
checking for ctermid_r... no
checking for broken unsetenv... no
checking for chflags... no
checking for lchflags... no
checking for openpty... no
checking for fseek64... no
checking for ftell64... no
checking getaddrinfo bug... no
checking for struct stat.st_flags... no
checking for struct stat.st_gen... no
checking for struct stat.st_birthtime... no
checking for time.h that defines altzone... no
checking whether char is unsigned... no
checking if sockaddr has sa_len member... no
checking for --with-fpectl... no
checking whether C doubles are big-endian IEEE 754 binary64... no
checking whether C doubles are ARM mixed-endian IEEE 754 binary64... no
checking whether we can use gcc inline assembler to get and set mc68881 fpcr... no
checking for x87-style double rounding... no
checking whether log1p drops the sign of negative zero... no
checking for broken sem_getvalue... no
checking digit size for Python's longs... no value specified
checking for UCS-4 tcl... no
checking whether byte ordering is bigendian... no
checking for broken nice()... no
checking for broken poll()... no
checking for tv_nsec2 in struct stat... no
checking for /dev/ptc... no
checking for broken mbstowcs... no
checking for --with-computed-gotos... no value specified
checking for glibc _FORTIFY_SOURCE/memmove bug... no
checking for gcc ipa-pure-const bug... no
checking for the getrandom() function... no

相关内容