明远智睿技术论坛

标题: 【未解决】编译QT问题,求解答!!!! [打印本页]

作者: wanyhong    时间: 2016-10-31 14:35
标题: 【未解决】编译QT问题,求解答!!!!
本帖最后由 wanyhong 于 2016-10-31 14:44 编辑

错误信息:
UBUNTU12.04 64位,configure和qmake 分别在2楼三楼

或者提供下编译好的QT组件也可以,网盘的QT文件系统貌似是基于X11桌面的,我们的项目仅需要从Linux启动QT程序即可,谢谢


#qt-everywhere-opensource-src-5.5.1# ./configure.sh
+ cd qtbase
+ /home/wan/QT/5.5.1/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -v -prefix /usr/local/qt5.5.1 -confirm-license -opensource -release --whith-ld -make libs -device linux-imx6-g++ -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-libpng -qt-zlib -opengl es2 -no-sse2 -no-openssl -no-nis -no-cups -no-glib -no-dbus -no-xcb -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -make examples -nomake tools -nomake tests -no-iconv
--whith-ld: invalid command-line switch
#qt-everywhere-opensource-src-5.5.1# ./configure.sh
+ cd qtbase
+ /home/wan/QT/5.5.1/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -v -prefix /usr/local/qt5.5.1 -confirm-license -opensource -release -fuse-ld=bfd -make libs -device linux-imx6-g++ -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-libpng -qt-zlib -opengl es2 -no-sse2 -no-openssl -no-nis -no-cups -no-glib -no-dbus -no-xcb -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -make examples -nomake tools -nomake tests -no-iconv
-fuse-ld=bfd: invalid command-line switch
#qt-everywhere-opensource-src-5.5.1# ./configure.sh
+ cd qtbase
+ /home/wan/QT/5.5.1/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -v -prefix /usr/local/qt5.5.1 -confirm-license -opensource -release -fuse-ld bfd -make libs -device linux-imx6-g++ -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-libpng -qt-zlib -opengl es2 -no-sse2 -no-openssl -no-nis -no-cups -no-glib -no-dbus -no-xcb -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -make examples -nomake tools -nomake tests -no-iconv
-fuse-ld: invalid command-line switch
bfd: unknown argument
#qt-everywhere-opensource-src-5.5.1# ./configure.sh
+ cd qtbase
+ /home/wan/QT/5.5.1/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -v -prefix /usr/local/qt5.5.1 -confirm-license -opensource -release -make libs -device linux-imx6-g++ -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-libpng -qt-zlib -opengl es2 -no-sse2 -no-openssl -no-nis -no-cups -no-glib -no-dbus -no-xcb -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -make examples -nomake tools -nomake tests -no-iconv

This is the Qt Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) versions 3.

You have already accepted the terms of the Open Source license.

arm-poky-linux-gnueabi-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
collect2: fatal error: cannot find 'ld'
compilation terminated.
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crt1.o: No such file or directory
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crti.o: No such file or directory
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crtbegin.o: No such file or directory
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lstdc++
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lm
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lgcc_s
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lgcc
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lc
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lgcc_s
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lgcc
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crtend.o: No such file or directory
/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
arm-poky-linux-gnueabi-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
#error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
  ^
