Solved Cross-compiling with diffrent motherboard
-
Yes, I use it on purpose.
Qt Creator version 5.15.2.
I don't understand your last question. I downloaded and installed using the commands below. As a folder, I show the~/linaro/sysroot
folder as the path.
wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py chmod +x sysroot-relativelinks.py ./sysroot-relativelinks.py sysroot
-
@Buket said in Cross-compiling with diffrent motherboard:
This script does not download the sysroot.
So, how did you get the sysroot?
Or is there anything inside ~/linaro/sysroot?
Sysroot is usually a copy of the root file system of the target device. Especially /usr/lib and /usr/include folders are important, so the headers and libs can be found. -
@jsulm
I got it from target device using similar command below.rsync -avz device@ip_address:/usr/include sysroot/usr
It contains the folders you mentioned.
-
@Buket But you also got /usr/lib* from your target device?
-
@jsulm
I got the following folders from the target device.rsync -avz device@ip_address:/usr/include sysroot/usr rsync -avz device@ip_address:/lib sysroot rsync -avz device@ip_address:/usr/lib sysroot/usr
What I suspect is that I chose it wrong.
gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf
I don't know how I should choose the toolchain. I think the error I am getting is due to the incompatibility.
-
@Buket said in Cross-compiling with diffrent motherboard:
Yes, I use it on purpose.
Why ?
How old is your sysroot compared to your toolchain ? -
@SGaist
I was watching a youtube video for cross-compile and I didn't want to use a different tool and get an error.
I changed the toolchain I used after your comment. You can see the version below. I cannot comment on sysroot, but I leave the command and link I used to download it below.toolchain version :
gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf
sysroot link :
wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
-
@Buket said in Cross-compiling with diffrent motherboard:
but I leave the command and link I used to download it below.
Once again, that link provides you with a Python script to adjust symlinks to be relative in your sysroot folder, which you need to create/update from your device into your host machine.
-
@Pablo-J-Rogina I understand what you mean, but I don't understand what you mean about it being old. The day I cross-compiled, I created sysroot and got the necessary files from the target device. If that's what you're talking about, sysroot is up to date, but if you're talking about something different, can you tell me how I can find out?
-
@Buket said in Cross-compiling with diffrent motherboard:
Edit :
I solved the problem here. I updated sysroot and before correcting my configure command, I prepared a qmake.conf file suitable for the processor of my motherboard. I adjusted the paths accordingly and got an error-free output.
Configure command:
./configure -static -release -opengl es2 -device linux-jetway-arm-g++ -device-option CROSS_COMPILE=~/linaro/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -no-eglfs -sysroot ~/linaro/sysroot -opensource -confirm-license -prefix /usr/local/qt5li -extprefix ~/linaro/qt5li -hostprefix ~/linaro/qt5 -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtdatavis3d -nomake examples -make libs -pkg-config -no-use-gold-linker -v
I can also optionally share the qmake.conf file. Thanks for your help.