my cross compiler has error.tslib install but has error



  • I installed these tools:
    http://www.mediafire.com/file/g0afghia7rkqx05/arm-cortexa9-linux-gnueabihf-4.9.3-20160512.tar.xz
    http://www.mediafire.com/file/d54dbygdadergl1/target-qte-4.8.6-to-hostpc.tgz
    on empty Ubuntu, then I install tslib and these libs :

    sudo apt-get install autoconf autogen
    sudo apt-get install autoconf automake pkg-config libgtk-3-dev
    sudo apt-get install autoconf autogen intltool
    Sudo apt-get install libtool
    

    then:

    cd ~
    mkdir helloqt
    vi main.cpp
    

    then I wrote it:

    #include <QApplication>
    #include <QPushButton>
    int main(int argc, char **argv)
    {
            QApplication app (argc, argv);
            QPushButton button ("Hello world !");
            button.show();
            return app.exec();
    }
    

    and save it

    cd ~/helloqt
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -project 
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake
    make
    

    for make I have this error:

    fgit@ubuntu:~/helloqt$ make
    arm-linux-g++ -Wl,-rpath-link,/tmp/FriendlyARM/nanopi2/libs/usr/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -o helloqt main.o    -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -lQtNetwork -lQtCore -lpthread 
    /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld.bfd: warning: libts-1.0.so.0, needed by /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
    /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld.bfd: warning: libz.so.1, needed by /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflateInit_'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflateInit2_'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `compress'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to `uncompress'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflate'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to `compress2'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflateEnd'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `crc32'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflate'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflateInit2_'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflateInit_'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_read_raw'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflateEnd'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_open'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_fd'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_config'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflateReset'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflateReset'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_close'
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_read'
    collect2: error: ld returned 1 exit status
    Makefile:103: recipe for target 'helloqt' failed
    make: *** [helloqt] Error 1
    

    I also change the g++.conf
    from this:

    #
    # qmake configuration for building with arm-linux-g++
    #
    
    include(../../common/linux.conf)
    include(../../common/gcc-base-unix.conf)
    include(../../common/g++-unix.conf)
    include(../../common/qws.conf)
    
    # modifications to g++.conf
    QMAKE_CC                = arm-linux-gcc 
    QMAKE_CXX               = arm-linux-g++
    QMAKE_LINK              = arm-linux-g++
    QMAKE_LINK_SHLIB        = arm-linux-g++
    
    # modifications to linux.conf
    QMAKE_AR                = arm-linux-ar cqs
    QMAKE_OBJCOPY           = arm-linux-objcopy
    QMAKE_STRIP             = arm-linux-strip
    
    
    load(qt_config)
    

    to this:

    #
    # qmake configuration for building with arm-linux-g++
    #
    
    include(../../common/linux.conf)
    include(../../common/gcc-base-unix.conf)
    include(../../common/g++-unix.conf)
    include(../../common/qws.conf)
    
    # modifications to g++.conf
    QMAKE_CC                = /opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-gcc -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv7l -mtune=arm1176jzf-s -O0 -lts
    QMAKE_CXX               = /opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-g++  -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv7l -mtune=arm1176jzf-s -O0 -lts
    QMAKE_LINK              = /opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-g++  -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv7l -mtune=arm1176jzf-s -O0 -lts
    QMAKE_LINK_SHLIB        = /opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-g++  -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv7l -mtune=arm1176jzf-s -O0 -lts
    
    # modifications to linux.conf
    QMAKE_AR                = /opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-ar cqs
    QMAKE_OBJCOPY           = /opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-objcopy
    QMAKE_STRIP             = /opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-strip
    
    QMAKE_INCDIR += /home/tslib/include/
    QMAKE_LIBDIR += /home/tslib/lib/
    
    QMAKE_CFLAGS_RELEASE += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_DEBUG += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_MT += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_MT_DBG += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_MT_DLL += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_MT_DLLDBG += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_SHLIB += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_THREAD += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_WARN_OFF += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CFLAGS_WARN_ON += -march=armv7l -mtune=arm1176jzf-s
    
    QMAKE_CXXFLAGS_DEBUG += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_MT += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_MT_DBG += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_MT_DLL += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_MT_DLLDBG += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_RELEASE += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_SHLIB += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_THREAD += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_WARN_OFF += -march=armv7l -mtune=arm1176jzf-s
    QMAKE_CXXFLAGS_WARN_ON += -march=armv7l -mtune=arm1176jzf-s
    
    load(qt_config)
    

    How to solve this qmake error,


  • Lifetime Qt Champion

    Hi,

    Did you also cross-compile TSLib ?



  • this is how I install TSLIB:

    $sudo apt-get install git-core
    $cd /usr/local
    $git clone http://github.com/kergoth/tslib.git
    $export PATH=/usr/local/arm/4.7.0/bin:$PATH
    $export CROSS_COMPILE=arm-none-linux-gnueabi-
    $export CC=${CROSS_COMPILE}gcc
    $export CFLAGS=-march=armv7l
    export CXX=${CROSS_COMPILE}"g++" 
    export AR=${CROSS_COMPILE}"ar" 
    export AS=${CROSS_COMPILE}"as"
    export RANLIB=${CROSS_COMPILE}"ranlib"
    export LD=${CROSS_COMPILE}"ld"
    export STRIP=${CROSS_COMPILE}"strip"
    export ac_cv_func_malloc_0_nonnull=yes
    sudo apt-get install autoconf autogen
    sudo apt-get install autoconf automake pkg-config libgtk-3-dev
    sudo apt-get install autoconf autogen intltool
    Sudo apt-get install libtool
    
    ///From <https://github.com/dogecoin/dogecoin/issues/529> 
    
    fgit@ubuntu:/usr/local/tslib$ sudo ./autogen-clean.sh
    Removing autogenned files...
    Done.
    fgit@ubuntu:/usr/local/tslib$ sudo ./autogen.sh
    libtoolize: putting auxiliary files in '.'.
    libtoolize: copying file './ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4/internal'.
    libtoolize: copying file 'm4/internal/libtool.m4'
    libtoolize: copying file 'm4/internal/ltoptions.m4'
    libtoolize: copying file 'm4/internal/ltsugar.m4'
    libtoolize: copying file 'm4/internal/ltversion.m4'
    libtoolize: copying file 'm4/internal/lt~obsolete.m4'
    configure.ac:54: installing './compile'
    configure.ac:20: installing './config.guess'
    configure.ac:20: installing './config.sub'
    configure.ac:7: installing './install-sh'
    configure.ac:7: installing './missing'
    plugins/Makefile.am: installing './depcomp'
    
    Sudo ./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes --enable-static=yes
    
    $sudo make
    $sudo make install
    
    ///From <http://www.friendlyarm.net/forum/topic/5609>
    

  • Moderators

    @MhM93 Then you need to point to tslib in your pro file (because it isn't installed in a directory where the system is looking for libraries by default). Add this:

    LIBS += -L/home/tslib -ltslib
    


  • ######################################################################
    # Automatically generated by qmake (2.01a) Mon May 8 00:23:37 2017
    ######################################################################
    
    TEMPLATE = app
    TARGET = 
    DEPENDPATH += .
    INCLUDEPATH += .
    LIBS += -L/home/tslib -ltslib
    # Input
    SOURCES += main.cpp
    

    I change it but this error display:

    fgit@ubuntu:~/helloqt$ gedit '/home/fgit/helloqt/helloqt.pro' 
    fgit@ubuntu:~/helloqt$ make
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -o Makefile helloqt.pro
    arm-linux-g++ -Wl,-rpath-link,/tmp/FriendlyARM/nanopi2/libs/usr/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -o helloqt main.o    -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/home/tslib -ltslib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -lQtNetwork -lQtCore -lpthread 
    /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld.bfd: cannot find -ltslib
    collect2: error: ld returned 1 exit status
    Makefile:103: recipe for target 'helloqt' failed
    make: *** [helloqt] Error 1
    

  • Lifetime Qt Champion

    Replace /home/tslib by the path to where your cross-compiled tslib can be found



  • I have two tslib folder in my Ubuntu :
    1- /home/tslib
    2- /usr/local/tslib

    I used both of them but the same error occurred:

    fgit@ubuntu:~/helloqt$ make
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -o Makefile helloqt.pro
    arm-linux-g++ -Wl,-rpath-link=/home/tslib/lib,/tmp/FriendlyARM/nanopi2/libs/usr/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -o helloqt main.o    -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/usr/local/tslib/lib -ltslib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -lQtNetwork -lQtCore -lpthread 
    /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld.bfd: cannot find /tmp/FriendlyARM/nanopi2/libs/usr/lib: No such file or directory
    /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld.bfd: cannot find -ltslib
    collect2: error: ld returned 1 exit status
    Makefile:103: recipe for target 'helloqt' failed
    make: *** [helloqt] Error 1
    

  • Moderators

    @MhM93 Where exactly is the *.so file located inside /home/tslib (which by the way is a strange location for a library as /home usually contains home folders for the users of a UNIX/Linux system)?
    It is actually easy: -LPATH - here PATH must be the directory where libtslib.so file is.



  • I search this lib in my ubuntu, there is no file with this name " libtslib.so" , but I install tslib completely.


  • Lifetime Qt Champion

    You build it statically.



  • is it true?

    ./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes --enable-static=no
    

  • Moderators

    @MhM93 Before you wrote:

    Sudo ./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes --enable-static=yes
    

  • Lifetime Qt Champion

    By the way, stop doing everything as root. You should only do the install part as root if needed.



  • thank you for reply and I am exceuse to annoy you,
    @SGaist as you said I used sudo just where nedded.
    @jsulm I delete my tslib from /usr/local and /home and follow this steps :

    $sudo apt-get install git-core
    $cd /usr/local
    $git clone http://github.com/kergoth/tslib.git
    $export PATH=/usr/local/arm/4.7.0/bin:$PATH--> did not do this because my compiler export befor
    $export CROSS_COMPILE=arm-none-linux-gnueabi-
    $export CC=${CROSS_COMPILE}gcc
    $export CFLAGS=-march=armv7l
    $export CXX=${CROSS_COMPILE}"g++" 
    $export AR=${CROSS_COMPILE}"ar" 
    $export AS=${CROSS_COMPILE}"as"
    $export RANLIB=${CROSS_COMPILE}"ranlib"
    $export LD=${CROSS_COMPILE}"ld"
    $export STRIP=${CROSS_COMPILE}"strip"
    $export ac_cv_func_malloc_0_nonnull=yes
    $cd /usr/local/tslib
    $sudo ./autogen-clean.sh
    $sudo ./autogen.sh
    $sudo ./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes --enable-static=yes
    $sudo make
    $sudo make install
    

    then tar my qt4.8.6 again, but that error occurred again, also set the

    LIBS += -L/home/tslib -ltslib
    

    but that error occurred again, you said : "It is actually easy: -LPATH - here PATH must be the directory where libtslib.so file is." there is no file in my ubuntu with this name,
    as my post before this post ,you told me to wrote "ldd ./myprogram" but my program is returned not a dynamic executable but when I wrote this command with nanopc-t2 it returns:

    root@NanoPC-T2:/# ldd ./usr/local/Trolltech/QtEmbedded-4.8.6-arm/demos/embedded/fluidlauncher/fluidlauncher
            libQtGui.so.4 => /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so.4 (0xb668d000)
            libQtNetwork.so.4 => /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtNetwork.so.4 (0xb6595000)
            libQtCore.so.4 => /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so.4 (0xb62d4000)
            libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb62a7000)
            libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6199000)
            libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6121000)
            libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb60f8000)
            libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb600c000)
            libts-1.0.so.0 => /usr/lib/libts-1.0.so.0 (0xb5ffa000)
            libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb5fd8000)
            libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb5fc5000)
            librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb5fae000)
            /lib/ld-linux-armhf.so.3 (0xb6ef5000)
    

    this means these librarys should be install on my ubuntu to compile my program and copy it to device(nanopc-T2) and run with.

    I am been helpless in this field,


  • Moderators

    @MhM93 First: you can see what was installed and where when looking at the output of "make install" - did you check it?
    Second: if the file is not there then it apparently wasn't built.
    You can see what was built looking at the output of make - did you?
    Did you check the tslib build instructions?
    Yes, it is easy if you have the correct lib, but if you don't, well, then you're lost.
    So, please make sure you built tslib as shared library - before that you will not succeed...
    Did you try to change --enable-static=yes to --enable-static=no ?

    Also: I don't know what exactly the file name of the library will be. It should be something like libtslib.so. Just check the content of /home/tslib. And please check the output of make and make install.


  • Lifetime Qt Champion

    And again, stop doing stuff as root, you might be breaking your computer without any warning.

    When building somehting do it somewhere in your home folder. There's no sense in having the sources and the build artifacts of your tslib in /usr/local.



  • @SGaist Thanks for help, I install the tslib from git to home directory, and do the command without sudo command, but when I want to run ./configure command it needs sudo.

    fgit@ubuntu:~/tslib$ ./configure --host=arm-linux --prefix=/home/fgit/libts --enable-
    
    shared=yes --enable-static=no
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-linux-strip... arm-none-linux-gnueabihf-strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether make supports nested variables... (cached) yes
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... arm-unknown-linux-gnu
    checking for arm-linux-gcc... arm-none-linux-gnueabihf-gcc
    checking whether the C compiler works... no
    configure: error: in `/home/fgit/tslib':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    

    this is config log:

    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.
    
    It was created by tslib configure 1.10-rc1, which was
    generated by GNU Autoconf 2.69.  Invocation command line was
    
      $ ./configure --host=arm-linux --prefix=/home/fgit/libts --enable-shared=yes --enable-static=no
    
    ## --------- ##
    ## Platform. ##
    ## --------- ##
    
    hostname = ubuntu
    uname -m = x86_64
    uname -r = 4.4.0-31-generic
    uname -s = Linux
    uname -v = #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016
    
    /usr/bin/uname -p = unknown
    /bin/uname -X     = unknown
    
    /bin/arch              = unknown
    /usr/bin/arch -k       = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo      = unknown
    /bin/machine           = unknown
    /usr/bin/oslevel       = unknown
    /bin/universe          = unknown
    
    PATH: /opt/FriendlyARM/toolchain/4.9.3/bin
    PATH: /home/fgit/bin
    PATH: /home/fgit/.local/bin
    PATH: /usr/local/sbin
    PATH: /usr/local/bin
    PATH: /usr/sbin
    PATH: /usr/bin
    PATH: /sbin
    PATH: /bin
    PATH: /usr/games
    PATH: /usr/local/games
    PATH: /snap/bin
    
    
    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##
    
    configure:2601: checking for a BSD-compatible install
    configure:2669: result: /usr/bin/install -c
    configure:2680: checking whether build environment is sane
    configure:2735: result: yes
    configure:2794: checking for arm-linux-strip
    configure:2821: result: arm-none-linux-gnueabihf-strip
    configure:2886: checking for a thread-safe mkdir -p
    configure:2925: result: /bin/mkdir -p
    configure:2932: checking for gawk
    configure:2962: result: no
    configure:2932: checking for mawk
    configure:2948: found /usr/bin/mawk
    configure:2959: result: mawk
    configure:2970: checking whether make sets $(MAKE)
    configure:2992: result: yes
    configure:3021: checking whether make supports nested variables
    configure:3038: result: yes
    configure:3175: checking whether make supports nested variables
    configure:3192: result: yes
    configure:3223: checking build system type
    configure:3237: result: x86_64-pc-linux-gnu
    configure:3257: checking host system type
    configure:3270: result: arm-unknown-linux-gnu
    configure:3366: checking for arm-linux-gcc
    configure:3393: result: arm-none-linux-gnueabihf-gcc
    configure:3662: checking for C compiler version
    configure:3671: arm-none-linux-gnueabihf-gcc --version >&5
    arm-none-linux-gnueabihf-gcc (ctng-1.21.0-229g-FA) 4.9.3
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    configure:3682: $? = 0
    configure:3671: arm-none-linux-gnueabihf-gcc -v >&5
    Using built-in specs.
    COLLECT_GCC=arm-none-linux-gnueabihf-gcc
    COLLECT_LTO_WRAPPER=/opt/FriendlyARM/toolchain/4.9.3/libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper
    Target: arm-cortexa9-linux-gnueabihf
    Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c,c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long
    Thread model: posix
    gcc version 4.9.3 (ctng-1.21.0-229g-FA) 
    configure:3682: $? = 0
    configure:3671: arm-none-linux-gnueabihf-gcc -V >&5
    arm-none-linux-gnueabihf-gcc: error: unrecognized command line option '-V'
    arm-none-linux-gnueabihf-gcc: fatal error: no input files
    compilation terminated.
    configure:3682: $? = 1
    configure:3671: arm-none-linux-gnueabihf-gcc -qversion >&5
    arm-none-linux-gnueabihf-gcc: error: unrecognized command line option '-qversion'
    arm-none-linux-gnueabihf-gcc: fatal error: no input files
    compilation terminated.
    configure:3682: $? = 1
    configure:3702: checking whether the C compiler works
    configure:3724: arm-none-linux-gnueabihf-gcc -march=armv7l   conftest.c  >&5
    arm-none-linux-gnueabihf-gcc: error: unrecognized argument in option '-march=armv7l'
    arm-none-linux-gnueabihf-gcc: note: valid arguments to '-march=' are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc iwmmxt iwmmxt2 native
    configure:3728: $? = 1
    configure:3766: result: no
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "tslib"
    | #define PACKAGE_TARNAME "tslib"
    | #define PACKAGE_VERSION "1.10-rc1"
    | #define PACKAGE_STRING "tslib 1.10-rc1"
    | #define PACKAGE_BUGREPORT "tslib@lists.infradead.org"
    | #define PACKAGE_URL "http://tslib.org"
    | #define PACKAGE "tslib"
    | #define VERSION "1.10-rc1"
    | /* end confdefs.h.  */
    | 
    | int
    | main ()
    | {
    | 
    |   ;
    |   return 0;
    | }
    configure:3771: error: in `/home/fgit/tslib':
    configure:3773: error: C compiler cannot create executables
    See `config.log' for more details
    
    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##
    
    ac_cv_build=x86_64-pc-linux-gnu
    ac_cv_env_CC_set=set
    ac_cv_env_CC_value=arm-none-linux-gnueabihf-gcc
    ac_cv_env_CFLAGS_set=set
    ac_cv_env_CFLAGS_value=-march=armv7l
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_LDFLAGS_set=
    ac_cv_env_LDFLAGS_value=
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_LT_SYS_LIBRARY_PATH_set=
    ac_cv_env_LT_SYS_LIBRARY_PATH_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=set
    ac_cv_env_host_alias_value=arm-linux
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_func_malloc_0_nonnull=yes
    ac_cv_host=arm-unknown-linux-gnu
    ac_cv_path_install='/usr/bin/install -c'
    ac_cv_path_mkdir=/bin/mkdir
    ac_cv_prog_AWK=mawk
    ac_cv_prog_CC=arm-none-linux-gnueabihf-gcc
    ac_cv_prog_STRIP=arm-none-linux-gnueabihf-strip
    ac_cv_prog_make_make_set=yes
    am_cv_make_support_nested_variables=yes
    
    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##
    
    ACLOCAL='${SHELL} /home/fgit/tslib/missing aclocal-1.15'
    ALLOCA=''
    AMDEPBACKSLASH=''
    AMDEP_FALSE=''
    AMDEP_TRUE=''
    AMTAR='$${TAR-tar}'
    AM_BACKSLASH='\'
    AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
    AM_DEFAULT_VERBOSITY='0'
    AM_V='$(V)'
    AR='arm-none-linux-gnueabihf-ar'
    AUTOCONF='${SHELL} /home/fgit/tslib/missing autoconf'
    AUTOHEADER='${SHELL} /home/fgit/tslib/missing autoheader'
    AUTOMAKE='${SHELL} /home/fgit/tslib/missing automake-1.15'
    AWK='mawk'
    CC='arm-none-linux-gnueabihf-gcc'
    CCDEPMODE=''
    CFLAGS='-march=armv7l'
    CPP=''
    CPPFLAGS=''
    CYGPATH_W='echo'
    DEBUGFLAGS=''
    DEFS=''
    DEPDIR=''
    DLLTOOL=''
    DSYMUTIL=''
    DUMPBIN=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    ENABLE_ARCTIC2_MODULE_FALSE=''
    ENABLE_ARCTIC2_MODULE_TRUE=''
    ENABLE_COLLIE_MODULE_FALSE=''
    ENABLE_COLLIE_MODULE_TRUE=''
    ENABLE_CORGI_MODULE_FALSE=''
    ENABLE_CORGI_MODULE_TRUE=''
    ENABLE_CY8MRLN_PALMPRE_MODULE_FALSE=''
    ENABLE_CY8MRLN_PALMPRE_MODULE_TRUE=''
    ENABLE_DEBOUNCE_MODULE_FALSE=''
    ENABLE_DEBOUNCE_MODULE_TRUE=''
    ENABLE_DEJITTER_MODULE_FALSE=''
    ENABLE_DEJITTER_MODULE_TRUE=''
    ENABLE_DMC_DUS3000_MODULE_FALSE=''
    ENABLE_DMC_DUS3000_MODULE_TRUE=''
    ENABLE_DMC_MODULE_FALSE=''
    ENABLE_DMC_MODULE_TRUE=''
    ENABLE_GALAX_MODULE_FALSE=''
    ENABLE_GALAX_MODULE_TRUE=''
    ENABLE_H3600_MODULE_FALSE=''
    ENABLE_H3600_MODULE_TRUE=''
    ENABLE_IIR_MODULE_FALSE=''
    ENABLE_IIR_MODULE_TRUE=''
    ENABLE_INPUT_MODULE_FALSE=''
    ENABLE_INPUT_MODULE_TRUE=''
    ENABLE_LINEAR_H2200_MODULE_FALSE=''
    ENABLE_LINEAR_H2200_MODULE_TRUE=''
    ENABLE_LINEAR_MODULE_FALSE=''
    ENABLE_LINEAR_MODULE_TRUE=''
    ENABLE_MEDIAN_MODULE_FALSE=''
    ENABLE_MEDIAN_MODULE_TRUE=''
    ENABLE_MK712_MODULE_FALSE=''
    ENABLE_MK712_MODULE_TRUE=''
    ENABLE_PTHRES_MODULE_FALSE=''
    ENABLE_PTHRES_MODULE_TRUE=''
    ENABLE_SKIP_MODULE_FALSE=''
    ENABLE_SKIP_MODULE_TRUE=''
    ENABLE_STATIC_ARCTIC2_MODULE_FALSE=''
    ENABLE_STATIC_ARCTIC2_MODULE_TRUE=''
    ENABLE_STATIC_COLLIE_MODULE_FALSE=''
    ENABLE_STATIC_COLLIE_MODULE_TRUE=''
    ENABLE_STATIC_CORGI_MODULE_FALSE=''
    ENABLE_STATIC_CORGI_MODULE_TRUE=''
    ENABLE_STATIC_CY8MRLN_PALMPRE_MODULE_FALSE=''
    ENABLE_STATIC_CY8MRLN_PALMPRE_MODULE_TRUE=''
    ENABLE_STATIC_DEBOUNCE_MODULE_FALSE=''
    ENABLE_STATIC_DEBOUNCE_MODULE_TRUE=''
    ENABLE_STATIC_DEJITTER_MODULE_FALSE=''
    ENABLE_STATIC_DEJITTER_MODULE_TRUE=''
    ENABLE_STATIC_DMC_DUS3000_MODULE_FALSE=''
    ENABLE_STATIC_DMC_DUS3000_MODULE_TRUE=''
    ENABLE_STATIC_DMC_MODULE_FALSE=''
    ENABLE_STATIC_DMC_MODULE_TRUE=''
    ENABLE_STATIC_GALAX_MODULE_FALSE=''
    ENABLE_STATIC_GALAX_MODULE_TRUE=''
    ENABLE_STATIC_H3600_MODULE_FALSE=''
    ENABLE_STATIC_H3600_MODULE_TRUE=''
    ENABLE_STATIC_IIR_MODULE_FALSE=''
    ENABLE_STATIC_IIR_MODULE_TRUE=''
    ENABLE_STATIC_INPUT_MODULE_FALSE=''
    ENABLE_STATIC_INPUT_MODULE_TRUE=''
    ENABLE_STATIC_LINEAR_H2200_MODULE_FALSE=''
    ENABLE_STATIC_LINEAR_H2200_MODULE_TRUE=''
    ENABLE_STATIC_LINEAR_MODULE_FALSE=''
    ENABLE_STATIC_LINEAR_MODULE_TRUE=''
    ENABLE_STATIC_MEDIAN_MODULE_FALSE=''
    ENABLE_STATIC_MEDIAN_MODULE_TRUE=''
    ENABLE_STATIC_MK712_MODULE_FALSE=''
    ENABLE_STATIC_MK712_MODULE_TRUE=''
    ENABLE_STATIC_PTHRES_MODULE_FALSE=''
    ENABLE_STATIC_PTHRES_MODULE_TRUE=''
    ENABLE_STATIC_SKIP_MODULE_FALSE=''
    ENABLE_STATIC_SKIP_MODULE_TRUE=''
    ENABLE_STATIC_TATUNG_MODULE_FALSE=''
    ENABLE_STATIC_TATUNG_MODULE_TRUE=''
    ENABLE_STATIC_TOUCHKIT_MODULE_FALSE=''
    ENABLE_STATIC_TOUCHKIT_MODULE_TRUE=''
    ENABLE_STATIC_UCB1X00_MODULE_FALSE=''
    ENABLE_STATIC_UCB1X00_MODULE_TRUE=''
    ENABLE_STATIC_VARIANCE_MODULE_FALSE=''
    ENABLE_STATIC_VARIANCE_MODULE_TRUE=''
    ENABLE_STATIC_WAVESHARE_MODULE_FALSE=''
    ENABLE_STATIC_WAVESHARE_MODULE_TRUE=''
    ENABLE_TATUNG_MODULE_FALSE=''
    ENABLE_TATUNG_MODULE_TRUE=''
    ENABLE_TOOLS_FALSE=''
    ENABLE_TOOLS_TRUE=''
    ENABLE_TOUCHKIT_MODULE_FALSE=''
    ENABLE_TOUCHKIT_MODULE_TRUE=''
    ENABLE_UCB1X00_MODULE_FALSE=''
    ENABLE_UCB1X00_MODULE_TRUE=''
    ENABLE_VARIANCE_MODULE_FALSE=''
    ENABLE_VARIANCE_MODULE_TRUE=''
    ENABLE_WAVESHARE_MODULE_FALSE=''
    ENABLE_WAVESHARE_MODULE_TRUE=''
    EXEEXT=''
    FGREP=''
    FREEBSD_FALSE=''
    FREEBSD_TRUE='#'
    GREP=''
    HAIKU_FALSE=''
    HAIKU_TRUE='#'
    HAVE_STRSEP_FALSE=''
    HAVE_STRSEP_TRUE=''
    HURD_FALSE=''
    HURD_TRUE='#'
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    LD='arm-none-linux-gnueabihf-ld'
    LDFLAGS=''
    LIBFLAGS=''
    LIBOBJS=''
    LIBS=''
    LIBTOOL=''
    LIBTS_VERSION_AGE=''
    LIBTS_VERSION_CURRENT=''
    LIBTS_VERSION_REVISION=''
    LINUX_FALSE='#'
    LINUX_TRUE=''
    LIPO=''
    LN_S=''
    LTLIBOBJS=''
    LT_AGE=''
    LT_CURRENT=''
    LT_REVISION=''
    LT_SYS_LIBRARY_PATH=''
    MAKEINFO='${SHELL} /home/fgit/tslib/missing makeinfo'
    MANIFEST_TOOL=''
    MKDIR_P='/bin/mkdir -p'
    NM=''
    NMEDIT=''
    OBJDUMP=''
    OBJEXT=''
    OTOOL64=''
    OTOOL=''
    PACKAGE='tslib'
    PACKAGE_BUGREPORT='tslib@lists.infradead.org'
    PACKAGE_DESCRIPTION='Touchscreen Access Library'
    PACKAGE_NAME='tslib'
    PACKAGE_STRING='tslib 1.10-rc1'
    PACKAGE_TARNAME='tslib'
    PACKAGE_URL='http://tslib.org'
    PACKAGE_VERSION='1.10-rc1'
    PATH_SEPARATOR=':'
    PLUGIN_DIR=''
    RANLIB='arm-none-linux-gnueabihf-ranlib'
    SED=''
    SET_MAKE=''
    SHELL='/bin/bash'
    STRIP='arm-none-linux-gnueabihf-strip'
    TS_CONF=''
    TS_POINTERCAL=''
    VERSION='1.10-rc1'
    VIS_CFLAGS=''
    WINDOWS_FALSE=''
    WINDOWS_TRUE='#'
    ac_ct_AR=''
    ac_ct_CC=''
    ac_ct_DUMPBIN=''
    am__EXEEXT_FALSE=''
    am__EXEEXT_TRUE=''
    am__fastdepCC_FALSE=''
    am__fastdepCC_TRUE=''
    am__include=''
    am__isrc=''
    am__leading_dot='.'
    am__nodep=''
    am__quote=''
    am__tar='$${TAR-tar} chof - "$$tardir"'
    am__untar='$${TAR-tar} xf -'
    bindir='${exec_prefix}/bin'
    build='x86_64-pc-linux-gnu'
    build_alias=''
    build_cpu='x86_64'
    build_os='linux-gnu'
    build_vendor='pc'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='arm-unknown-linux-gnu'
    host_alias='arm-linux'
    host_cpu='arm'
    host_os='linux-gnu'
    host_vendor='unknown'
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh='${SHELL} /home/fgit/tslib/install-sh'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    mkdir_p='$(MKDIR_P)'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    prefix='/home/fgit/libts'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    runstatedir='${localstatedir}/run'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target_alias=''
    
    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##
    
    /* confdefs.h */
    #define PACKAGE_NAME "tslib"
    #define PACKAGE_TARNAME "tslib"
    #define PACKAGE_VERSION "1.10-rc1"
    #define PACKAGE_STRING "tslib 1.10-rc1"
    #define PACKAGE_BUGREPORT "tslib@lists.infradead.org"
    #define PACKAGE_URL "http://tslib.org"
    #define PACKAGE "tslib"
    #define VERSION "1.10-rc1"
    
    configure: exit 77
    

    but when write sudo command all of them (./configure,make and make install) run with no error.
    I copy all from first to home directory and does not use any root directory but those command does not allow me to install without sudo command.

    @jsulm thanks for reply, this is my output and I dont see any error :

    it@ubuntu:~/tslib$ sudo make install 
    Making install in etc
    make[1]: Entering directory '/home/fgit/tslib/etc'
    make[2]: Entering directory '/home/fgit/tslib/etc'
     /bin/mkdir -p '/home/fgit/libts/etc'
     /usr/bin/install -c -m 644 ts.conf '/home/fgit/libts/etc'
    make[2]: Nothing to be done for 'install-data-am'.
    make[2]: Leaving directory '/home/fgit/tslib/etc'
    make[1]: Leaving directory '/home/fgit/tslib/etc'
    Making install in src
    make[1]: Entering directory '/home/fgit/tslib/src'
      CC       ts_attach.lo
      CC       ts_close.lo
      CC       ts_config.lo
      CC       ts_error.lo
      CC       ts_fd.lo
      CC       ts_load_module.lo
      CC       ts_open.lo
      CC       ts_parse_vars.lo
      CC       ts_read.lo
      CC       ts_read_raw.lo
      CC       ts_option.lo
      CC       ts_setup.lo
      CC       ts_version.lo
      CC       ts_strsep.lo
      CCLD     libts.la
    make[2]: Entering directory '/home/fgit/tslib/src'
     /bin/mkdir -p '/home/fgit/libts/lib'
     /bin/bash ../libtool   --mode=install /usr/bin/install -c   libts.la '/home/fgit/libts/lib'
    libtool: install: /usr/bin/install -c .libs/libts.so.0.7.0 /home/fgit/libts/lib/libts.so.0.7.0
    libtool: install: (cd /home/fgit/libts/lib && { ln -s -f libts.so.0.7.0 libts.so.0 || { rm -f libts.so.0 && ln -s libts.so.0.7.0 libts.so.0; }; })
    libtool: install: (cd /home/fgit/libts/lib && { ln -s -f libts.so.0.7.0 libts.so || { rm -f libts.so && ln -s libts.so.0.7.0 libts.so; }; })
    libtool: install: /usr/bin/install -c .libs/libts.lai /home/fgit/libts/lib/libts.la
    libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/fgit/libts/lib
    ----------------------------------------------------------------------
    Libraries have been installed in:
       /home/fgit/libts/lib
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the '-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the 'LD_RUN_PATH' environment variable
         during linking
       - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to '/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
     /bin/mkdir -p '/home/fgit/libts/include'
     /usr/bin/install -c -m 644 tslib.h '/home/fgit/libts/include'
    make[2]: Leaving directory '/home/fgit/tslib/src'
    make[1]: Leaving directory '/home/fgit/tslib/src'
    Making install in plugins
    make[1]: Entering directory '/home/fgit/tslib/plugins'
      CC       linear.lo
      CCLD     linear.la
      CC       dejitter.lo
      CCLD     dejitter.la
      CC       variance.lo
      CCLD     variance.la
      CC       median.lo
      CCLD     median.la
      CC       pthres.lo
      CCLD     pthres.la
      CC       debounce.lo
      CCLD     debounce.la
      CC       skip.lo
      CCLD     skip.la
      CC       iir.lo
      CCLD     iir.la
      CC       ucb1x00-raw.lo
      CCLD     ucb1x00.la
      CC       corgi-raw.lo
      CCLD     corgi.la
      CC       collie-raw.lo
      CCLD     collie.la
      CC       h3600-raw.lo
      CCLD     h3600.la
      CC       mk712-raw.lo
      CCLD     mk712.la
      CC       arctic2-raw.lo
      CCLD     arctic2.la
      CC       tatung-raw.lo
      CCLD     tatung.la
      CC       dmc-raw.lo
      CCLD     dmc.la
      CC       linear-h2200.lo
      CCLD     linear_h2200.la
      CC       input-raw.lo
      CCLD     input.la
      CC       galax-raw.lo
      CCLD     galax.la
      CC       touchkit-raw.lo
      CCLD     touchkit.la
      CC       waveshare-raw.lo
      CCLD     waveshare.la
    make[2]: Entering directory '/home/fgit/tslib/plugins'
     /bin/mkdir -p '/home/fgit/libts/lib/ts'
     /bin/bash ../libtool   --mode=install /usr/bin/install -c   linear.la dejitter.la variance.la median.la pthres.la debounce.la skip.la iir.la ucb1x00.la corgi.la collie.la h3600.la mk712.la arctic2.la tatung.la dmc.la linear_h2200.la input.la galax.la touchkit.la waveshare.la '/home/fgit/libts/lib/ts'
    libtool: warning: relinking 'linear.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o linear.la -rpath /home/fgit/libts/lib/ts linear.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/linear.soT /home/fgit/libts/lib/ts/linear.so
    libtool: install: /usr/bin/install -c .libs/linear.lai /home/fgit/libts/lib/ts/linear.la
    libtool: warning: relinking 'dejitter.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o dejitter.la -rpath /home/fgit/libts/lib/ts dejitter.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/dejitter.soT /home/fgit/libts/lib/ts/dejitter.so
    libtool: install: /usr/bin/install -c .libs/dejitter.lai /home/fgit/libts/lib/ts/dejitter.la
    libtool: warning: relinking 'variance.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o variance.la -rpath /home/fgit/libts/lib/ts variance.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/variance.soT /home/fgit/libts/lib/ts/variance.so
    libtool: install: /usr/bin/install -c .libs/variance.lai /home/fgit/libts/lib/ts/variance.la
    libtool: warning: relinking 'median.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o median.la -rpath /home/fgit/libts/lib/ts median.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/median.soT /home/fgit/libts/lib/ts/median.so
    libtool: install: /usr/bin/install -c .libs/median.lai /home/fgit/libts/lib/ts/median.la
    libtool: warning: relinking 'pthres.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o pthres.la -rpath /home/fgit/libts/lib/ts pthres.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/pthres.soT /home/fgit/libts/lib/ts/pthres.so
    libtool: install: /usr/bin/install -c .libs/pthres.lai /home/fgit/libts/lib/ts/pthres.la
    libtool: warning: relinking 'debounce.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o debounce.la -rpath /home/fgit/libts/lib/ts debounce.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/debounce.soT /home/fgit/libts/lib/ts/debounce.so
    libtool: install: /usr/bin/install -c .libs/debounce.lai /home/fgit/libts/lib/ts/debounce.la
    libtool: warning: relinking 'skip.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o skip.la -rpath /home/fgit/libts/lib/ts skip.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/skip.soT /home/fgit/libts/lib/ts/skip.so
    libtool: install: /usr/bin/install -c .libs/skip.lai /home/fgit/libts/lib/ts/skip.la
    libtool: warning: relinking 'iir.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o iir.la -rpath /home/fgit/libts/lib/ts iir.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/iir.soT /home/fgit/libts/lib/ts/iir.so
    libtool: install: /usr/bin/install -c .libs/iir.lai /home/fgit/libts/lib/ts/iir.la
    libtool: install: /usr/bin/install -c .libs/ucb1x00.so /home/fgit/libts/lib/ts/ucb1x00.so
    libtool: install: /usr/bin/install -c .libs/ucb1x00.lai /home/fgit/libts/lib/ts/ucb1x00.la
    libtool: install: /usr/bin/install -c .libs/corgi.so /home/fgit/libts/lib/ts/corgi.so
    libtool: install: /usr/bin/install -c .libs/corgi.lai /home/fgit/libts/lib/ts/corgi.la
    libtool: install: /usr/bin/install -c .libs/collie.so /home/fgit/libts/lib/ts/collie.so
    libtool: install: /usr/bin/install -c .libs/collie.lai /home/fgit/libts/lib/ts/collie.la
    libtool: install: /usr/bin/install -c .libs/h3600.so /home/fgit/libts/lib/ts/h3600.so
    libtool: install: /usr/bin/install -c .libs/h3600.lai /home/fgit/libts/lib/ts/h3600.la
    libtool: install: /usr/bin/install -c .libs/mk712.so /home/fgit/libts/lib/ts/mk712.so
    libtool: install: /usr/bin/install -c .libs/mk712.lai /home/fgit/libts/lib/ts/mk712.la
    libtool: install: /usr/bin/install -c .libs/arctic2.so /home/fgit/libts/lib/ts/arctic2.so
    libtool: install: /usr/bin/install -c .libs/arctic2.lai /home/fgit/libts/lib/ts/arctic2.la
    libtool: install: /usr/bin/install -c .libs/tatung.so /home/fgit/libts/lib/ts/tatung.so
    libtool: install: /usr/bin/install -c .libs/tatung.lai /home/fgit/libts/lib/ts/tatung.la
    libtool: install: /usr/bin/install -c .libs/dmc.so /home/fgit/libts/lib/ts/dmc.so
    libtool: install: /usr/bin/install -c .libs/dmc.lai /home/fgit/libts/lib/ts/dmc.la
    libtool: warning: relinking 'linear_h2200.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o linear_h2200.la -rpath /home/fgit/libts/lib/ts linear-h2200.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/linear_h2200.soT /home/fgit/libts/lib/ts/linear_h2200.so
    libtool: install: /usr/bin/install -c .libs/linear_h2200.lai /home/fgit/libts/lib/ts/linear_h2200.la
    libtool: warning: relinking 'input.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o input.la -rpath /home/fgit/libts/lib/ts input-raw.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/input.soT /home/fgit/libts/lib/ts/input.so
    libtool: install: /usr/bin/install -c .libs/input.lai /home/fgit/libts/lib/ts/input.la
    libtool: warning: relinking 'galax.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o galax.la -rpath /home/fgit/libts/lib/ts galax-raw.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/galax.soT /home/fgit/libts/lib/ts/galax.so
    libtool: install: /usr/bin/install -c .libs/galax.lai /home/fgit/libts/lib/ts/galax.la
    libtool: install: /usr/bin/install -c .libs/touchkit.so /home/fgit/libts/lib/ts/touchkit.so
    libtool: install: /usr/bin/install -c .libs/touchkit.lai /home/fgit/libts/lib/ts/touchkit.la
    libtool: warning: relinking 'waveshare.la'
    libtool: install: (cd /home/fgit/tslib/plugins; /bin/bash "/home/fgit/tslib/libtool"  --silent --tag CC --mode=relink gcc -DTS_POINTERCAL=\"/home/fgit/libts/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o waveshare.la -rpath /home/fgit/libts/lib/ts waveshare-raw.lo ../src/libts.la )
    libtool: install: /usr/bin/install -c .libs/waveshare.soT /home/fgit/libts/lib/ts/waveshare.so
    libtool: install: /usr/bin/install -c .libs/waveshare.lai /home/fgit/libts/lib/ts/waveshare.la
    libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/fgit/libts/lib/ts
    ----------------------------------------------------------------------
    Libraries have been installed in:
       /home/fgit/libts/lib/ts
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the '-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the 'LD_RUN_PATH' environment variable
         during linking
       - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to '/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
    make[2]: Nothing to be done for 'install-data-am'.
    make[2]: Leaving directory '/home/fgit/tslib/plugins'
    make[1]: Leaving directory '/home/fgit/tslib/plugins'
    Making install in tests
    make[1]: Entering directory '/home/fgit/tslib/tests'
      CC       ts_test.o
      CC       testutils.o
      CC       font_8x8.o
      CC       font_8x16.o
      CC       fbutils-linux.o
      CCLD     ts_test
      CC       ts_test_mt.o
      CCLD     ts_test_mt
      CC       ts_calibrate.o
      CCLD     ts_calibrate
      CC       ts_print.o
      CCLD     ts_print
      CC       ts_print_mt.o
      CCLD     ts_print_mt
      CC       ts_print_raw.o
      CCLD     ts_print_raw
      CC       ts_harvest.o
      CCLD     ts_harvest
      CC       ts_finddev.o
      CCLD     ts_finddev
      CC       ts_verify.o
      CCLD     ts_verify
    make[2]: Entering directory '/home/fgit/tslib/tests'
     /bin/mkdir -p '/home/fgit/libts/bin'
      /bin/bash ../libtool   --mode=install /usr/bin/install -c ts_test ts_test_mt ts_calibrate ts_print ts_print_mt ts_print_raw ts_harvest ts_finddev ts_verify '/home/fgit/libts/bin'
    libtool: install: /usr/bin/install -c .libs/ts_test /home/fgit/libts/bin/ts_test
    libtool: install: /usr/bin/install -c .libs/ts_test_mt /home/fgit/libts/bin/ts_test_mt
    libtool: install: /usr/bin/install -c .libs/ts_calibrate /home/fgit/libts/bin/ts_calibrate
    libtool: install: /usr/bin/install -c .libs/ts_print /home/fgit/libts/bin/ts_print
    libtool: install: /usr/bin/install -c .libs/ts_print_mt /home/fgit/libts/bin/ts_print_mt
    libtool: install: /usr/bin/install -c .libs/ts_print_raw /home/fgit/libts/bin/ts_print_raw
    libtool: install: /usr/bin/install -c .libs/ts_harvest /home/fgit/libts/bin/ts_harvest
    libtool: install: /usr/bin/install -c .libs/ts_finddev /home/fgit/libts/bin/ts_finddev
    libtool: install: /usr/bin/install -c .libs/ts_verify /home/fgit/libts/bin/ts_verify
    make[2]: Nothing to be done for 'install-data-am'.
    make[2]: Leaving directory '/home/fgit/tslib/tests'
    make[1]: Leaving directory '/home/fgit/tslib/tests'
    Making install in tools
    make[1]: Entering directory '/home/fgit/tslib/tools'
      CC       ts_uinput.o
      CCLD     ts_uinput
    make[2]: Entering directory '/home/fgit/tslib/tools'
     /bin/mkdir -p '/home/fgit/libts/bin'
      /bin/bash ../libtool   --mode=install /usr/bin/install -c ts_uinput '/home/fgit/libts/bin'
    libtool: install: /usr/bin/install -c .libs/ts_uinput /home/fgit/libts/bin/ts_uinput
    make[2]: Nothing to be done for 'install-data-am'.
    make[2]: Leaving directory '/home/fgit/tslib/tools'
    make[1]: Leaving directory '/home/fgit/tslib/tools'
    Making install in doc
    make[1]: Entering directory '/home/fgit/tslib/doc'
    make[2]: Entering directory '/home/fgit/tslib/doc'
    make[2]: Nothing to be done for 'install-exec-am'.
     /bin/mkdir -p '/home/fgit/libts/share/man/man1'
     /usr/bin/install -c -m 644 ts_test.1 ts_test_mt.1 ts_calibrate.1 ts_uinput.1 ts_print.1 ts_print_raw.1 ts_print_mt.1 ts_finddev.1 ts_harvest.1 ts_verify.1 '/home/fgit/libts/share/man/man1'
     /bin/mkdir -p '/home/fgit/libts/share/man/man3'
     /usr/bin/install -c -m 644 ts_read.3 ts_read_mt.3 ts_read_raw.3 ts_read_raw_mt.3 ts_open.3 ts_close.3 ts_config.3 ts_setup.3 ts_libversion.3 '/home/fgit/libts/share/man/man3'
     /bin/mkdir -p '/home/fgit/libts/share/man/man5'
     /usr/bin/install -c -m 644 ts.conf.5 '/home/fgit/libts/share/man/man5'
    make[2]: Leaving directory '/home/fgit/tslib/doc'
    make[1]: Leaving directory '/home/fgit/tslib/doc'
    make[1]: Entering directory '/home/fgit/tslib'
    make[2]: Entering directory '/home/fgit/tslib'
    make[2]: Nothing to be done for 'install-exec-am'.
     /bin/mkdir -p '/home/fgit/libts/lib/pkgconfig'
     /usr/bin/install -c -m 644 tslib.pc '/home/fgit/libts/lib/pkgconfig'
    make[2]: Leaving directory '/home/fgit/tslib'
    make[1]: Leaving directory '/home/fgit/tslib'
    

  • Moderators

    @MhM93 said in my cross compiler has error.tslib install but has error:

    /home/fgit/libts/lib/libts.so.0.7.0
    this is the lib (look for "libtool: install: /usr/bin/install -c .libs/libts.so.0.7.0 /home/fgit/libts/lib/libts.so.0.7.0" in the install log). So, you need to add /home/fgit/libts/lib/ to your pro file:

    LIBS += -L/home/fgit/libts/lib -ltslib
    

    When building in home directory there is no need for sudo when calling configure. Why do you think you need sudo?



  • when I did not use sudo this error display:

    fgit@ubuntu:~/tslib$ ./configure --host=arm-linux --prefix=/home/fgit/libts --enable-
    
    shared=yes --enable-static=no
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-linux-strip... arm-none-linux-gnueabihf-strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether make supports nested variables... (cached) yes
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... arm-unknown-linux-gnu
    checking for arm-linux-gcc... arm-none-linux-gnueabihf-gcc
    checking whether the C compiler works... no
    configure: error: in `/home/fgit/tslib':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    

    I dont know why?
    I use that lib in my .pro file

    ######################################################################
    # Automatically generated by qmake (2.01a) Wed May 10 21:39:17 2017
    ######################################################################
    
    TEMPLATE = app
    TARGET = 
    DEPENDPATH += .
    INCLUDEPATH += .
    LIBS += -L/home/fgit/libts/lib -ltslib
    # Input
    SOURCES += main.cpp
    

    this error

    git@ubuntu:~/helloqt$ make
    arm-linux-g++ -Wl,-rpath-link,/tmp/FriendlyARM/nanopi2/libs/usr/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -o helloqt main.o    -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/home/fgit/libts/lib -ltslib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -lQtNetwork -lQtCore -lpthread 
    /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld.bfd: cannot find -ltslib
    collect2: error: ld returned 1 exit status
    Makefile:103: recipe for target 'helloqt' failed
    make: *** [helloqt] Error 1
    

    I change .pro to this and this is the error:

    ######################################################################
    # Automatically generated by qmake (2.01a) Wed May 10 21:39:17 2017
    ######################################################################
    
    TEMPLATE = app
    TARGET = 
    DEPENDPATH += .
    INCLUDEPATH += .
    LIBS += -L/home/fgit/libts/lib -lts
    # Input
    SOURCES += main.cpp
    

    0_1494482094283_Untitled.jpg


  • Lifetime Qt Champion

    Then there's something messed up with your cross-compiler installation. You shouldn't need to be root to cross-compile.

    First thing ensure that you are doing that from a clean state. Then check the complete log as to why the configure script can't use the cross-compiler properly.


  • Moderators

    @MhM93 said in my cross compiler has error.tslib install but has error:

    I change .pro to this and this is the error:

    What is the error?
    Did you rerun qmake after changing the pro file?



  • @jsulm :yes, I change .pro and and run qmake and then make command. the error is in the picture
    @SGaist I want to run another new ubuntu to install of them from the first. all of the things need /usr/ directory should come with sudo command. so my compiler install with sudo command. I decide to do all steps again with new ubuntu. (this is my 3rd ubuntu :D ) I wish I can


  • Moderators

    @MhM93 Picture sharing does not work here. Please post the error text.

    "all of the things need /usr/ directory" - why do you want to have the stuff in /usr?



  • git@ubuntu:~/helloqt$ make
    arm-linux-g++ -Wl,-rpath-link,/tmp/FriendlyARM/nanopi2/libs/usr/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -o helloqt main.o    -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/home/fgit/libts/lib -ltslib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -lQtNetwork -lQtCore -lpthread 
    /home/fgit/libts/libts.so:file not recognized:File format not recognized
    collect2: error: ld returned 1 exit status
    Makefile:103: recipe for target 'helloqt' failed
    make: *** [helloqt] Error 1
    

    that is the error. when I extract the zip file they placed in /usr/local/ directory. I can not change the directory. This toolchain is https://www.mediafire.com/folder/ilkcy37otd7il/NanoPi2Board#a0l72ygtz0797 that I download and install it


  • Lifetime Qt Champion

    What does file libts.so return ?



  • fgit@ubuntu:~$ file ~/libts/lib/libts.so
    /home/fgit/libts/lib/libts.so: symbolic link to libts.so.0.7.0
    fgit@ubuntu:~$ file ~/libts/lib/libts.so.0.7.0 
    /home/fgit/libts/lib/libts.so.0.7.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=a6de3ac1d75c3420a9ecfb7bd34a42bda7524169, not stripped
    fgit@ubuntu:~$
    

  • Moderators

    @MhM93 You built it for X86 not for ARM...



  • but I do this with my compiler path

    export PATH=/usr/local/arm/4.7.0/bin:$PATH
    export CROSS_COMPILE=arm-none-linux-gnueabi-
    export CC=${CROSS_COMPILE}gcc
    export CFLAGS=-march=armv7l
    export CXX=${CROSS_COMPILE}"g++" 
    export AR=${CROSS_COMPILE}"ar" 
    export AS=${CROSS_COMPILE}"as"
    export RANLIB=${CROSS_COMPILE}"ranlib"
    export LD=${CROSS_COMPILE}"ld"
    export STRIP=${CROSS_COMPILE}"strip"
    export ac_cv_func_malloc_0_nonnull=yes
    

  • Lifetime Qt Champion

    Check the configure script options. There's something like --host=arm-none-linux-gnueabi IIRC.



  • really thanksssssssssssssssssssssssssss
    It compile without error with this command, at last.

    sudo ./configure --host=arm-none-linux-gnueabihf --prefix=/home/tslib --enable-shared=yes --enable-static=no
    

    but when I copy the exe file to my arm device it again show me this error:

    root@NanoPC-T2:/# tftp 192.168.101.4
    tftp> get helloqt
    Received 11692 bytes in 0.4 seconds
    tftp> quit
    root@NanoPC-T2:/# . setqt4env
    ctp = 1
    root@NanoPC-T2:/# chmod +x helloqt
    root@NanoPC-T2:/# ./helloqt -qws &
    [1] 1409
    root@NanoPC-T2:/# ./helloqt -qws
    [1]+  Segmentation fault      ./helloqt -qws
    Segmentation fault
    root@NanoPC-T2:/# ldd ./helloqt
            not a dynamic executable
    root@NanoPC-T2:/# file ./helloqt
    ./helloqt: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading (Invalid argument)
    
    

  • Moderators

    @MhM93 said in my cross compiler has error.tslib install but has error:

    [1]+ Segmentation fault ./helloqt -qws

    This is another problem. Try to start your app in a debugger to see what happens.
    Also why do you start it twice:

    root@NanoPC-T2:/# ./helloqt -qws &
    [1] 1409
    root@NanoPC-T2:/# ./helloqt -qws
    

    ?



  • I do not install qt creator to see debug mood in my pc, and also this program is run on nanopc-t2 when I wrote this command it returns :

    root@NanoPC-T2:/# strace ./helloqt
    execve("./helloqt", ["./helloqt"], [/* 20 vars */]) = 0
    brk(NULL)                               = 0x21000
    uname({sysname="Linux", nodename="NanoPC-T2", ...}) = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f67000
    access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
    --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x4} ---
    +++ killed by SIGSEGV +++
    Segmentation fault
    

    Also why do you start it twice:
    with silly reason. I just test what happen to run command with & and without it. :)


  • Moderators

    @MhM93 You don't need to install QtCreator to debug (QtCreator itself does not have a debugger). Just install gdb on your target device and use it. It looks like your app is running except you try to run two instances at the same time.


  • Moderators



  • thanks for reply. but i just play one application.
    oot@NanoPC-T2:/# rm helloqt
    root@NanoPC-T2:/# tftp 192.168.101.4
    tftp> get helloqt
    Received 11692 bytes in 0.5 seconds
    tftp> quit
    root@NanoPC-T2:/# chmod +x helloqt
    root@NanoPC-T2:/# ./helloqt -qws
    Segmentation fault
    root@NanoPC-T2:/# file ./helloqt
    ./helloqt: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading (Invalid argument)
    root@NanoPC-T2:/#


  • Lifetime Qt Champion

    Again, run it through the debugger.

    By the way, what is the exact architecture of your device ?
    What Linux distribution are you running on it ?



  • thanks for reply,
    I should install debugger on my host or on my target?
    this is my device:

    root@NanoPC-T2:/# uname -a
    Linux NanoPC-T2 3.4.39-s5p4418 #1 SMP PREEMPT Wed Mar 1 13:21:10 HKT 2017 armv7l armv7l armv7l GNU/Linux
    

    when I run gdb on my device (nanopc-t2):

    root@NanoPC-T2:/# gdb -q helloqt
    "/helloqt": not in executable format: File truncated
    

    and also when I run this:

    root@NanoPC-T2:/# sudo readelf -a ./helloqt | grep NEEDED
    readelf: Error: Reading 0x618 bytes extends past end of file for section headers
    readelf: Error: Section headers are not available!
     0x00000001 (NEEDED)
    

    Is that mean my header is wrong?
    this is my code:

    #include <QApplication>
    #include <QPushButton>
    int main(int argc, char **argv)
    {
            QApplication app (argc, argv);
            QPushButton button ("Hello world !");
            button.show();
            return app.exec();
    }
    

  • Lifetime Qt Champion

    Looks like there is a problem with your file. How are you copying it over to your device ?



  • *I copy it by tftp. First I copy it from ubuntu vmware to windows then wrote this command to copy it to my device:

    tftp 192.168.101.4
    tftp>get helloqt
    //after transfering.....
    tftp>quit
    

    first run this command

    . setqt4env
    

    and after that run this command, I make my file runable with this command:

    chmod +x helloqt
    

    then I run it with this command but that error show to me:

    ./helloqt -qws
    

    ................................................................................................................................................................................
    FINALLY RUN MY APP ON ME DEVICE BUT MAKE A LOT OF QUESTION FOR ME:
    .............................................................................................................................................................................
    I set my ssh to deploy the qt (from vmware ubuntu to my nanopc) also set this to .pro file:

    #-------------------------------------------------
    #
    # Project created by QtCreator 2017-05-13T01:48:28
    #
    #-------------------------------------------------
    
    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    target.path = ~/helloqt
    INSTALLS += target
    
    TARGET =
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
           mainwindow.cpp
    
    HEADERS  += mainwindow.h
    
    FORMS    += mainwindow.ui
    

    and set -qws in argument and suddenly see the project run on my device BUT the touch is not worked
    when I copy the file to my device as I said above* the app is can not run. what is the different from my code runable and qt runable app?


  • Lifetime Qt Champion

    Why don't you upload it directly to your device ?
    Using e.g. scp ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.