我的程序(QT / C ++)正在使用python模块从Google驱动器下载一些视频,它工作得很好,但是我无法针对树莓派pi3进行交叉编译。 我是树莓QT Cross Compile的新手,在任何地方都找不到此错误的解决方案:
#define _POSIX_C_SOURCE 200112L
^
In file included from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/c++config.h:426,
from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cstddef:41,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h:45,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/qtimer.h:43,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/QTimer:1,
from DigitalSignal.h:5,
from DigitalSignal.cpp:1:
/opt/qtrpi/raspbian/sysroot/usr/include/./features.h:230:0: note: ceci est l'emplacement d’une précédente définition
# define _POSIX_C_SOURCE 200809L
^
In file included from lib/python2.7/Include/Python.h:8:0,
from DigitalSignal.cpp:15:
lib/python2.7/Include/pyconfig.h:1242:0: warning: « _XOPEN_SOURCE » redéfini [enabled by default]
#define _XOPEN_SOURCE 600
^
In file included from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/c++config.h:426,
from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cstddef:41,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h:45,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/qtimer.h:43,
from /opt/qtrpi/raspi/qt5pi/include/QtCore/QTimer:1,
from DigitalSignal.h:5,
from DigitalSignal.cpp:1:
/opt/qtrpi/raspbian/sysroot/usr/include/./features.h:162:0: note: ceci est l'emplacement d’une précédente définition
# define _XOPEN_SOURCE 700
^
In file included from lib/python2.7/Include/Python.h:61:0,
from DigitalSignal.cpp:15:
lib/python2.7/Include/pyport.h:895:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
^
Makefile:1145: recipe for target 'DigitalSignal.o' failed
make: *** [DigitalSignal.o] Error 1
答案 0 :(得分:0)
基于此问题Python compilation error: "LONG_BIT definition appears wrong for platform"的解决方案。我在 lib / python2.7 / Include / pyconfig.h 中更改了此行#define SIZEOF_LONG 8
,并在此行{{1 }}(说明:“ 32位为'4',64位为'8')
但是现在我有一个新的错误,我不理解:::
#define SIZEOF_LONG 4
任何人都可以看到此错误的含义吗?