Welcome to raspberry-pi-cross-compilers Discussions! #68
Replies: 10 comments 39 replies
-
Hi, But when I will compile my project I get the error sys/cdefs.h:No such file or directory Thank you for helping hand and the instruction. kind regards |
Beta Was this translation helpful? Give feedback.
-
Dear Abhishek,
thank you for your fast response.
I do the steps from your instruction and then I configurate the QT Creator (see the pictures attached).
If you need more please let it know me.
Thank you!
|
Beta Was this translation helpful? Give feedback.
-
Hi, And then I configure QT Creator |
Beta Was this translation helpful? Give feedback.
-
The QT Creator is the newest version I get, it is a new installation Qt Creator 4.15.0 Here is the output file |
Beta Was this translation helpful? Give feedback.
-
I had a similar issue, and I solved it in a similar way. But I think I found where the issue came from. It's from step 10 in the guide; the symbolic links. sudo ln -sf -r /usr/include/arm-linux-gnueabihf/sys /usr/include these two in particular always fail for me, because the directories already exist. So the symbolic links are never created. And /sys/ happens to be the directory containing cdefs.h. I was meaning to ask whether you knew a way to without using symbolic links when I found this topic. Another unrelated issue: Step 8 indirectly looks for openjdk-11-jre-headless. It has some dependencies which are apparently not ready for rpi0 yet. So purging openjdk-11-jre-headless and installing openjdk-8-jre-headless did it for me. |
Beta Was this translation helpful? Give feedback.
-
Hi abhiTronix, I'm trying to cross-compile for the Rasp zero w and struggling with getting a library (portaudio) to compile with the cross-compiler following this guide: https://github-wiki-see.page/m/abhiTronix/raspberry-pi-cross-compilers/wiki/Cross-Compiler-CMake-Usage-Guide-with-rsynced-Raspberry-Pi-32-bit-OS. My setup: I've managed to get the bare minimum to compile and can confirm that it works on my zero W. Problem # 1:
Which solved that problem. Problem # 2:
This solved the problem. Problem # 3: Is it likely to be that by removing the sysroot is the problem here? Or am I being silly and forgetting to add an option? I've trawled the internet and found very little on this problem. |
Beta Was this translation helpful? Give feedback.
-
@renebokhorst This isn't the solution. Problem is somewhere else. Can you first try cross-compiling simple example given in https://github.com/abhiTronix/raspberry-pi-cross-compilers/wiki/Cross-Compiler-CMake-Usage-Guide-with-rsynced-Raspberry-Pi-32-bit-OS#cross-compiler-cmake-usage-guide-with-rsynced-raspberry-pi-32-bit-os doc to narrow down the problem? Try replicating each step exactly as possible specially check if all symlinks are created successfully since it's the primary reason behind |
Beta Was this translation helpful? Give feedback.
-
Okay, so, let's say I wrote a program entirely on my windows PC and I need a library. I link that library using it's .lib file and then add it's includes to the project and then use it in whatever way I need to. Then I compile the project down to an executable and then pass the .dll file to the compiled program so that it has access to the library files. I also don't want to have to recompile every library that I use on each fresh compile, which could take a while as I intend to use a few math libraries So, if I'm wanting port this for raspberry pi zero, I should surely be able to link a library file and then compile for that target architecture using the cross compiler? Not, recompile portaudio within the project files. I rebuilt portaudio to make sure I had a binary which worked on the pi as it doesn't seem to run correctly when building using the binaries gernerated on the host. |
Beta Was this translation helpful? Give feedback.
-
Thanks to you, I am compiling the compilation environment by following along.
But I get an error saying that aarch64-gcc cannot be found. There is no problem with the path. The articles you have compiled are organized based on x84. ../qt-everywhere-src-5.15.2/configure -release -opengl es2 -eglfs -device linux-rasp-pi4-v3d-g++ -device-option CROSS_COMPILE=$(echo $CROSS_COMPILER_LOCATION)/bin/aarch64-linux-gnu- -sysroot ~/rpi-qt/sysroot/ -prefix /usr/local/qt5.15 -extprefix ~/rpi-qt/qt5.15 -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtwebengine -nomake tests -make libs -pkg-config -no-use-gold-linker -v -recheck -L$HOME/rpi-qt/sysroot/usr/lib/aarch64-linux-gnu -I$HOME/rpi-qt/sysroot/usr/include/aarch64-linux-gnu I'll upload my configure too. Please tell me which part is wrong.
I also tried changing the path of qmake, but the result is the same. |
Beta Was this translation helpful? Give feedback.
-
Thank you for answer. I followed the site you recommended. From the Build Dummy Hello-World Project part I don't quite understand. Is the process necessary?
And -march=armv8-a+fp+simd where should I put this option? Can I put it in the configure option? |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
Beta Was this translation helpful? Give feedback.
All reactions