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. Qt 4.8.6 source code cross compile problem : ": not found"
Forum Updated to NodeBB v4.3 + New Features

Qt 4.8.6 source code cross compile problem : ": not found"

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 2.2k Views 2 Watching
  • 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.
  • S Offline
    S Offline
    sbahadirarslan
    wrote on last edited by sbahadirarslan
    #1

    Hello,
    I am trying to compile Qt4.8.6 source code. First of all,
    I am using linaro's toolchain gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf.
    I am working on Ubuntu 16.04.3 LTS.
    I performed the following operations respectively :

    • 1 - I created a sample directory with copy and paste in mkspecs/qws directory and its name is linux-am335x-g++.

    • 2- Then I rearranged the qmake.conf file like 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)
    
    # Compiler Flags to take advantage of the ARM architecture
    QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard
    QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard
    
    # modifications to g++.conf
    QMAKE_CC                = arm-linux-gnueabihf-gcc
    QMAKE_CXX               = arm-linux-gnueabihf-g++
    QMAKE_LINK              = arm-linux-gnueabihf-g++
    QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++
    
    # modifications to linux.conf
    QMAKE_AR                = arm-linux-gnueabihf-ar cqs
    QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
    QMAKE_STRIP             = arm-linux-gnueabihf-strip
    
    load(qt_config)
    
    • 3- I write my_config script like this :
    #!/bin/sh
    ./configure -opensource -confirm-license -prefix /home/sbahadirarslan/qt_workspace/qt_build -embedded arm -xplatform qws/linux-am335x-g++ -little-endian -static -no-webkit -nomake examples -nomake demos -nomake docs -nomake translations
    
    • 4- Last I rearranged PATH variable like this : (/opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin contains toolchain binaries)
    /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
    

    But when I run my_config bash file, I get following errors :

    You have not explicitly asked to use pkg-config and are cross-compiling.
    pkg-config will not be used to automatically query cflag/lib parameters for
    dependencies
    
    /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++: 1: /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++: /
                                                                                                                                                                                                    : not found
    /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++: 1: /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++: /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++: 1: /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++: /
                                                                                                                                                                                     : not found
    ELF: not found
    /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++: 2: /opt/toolchain/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++: Syntax error: word unexpected (expecting ")")
    ln: failed to create symbolic link '/home/sbahadirarslan/qt_workspace/qt-everywhere-opensource-src-4.8.6/include/QtCore/qconfig.h': File exists
    ln: failed to create symbolic link '/home/sbahadirarslan/qt_workspace/qt-everywhere-opensource-src-4.8.6/include/Qt/qconfig.h': File exists
    

    By the way, before running the my_config script, I do make confclean.

    I could not solve the cause of this error. Please help me about this situation.
    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi and welcome to devnet,

      First two recommendations:

      • If you can't use Qt 5 then at least use the latest Qt 4 which is 4.8.7
      • Use out of source builds, that way if something goes wrong you can just nuke the build folder and start again.

      Can you execute arm-linux-gnueabihf-gcc from the command line once you tweaked the PATH environment variable ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sbahadirarslan
        wrote on last edited by
        #3

        I found the problem.
        First I tried to compile hello.c code with arm-linux-gnueabi-gcc and I got this error :

        Exec format not found
        

        And then I checked my processor type with

        uname -p
        

        Then I got i686.

        Then I checked arm-linux-gnueabi-gcc with file command. And I realize that this toolchain is 64 bit toolchain.
        Then I install 64 bit ubuntu and problem solved.

        1 Reply Last reply
        2
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Glad you found out and thanks for the feedback !

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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