Symbolic function binding disabled.
DEFAULT_INCDIRS="/usr/include
/usr/local/include"
DEFAULT_LIBDIRS="/lib
/usr/lib"
Creating qmake...
make: Nothing to be done for `first'.
Running configuration tests...
Failed to process makespec for platform 'devices/linux-imx6-g++'
/home/wan/QT/5.5.1/qt-everywhere-opensource-src-5.5.1/qtbase/bin/qmake: 1: /home/wan/QT/5.5.1/qt-everywhere-opensource-src-5.5.1/qtbase/bin/qmake: Syntax error: word unexpected (expecting ")")




作者: wanyhong    时间: 2016-10-31 14:35
#!/bin/sh

./configure \
        -v -prefix /usr/local/qt5.5.1 \
        -confirm-license \
        -opensource \
        -release  \
        -make libs \
        -device linux-imx6-g++ \
        -optimized-qmake \
        -pch \
        -qt-sql-sqlite \
        -qt-libjpeg \
        -qt-libpng \
        -qt-zlib \
        -opengl es2 \
        -no-sse2 \
        -no-openssl \
        -no-nis \
        -no-cups \
        -no-glib \
        -no-dbus \
        -no-xcb \
        -no-xcursor -no-xfixes -no-xrandr -no-xrender \
        -no-separate-debug-info \
        -make examples -nomake tools -nomake tests -no-iconv
作者: wanyhong    时间: 2016-10-31 14:35
#
# qmake configuration for the Freescale iMX6 boards (single, dual and quad)
#

MAKEFILE_GENERATOR      = UNIX   #宏定义,代码中有判断  
CONFIG                 += incremental  
QMAKE_INCREMENTAL_STYLE = sublib  
  
QT_QPA_DEFAULT_PLATFORM = linuxfb #eglfs    #显示使用linuxfb或eglfs  
IMX6_CFLAGS             = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1    #处理器架构  
IMX6_CFLAGS_RELEASE     = -O2 $$IMX6_CFLAGS  
QMAKE_CFLAGS_RELEASE   += $$IMX6_CFLAGS_RELEASE  
QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE  
QMAKE_CFLAGS           += $$IMX6_CFLAGS  
QMAKE_CXXFLAGS         += $$IMX6_CFLAGS



include(../common/linux_device_pre.conf)  
include(../../common/linux.conf)  
include(../../common/gcc-base-unix.conf)  
include(../../common/g++-unix.conf)  

# modifications to g++.conf  
QMAKE_CC                = arm-poky-linux-gnueabi-gcc  
QMAKE_CXX               = arm-poky-linux-gnueabi-g++  
QMAKE_LINK              = arm-poky-linux-gnueabi-g++  
QMAKE_LINK_SHLIB        = arm-poky-linux-gnueabi-g++  
  
# modifications to linux.conf  
QMAKE_AR                = arm-poky-linux-gnueabi-ar cqs  
QMAKE_OBJCOPY           = arm-poky-linux-gnueabi-objcopy  
QMAKE_STRIP             = arm-poky-linux-gnueabi-strip  

QMAKE_INCDIR            += /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include  
QMAKE_LIBDIR            += /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib  
  
QMAKE_INCDIR            += /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/dbus-1.0  
QMAKE_INCDIR            += /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/lib/dbus-1.0/include  
QMAKE_LIBDIR            += /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib  
  
QMAKE_INCDIR_OPENGL_ES2 = /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include  
QMAKE_LIBDIR_OPENGL_ES2 = /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib  
  
QMAKE_INCDIR_EGL = /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include  
QMAKE_LIBDIR_EGL = /opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib  
  
QMAKE_LIBS_OPENGL_ES1       += -lGLESv1_CM -lEGL -lGAL  
QMAKE_LIBS_OPENGL_ES1CL     += -lGLES_CL -lEGL -lGAL  
QMAKE_LIBS_EGL         += -lEGL  
QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL -lGAL  
QMAKE_LIBS_OPENVG      += -lOpenVG -lEGL -lGAL  
QMAKE_LIBS             += -ljpeg -ldbus-1 -lrt -lpthread    #编译选项  

DISTRO_OPTS += hard-float

# Preferred eglfs backend
EGLFS_DEVICE_INTEGRATION = eglfs_viv

include(../common/linux_arm_device_post.conf)
load(qt_config)

作者: 软件05    时间: 2016-11-1 12:11
可以参考下这个:
http://www.bubuko.com/infodetail-951000.html




欢迎光临 明远智睿技术论坛 (http://bbs.myzr.com.cn/) Powered by Discuz! X3.2