• 12490阅读
  • 2回复

编译Qtopia2.1.1时遇到问题:impossible constraint in `asm' [复制链接]

上一主题 下一主题
离线lewis7799
 
只看楼主 倒序阅读 楼主  发表于: 2006-04-05
各位大虾:
我在编译Qtopia时遇到了一个错误:
    arm_v6_vfp_le-g++ -DQT_QWS_MXC -c -pipe -DQWS -fno-exceptions
    -fno-rtti -Wall -W -Os -fPIC -DQT_NO_QWS_VFB
    -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\"
    -DQTOPIA_TARGET=\"qpe\" -DQTOPIA_TRTARGET=\"libqpe\"
    -DQT_NO_DEBUG
    -I/home/ltib/src/qtopia-free-2.1.1/mkspecs/qws/linux-mxc-g++
    -I../../../include/qtopia/private -I../../../include
    -I/usr/include -I/home/ltib/src/qt-2.3.10/include
    -I../../../include/qtopia/private/ -I.moc/release-shared/
    -o .obj/release-shared/process_unix.o process_unix.cpp
    cc1plus: warning: include location "/usr/include" is unsafe for
    cross-compilation
    process_unix.cpp: In member function `virtual bool
    Process::exec(const QByteArray&, QByteArray&, QStringList*)':
    process_unix.cpp:471: error: impossible constraint in `asm'
    process_unix.cpp:472: error: impossible constraint in `asm'
    process_unix.cpp:480: error: impossible constraint in `asm'
    process_unix.cpp:487: error: impossible constraint in `asm'
    process_unix.cpp:492: error: impossible constraint in `asm'
    {standard input}: Assembler messages:
    {standard input}:2795: Error: bad instruction `btsl
    r3,[r2,#-344]'
    {standard input}:2802: Error: bad instruction `btsl
    r3,[r2,#-344]'
    {standard input}:2819: Error: bad instruction `btsl
    r3,[r2,#-472]'

但是,当我使用其他的g++ (i686的g++, 也就是我的host机器上的/usr/bin/g++)却可以编译通过。
各位有没有遇到类似的问题阿,帮忙解答一下吧。

附2个g++的版本:
The version of arm_v6_vfp_le-g++:
    [ltib@localhost qtopia-free-2.1.1]$ arm_v6_vfp_le-g++ -v
    Reading specs
    from /opt/montavista/mobilinux/devkit/arm/v6_vfp_le/bin/../lib/gcc/armv6fl-montavista-linuxeabi/3.4.3/specs
    Configured with: ../configure --host=i686-pc-linux-gnu
    --target=armv6fl-montavista-linuxeabi
    --prefix=/opt/montavista/foundation/devkit/arm/v6_vfp_le
    --exec-prefix=/opt/montavista/foundation/devkit/arm/v6_vfp_le
    --bindir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/bin
    --sbindir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/sbin
    --sysconfdir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/etc
    --datadir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/share
    --includedir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/include --libdir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/lib --libexecdir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/libexec --localstatedir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/var --sharedstatedir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/share --mandir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/man --infodir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/info --build=i686-pc-linux-gnu --program-transform-name=s,^,arm_v6_vfp_le-, --enable-cross --with-sysroot=/opt/montavista/foundation/devkit/arm/v6_vfp_le/target --enable-shared --enable-languages=c,c++ --enable-__cxa_atexit --enable-threads=posix --disable-multilib --with-gxx-include-dir=${prefix}/lib/gcc/armv6fl-montavista-linuxeabi/3.4.3/../../../../target/usr/include/c++/3.4.3 --with-numa-policy=yes --with-float=softfp --with-cpu=arm1136jf-s --with-interwork --with-arch=armv6j --with-tune=arm1136jf-s --with-fpu=vfp --libexecdir=/opt/montavista/foundation/devkit/arm/v6_vfp_le/lib
    Thread model: posix
    gcc version 3.4.3 (MontaVista 3.4.3-25.0.67.0501786 2005-11-09)

and the version of host g++:
    Using built-in specs.
    Target: i386-redhat-linux
    Configured with: ../configure --prefix=/usr
    --mandir=/usr/share/man --infodir=/usr/share/info
    --enable-shared --enable-threads=posix --enable-checking=release
    --with-system-zlib --enable-__cxa_atexit
    --disable-libunwind-exceptions --enable-libgcj-multifile
    --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
    --enable-java-awt=gtk --disable-dssi
    --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
    --with-cpu=generic --host=i386-redhat-linux
    Thread model: posix
    gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)


I think so I am ...
离线dashing
只看该作者 1楼 发表于: 2006-04-05
可能事交叉编译的工具链的本身的问题,或者你得到的不全或者环境变量的问题
问mv的中国的技术支持就可以解决
离线lewis7799
只看该作者 2楼 发表于: 2006-04-06
问题已经解决:
就是注意定义足够的宏,保证include的是toolchain相关的头文件。

I think so I am ...
快速回复
限100 字节
 
上一个 下一个