Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT5.14.x config TSLIB failed
Forum Updated to NodeBB v4.3 + New Features

QT5.14.x config TSLIB failed

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 438 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zwmasdf
    wrote on last edited by zwmasdf
    #1

    OS:Ubuntu18.04
    toolchain:arm-linux-gnueabi-gcc V7.5.0 and arm-linux-gnueabi-g++ V7.5.0

    TSLIB:1.21
    tslib configure:

    CC=arm-linux-gnueabi-gcc ./configure --prefix=/usr/arm-linux-gnueabi/ --host=arm-linux --enable-static --disable-shared --enable-input=static --enable-linear=static --enable-iir=static
    

    qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf:

    MAKEFILE_GENERATOR         = UNIX
    CONFIG                    += incremental
    QMAKE_INCREMENTAL_STYLE    = sublib
    
    QMAKE_QPA_DEFAULT_PLATFORM = linuxfb #eglfs
    QMAKE_CFLAGS_RELEASE      +=-O2 -march=armv7-a
    QMAKE_CXXFLAGS_RELEASE    +=-O2 -march=armv7-a
    
    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)
    
    # modifications to g++.conf
    QMAKE_CC                = arm-linux-gnueabi-gcc
    QMAKE_CXX               = arm-linux-gnueabi-g++
    QMAKE_LINK              = arm-linux-gnueabi-g++
    QMAKE_LINK_SHLIB        = arm-linux-gnueabi-g++
    
    # modifications to linux.conf
    QMAKE_AR                = arm-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY           = arm-linux-gnueabi-objcopy
    QMAKE_NM                = arm-linux-gnueabi-nm -P
    QMAKE_STRIP             = arm-linux-gnueabi-strip
    load(qt_config)
    

    QT configure:

    ./configure \
    -v \
    -prefix /home/zwmasdf/QtArm/QtRelease \
    -release \
    -opensource \
    -confirm-license \
    -nomake examples \
    -nomake tests \
    -nomake tools \
    -no-compile-examples \
    -xplatform linux-arm-gnueabi-g++ \
    -optimized-qmake \
    -pch \
    -qt-zlib \
    -no-opengl \
    -no-sse2 \
    -no-openssl \
    -no-cups \
    -no-glib \
    -no-pkg-config \
    -no-separate-debug-info \
    -make libs \
    -accessibility \
    -no-iconv \
    -qt-libjpeg \
    -qt-libpng \
    -qt-freetype \
    -evdev \
    -tslib \
    -skip qtactiveqt \
    -skip qtcharts \
    -skip qtconnectivity \
    -skip qtdeclarative \
    -skip qtdoc \
    -skip qtgamepad \
    -skip qtgraphicaleffects \
    -skip qtimageformats \
    -skip qtlocation \
    -skip qtmultimedia \
    -skip qtnetworkauth \
    -skip qtpurchasing \
    -skip qtquickcontrols \
    -skip qtquickcontrols2 \
    -skip qtremoteobjects \
    -skip qtscript \
    -skip qtscxml \
    -skip qtsensors \
    -skip qtserialbus \
    -skip qtserialport \
    -skip qtspeech \
    -skip qtsvg \
    -skip qttools \
    -skip qttranslations \
    -skip qtvirtualkeyboard \
    -skip qtwayland \
    -skip qtwebchannel \
    -skip qtwebengine \
    -skip qtwebsockets \
    -skip qtwebview \
    -skip qtxmlpatterns
    

    I have skipped some modules in order to configure more faster
    Then I found when Qt Version < 5.14, it configured success
    But in 5.14.0 or 5.14.1, it configured failed

    It says:

    ERROR: Feature 'tslib' was enabled, but the pre-condition 'libs.tslib' failed.
    

    Here is the config log in Qt 5.14.0, "对‘XXX’未定义的引用" means Undefined reference to 'XXX':

    Trying source 0 (type inline) of library tslib ...
    + cd /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/config.tests/tslib && /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" -early "CONFIG += cross_compile" 'QMAKE_USE += tslib' 'QMAKE_LIBS_TSLIB = -lts' /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/config.tests/tslib
    + cd /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/config.tests/tslib && MAKEFLAGS= /usr/bin/make
    > arm-linux-gnueabi-g++ -c -pipe -O2 -march=armv7-a -O2 -march=armv7-a -O2 -w -fPIC  -I. -I/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/linux-arm-gnueabi-g++ -o main.o main.cpp
    > arm-linux-gnueabi-g++ -Wl,-O1 -o tslib main.o   -lts   
    > /usr/lib/gcc-cross/arm-linux-gnueabi/7/../../../../arm-linux-gnueabi/lib/../lib/libts.a(ts_close.o):在函数‘ts_close’中:
    > ts_close.c:(.text+0x44):对‘dlclose’未定义的引用
    > /usr/lib/gcc-cross/arm-linux-gnueabi/7/../../../../arm-linux-gnueabi/lib/../lib/libts.a(ts_config.o):在函数‘ts_reconfig’中:
    > ts_config.c:(.text+0x448):对‘dlclose’未定义的引用
    > /usr/lib/gcc-cross/arm-linux-gnueabi/7/../../../../arm-linux-gnueabi/lib/../lib/libts.a(ts_load_module.o):在函数‘__ts_load_module_shared’中:
    > ts_load_module.c:(.text+0x80):对‘dlopen’未定义的引用
    > ts_load_module.c:(.text+0x94):对‘dlsym’未定义的引用
    > ts_load_module.c:(.text+0xf4):对‘dlclose’未定义的引用
    > ts_load_module.c:(.text+0x104):对‘dlclose’未定义的引用
    > /usr/lib/gcc-cross/arm-linux-gnueabi/7/../../../../arm-linux-gnueabi/lib/../lib/libts.a(ts_load_module.o):在函数‘__ts_load_module’中:
    > ts_load_module.c:(.text+0x1e0):对‘dlclose’未定义的引用
    > collect2: error: ld returned 1 exit status
    > Makefile:67: recipe for target 'tslib' failed
    > make: *** [tslib] Error 1
     => source failed verification.
    
    

    I guess libdl can't link with tslib in QT 5.14.x, I tried to add "-ldl":
    add -ldl in qmake.conf as below:

    QMAKE_LIBS_LIBDL = -ldl
    QMAKE_USE += libdl
    

    Then I delete topdir/config.tests,config.cache,config.log,config.opt,.config.notes,.qmake.*,and tried configure again,but it still the same error
    I opened config.tests/Makefile,found it has linked with "-ldl":

    #############################################################################
    # Makefile for building: tslib
    # Generated by qmake (3.1) (Qt 5.14.0)
    # Project:  tslib.pro
    # Template: app
    # Command: /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/bin/qmake -o Makefile tslib.pro 'CONFIG -= qt debug_and_release app_bundle lib_bundle' 'CONFIG += shared warn_off console single_arch' -early 'CONFIG += cross_compile' 'QMAKE_USE += tslib' 'QMAKE_LIBS_TSLIB = -lts'
    #############################################################################
    
    MAKEFILE      = Makefile
    
    EQ            = =
    
    ####### Compiler, tools and options
    
    CC            = arm-linux-gnueabi-gcc
    CXX           = arm-linux-gnueabi-g++
    DEFINES       = 
    CFLAGS        = -pipe -O2 -march=armv7-a -O2 -w -fPIC $(DEFINES)
    CXXFLAGS      = -pipe -O2 -march=armv7-a -O2 -march=armv7-a -O2 -w -fPIC $(DEFINES)
    INCPATH       = -I. -I/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/linux-arm-gnueabi-g++
    QMAKE         = /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/bin/qmake
    DEL_FILE      = rm -f
    CHK_DIR_EXISTS= test -d
    MKDIR         = mkdir -p
    COPY          = cp -f
    COPY_FILE     = cp -f
    COPY_DIR      = cp -f -R
    INSTALL_FILE  = install -m 644 -p
    INSTALL_PROGRAM = install -m 755 -p
    INSTALL_DIR   = cp -f -R
    QINSTALL      = /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/bin/qmake -install qinstall
    QINSTALL_PROGRAM = /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/bin/qmake -install qinstall -exe
    DEL_FILE      = rm -f
    SYMLINK       = ln -f -s
    DEL_DIR       = rmdir
    MOVE          = mv -f
    TAR           = tar -cf
    COMPRESS      = gzip -9f
    DISTNAME      = tslib1.0.0
    DISTDIR = /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/config.tests/tslib/.tmp/tslib1.0.0
    LINK          = arm-linux-gnueabi-g++
    LFLAGS        = -Wl,-O1
    LIBS          = $(SUBLIBS) -ldl -lts   
    AR            = arm-linux-gnueabi-ar cqs
    RANLIB        = 
    SED           = sed
    STRIP         = arm-linux-gnueabi-strip
    
    ####### Output directory
    
    OBJECTS_DIR   = ./
    
    ####### Files
    
    SOURCES       = main.cpp 
    OBJECTS       = main.o
    DIST          = tslib.pro  main.cpp
    QMAKE_TARGET  = tslib
    DESTDIR       = 
    TARGET        = tslib
    
    
    first: all
    ####### Build rules
    
    tslib:  $(OBJECTS)  
    	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
    
    Makefile: tslib.pro ../.qmake.cache /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/spec_pre.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/unix.conf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/linux.conf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/sanitize.conf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/gcc-base.conf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/gcc-base-unix.conf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/g++-base.conf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/g++-unix.conf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/qconfig.pri \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/qt_functions.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/qt_config.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/spec_post.prf \
    		../.qmake.cache \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/.qmake.stash \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/exclusive_builds.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/toolchain.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/default_pre.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/resolve_config.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/default_post.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/warn_off.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/qmake_use.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/file_copies.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/testcase_targets.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/exceptions.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/yacc.prf \
    		/home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/lex.prf \
    		tslib.pro
    	$(QMAKE) -o Makefile tslib.pro 'CONFIG -= qt debug_and_release app_bundle lib_bundle' 'CONFIG += shared warn_off console single_arch' -early 'CONFIG += cross_compile' 'QMAKE_USE += tslib' 'QMAKE_LIBS_TSLIB = -lts'
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/spec_pre.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/unix.conf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/linux.conf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/sanitize.conf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/gcc-base.conf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/gcc-base-unix.conf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/g++-base.conf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/common/g++-unix.conf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/qconfig.pri:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/qt_functions.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/qt_config.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/spec_post.prf:
    ../.qmake.cache:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/.qmake.stash:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/exclusive_builds.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/toolchain.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/default_pre.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/resolve_config.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/default_post.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/warn_off.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/qmake_use.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/file_copies.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/testcase_targets.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/exceptions.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/yacc.prf:
    /home/zwmasdf/QtArm/qt-everywhere-src-5.14.0/qtbase/mkspecs/features/lex.prf:
    tslib.pro:
    qmake: FORCE
    	@$(QMAKE) -o Makefile tslib.pro 'CONFIG -= qt debug_and_release app_bundle lib_bundle' 'CONFIG += shared warn_off console single_arch' -early 'CONFIG += cross_compile' 'QMAKE_USE += tslib' 'QMAKE_LIBS_TSLIB = -lts'
    
    qmake_all: FORCE
    
    
    all: Makefile tslib
    
    dist: distdir FORCE
    	(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
    
    distdir: FORCE
    	@test -d $(DISTDIR) || mkdir -p $(DISTDIR)
    	$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
    
    
    clean: compiler_clean 
    	-$(DEL_FILE) $(OBJECTS)
    	-$(DEL_FILE) *~ core *.core
    
    
    distclean: clean 
    	-$(DEL_FILE) $(TARGET) 
    	-$(DEL_FILE) Makefile
    
    
    ####### Sub-libraries
    
    check: first
    
    benchmark: first
    
    compiler_yacc_decl_make_all:
    compiler_yacc_decl_clean:
    compiler_yacc_impl_make_all:
    compiler_yacc_impl_clean:
    compiler_lex_make_all:
    compiler_lex_clean:
    compiler_clean: 
    
    ####### Compile
    
    main.o: main.cpp 
    	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
    
    ####### Install
    
    install:  FORCE
    
    uninstall:  FORCE
    
    FORCE:
    
    

    However the error is the same,how to fix this problem?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved