Unsolved Project ERROR: CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE
-
I am installing to cross compile from raspberry to ubuntu 64bit.
However, the following error occurred while attempting make.
The error below is interpreted as translator, so there may be errors.
//error contetns..
Cd qtbase / && (test -e Makefile || /root/Qt/5.4/Src/qtbase/bin/qmake/root/Qt/5.4/Src/qtbase/qtbase.pro -o Makefile) && make -f Makefile
Make [1]: enter directory '/root/Qt/5.4/Src/qtbase'
/opt/Qt/5.4/Src/qtbase/bin/qmake -o Makefile qtbase.pro
Project ERROR: CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE = <path>
Could not read qmake configuration file /root/Qt/5.4/Src/qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf.
Error processing project file: qtbase.pro
Makefile: 175: Command to 'Makefile' target failed
Make [1]: *** [Makefile] error 3
Make [1]: Exits directory '/root/Qt/5.4/Src/qtbase'
Makefile: 68: 'module-qtbase-make_first' Command to target failed
Make: *** [module-qtbase-make_first] Error 2Can you help me?
-
Hi and welcome to devnet,
Please show the configuration options you passed
-
@SGaist Could you elaborate for me?
What configuration options are you referring to? -
@SGaist I am trying crosscompile with qt5.4 in raspberry pie.
This is an error that occurred while executing the following command on ubuntu pc.
///////////////////////////////////////////////////////////////////////sudo apt-get upgrade sudo apt-get update sudo apt-get install libgl1-mesa-dev sudo apt-get build-dep qt5-default sudo apt-get install libxcb-xinerama0-dev sudo apt-add-repository ppa:u-szeged/sedkit sudo apt-get update sudo apt-get install sedkit-env-qtwebkit sudo apt-get install build-essential perl python git sudo apt-get install “^libxcb.*” libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libcap-dev libxtst-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libxss-dev libegl1-mesa-dev gperf bison sudo apt-get install libbz2-dev libgcrypt11-dev libdrm-dev libcups2-dev libatkmm-1.6-dev sudo apt-get install libasound2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev mkdir ~/crosscompile-tools cd ~/crosscompile-tools git clone https://github.com/raspberrypi/tools.git Cd tools wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py chmod +x sysroot-relativelinks.py./sysroot-relativelinks.py cd cross-compile-tools sudo apt-get install lib32z1 https://www.raspberrypi.org/downloads/raspbian/ /mnt/rasp-pi-rootfs sudo mkdir /mnt/rasp-pi-rootfs fdisk -l raspbian.img sudo mount raspbian.img -o loop,offset=$(( 512 * 137216)) /mnt/rasp-pi-rootfs/ sudo ./sysroot-relativelinks.py /mnt/rasp-pi-rootfs ./fixQualifiedLibraryPaths /mnt/rasp-pi-rootfs ~/crosscompile-tools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc export RPI_SYSROOT=/mnt/rasp-pi-rootfs export RPI_TOOLCHAIN=~/crosscompile-tools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- cd ~/QT/ ls cd 5.4 cd Src ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -skip qtwebkit sudo make
////////////////////////////////////////////////////////////////
./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -skip qtwebkit
The command succeeded as the picture.
![alt text]( image url)
It is an error when executing the next command sudo make command.
I cross-compiled with reference to this homepage.
https://medium.com/@amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c -
Are you sure you did the export properly for RPI_TOOLCHAIN ?
The image upload is currently broken. Please take a look at this thread for alternatives..
-
This post is deleted! -
@SGaist I will show you all the commands I have installed and the results.
I would be grateful if you could tell me where and what I did wrong.
mkdir ~/crosscompile-toolscd ~/crosscompile-tools git clone https://github.com/raspberrypi/tools.git cd tools
![alt text]( image url)
wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py chmod +x sysroot-relativelinks.py./sysroot-relativelinks.py
![alt text]( image url)
and,
I got an error in the above command, and I ran arbitrarily with the following command.chmod +x sysroot-relativelinks.py
![alt text]( image url)
Command was executed.
I do not know if this is correct.
Is this part wrong?I then ran the following commands.
cd cross-compile-tools sudo apt-get install lib32z1
The cross-compile-tools folder is not created, so I created it myself and ran the following command 'sudo apt-get install lib32z1'
Are you sure this is wrong?![alt text]( image url)
https://www.raspberrypi.org/downloads/raspbian/
Raspbian.img I installed and unzipped the image and ran mount as below.
/mnt/rasp-pi-rootfs sudo mkdir /mnt/rasp-pi-rootfs fdisk -l raspbian.img sudo mount raspbian.img -o loop,offset=$(( 512 * 137216)) /mnt/rasp-pi-rootfs/
I got the following results.
![alt text]( image url)
![alt text]( image url)
sudo ./sysroot-relativelinks.py /mnt/rasp-pi-rootfs ./fixQualifiedLibraryPaths /mnt/rasp-pi-rootfs ~/crosscompile-tools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc
![alt text]( image url)
It takes a few seconds to execute the command, but I have already done so, and I have returned the results immediately.
Are you sure this is wrong?export RPI_SYSROOT=/mnt/rasp-pi-rootfs export RPI_TOOLCHAIN=~/crosscompile-tools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
![alt text]( image url)
cd /opt/Qt/5.4 ls cd Src
![alt text]( image url)
./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -skip qtwebkit
![alt text]( image url)
sudo makeSudo make will also display the following error:
![alt text]( image url)
Please help me,
Please tell me where and how it went wrong and how to solve itBut how do you upload the pictures?
Did my picture upload well? -
This post is deleted!