Error when trying to build Qt



  • I'm trying to build a version of Qt that will give me a qmake for the Beaglebone Black. I've downloaded the source, and have run the following command (with the resultant error shown):

    mzimmers@debian:~/Qt/5.8/QtBuild$ ../Src/configure -platform linux-g++ -xplatform linux-arm-gnueabi-g++
    + cd qtbase
    + /home/mzimmers/Qt/5.8/Src/qtbase/configure -top-level -platform linux-g++ -xplatform linux-arm-gnueabi-g++
    .
    .
    .
    Preparing build tree...
    /home/mzimmers/Qt/5.8/Src/qtbase/configure: 1320: /home/mzimmers/Qt/5.8/Src/qtbase/configure: arm-linux-gnueabi-g++: not found
    Creating qmake...
    .
    .
    .
    

    So, I guess my question is, why is it looking for something named arm-linux-etc instead of linux-arm-etc as I specified on the command line? Did I miss a set up step? I'm trying to follow a tutorial on how to do this on a Wintel box, so I'm kind of feeling my way along.

    Thanks.


  • Lifetime Qt Champion

    Hi,

    Take a look at the mkspec linux-arm-gnueabi-g++

    The file contains the information about the compiler, linker, etc. to use.



  • I just tried it with the downloaded source tarball and got the same error. I tried cloning the git repository instead and did not get the error, so you can try that. Building Qt 5 from Git



  • @SGaist said in error when trying to build Qt:

    Hi,

    Take a look at the mkspec linux-arm-gnueabi-g++

    The file contains the information about the compiler, linker, etc. to use.

    Hi, SGaist -

    Sure enough...all the variables in the qmake.conf file are arm-linux-something.

    So...is this an error? I'm not familiar enough with that toolchain to know which is correct.

    mz


  • Lifetime Qt Champion

    Should not be an error, no, however the compiler names can easily change depending on the provider.

    Where did you get the cross-compiler from ?



  • To be honest, I'm not 100% sure, but the tar file in my downloads folder suggests I got it from linaro.

    The above is incorrect. I just extracted from my linaro binary and the names seem to match what the config file expects. I'm doing more research right now, but wanted to update this to correct the error.



  • I'm still not sure I'm translating this tutorial from Wintel to Linux correctly. Here's the command I run:

    ~/Qt/5.8/Src/configure -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -release -device linux-beagleboard-g++ \
    -sysroot /opt/arm-toolchain/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf \
    -prefix /opt/QtForBBB 
    
    

    And here's the error I get:

    Project ERROR: CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=<path>
    Could not read qmake configuration file /home/mzimmers/Qt/5.8/Src/qtbase/mkspecs/devices/linux-beagleboard-g++/qmake.conf.
    Error processing project file: /home/mzimmers/Qt/5.8/Src/qt.pro
    
    

    I'm not sure what that first error is telling me. And the second line seems just wrong: that directory and file does indeed exist. Any idea what might be going on?

    Thanks.


  • Lifetime Qt Champion

    Here you have the options for cross-compilation explained.



  • Hi, SGaist -

    I did read that page. Later in the tutorial, it says to add the CROSS_COMPILE variable as follows:

    -device-option CROSS_COMPILE=C:/SysGCC/Beaglebone/bin/arm-linux-gnueabihf- -qt-xcb
    

    Obviously the path needs to be changed, so I formed it like this:

    -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \
    -qt-xcb 
    

    One thing I didn't understand from the Wintel example was the purpose of the trailing "-" character on the file path. Is that possibly what's causing me trouble here?

    Thanks.

    PS: I suppose I should reference the tutorial I'm trying to use:

    tutorial

    And, step 13 doesn't seem to apply to my build. My configure file is much smaller than the one in the tutorial (as evidenced by the line numbers) and there's no condition to change.



  • Bump. Anyone? I'm sure this is a really trivial issue, but I'm at a loss.

    Thank you.


  • Lifetime Qt Champion

    Small note, it was due to a missing sysroot and needed the -no-opengl switch since the linaro sysroot does not contain the OpenGL enabler for the BBB.


Log in to reply
 

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