-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/usr/include/features.h:424:12: fatal error: sys/cdefs.h #64
Comments
@vrichomme Support for Raspberry Pi 4 (Buster 64bit) is still in development. Wait for PR #62 to be merged or compile it manually on a Linux system as follows: # update your system
sudo apt update && sudo apt dist-upgrade
# install prerequisites
sudo apt-get -y install gcc g++ gperf flex texinfo gawk gfortran texinfo bison \
build-essential openssl unzip wget git pigz \
libncurses-dev autoconf automake tar figlet
# clone patch
git clone https://github.com/abhiTronix/raspberry-pi-cross-compilers.git && cd raspberry-pi-cross-compilers
git checkout patch@buildscript
# and compile binary:
cd build-scripts
./RTBuilder_64b -g "10.2.0" -o "buster" |
Do I need to run it on the raspbian or on a x86_64 host ? |
Yeah obviously you'll need any x86_64 linux machine/system to cross-compile for raspberry pi. You can't cross-compile for raspberry pi itself. |
Script will generate two files: |
Ok I compiled the native and copied it but still the same error... pi@jarvis2:~/Dev $ gcc -v -v |
@vrichomme Did you setup the important symbolic links as mentioned in wiki docs : sudo ln -sf /usr/include/aarch64-linux-gnu/asm/* /usr/include/asm
sudo ln -sf /usr/include/aarch64-linux-gnu/gnu/* /usr/include/gnu
sudo ln -sf /usr/include/aarch64-linux-gnu/bits/* /usr/include/bits
sudo ln -sf /usr/include/aarch64-linux-gnu/sys/* /usr/include/sys
sudo ln -sf /usr/include/aarch64-linux-gnu/openssl/* /usr/include/openssl
sudo ln -sf /usr/lib/aarch64-linux-gnu/crtn.o /usr/lib/crtn.o
sudo ln -sf /usr/lib/aarch64-linux-gnu/crt1.o /usr/lib/crt1.o
sudo ln -sf /usr/lib/aarch64-linux-gnu/crti.o /usr/lib/crti.o |
My bad. now it works. Sorry for the noise. |
@vrichomme Idk sometimes we need |
@vrichomme Ok these are new commands: sudo ln -sf /usr/include/aarch64-linux-gnu/asm/* /usr/include/asm/
sudo ln -sf /usr/include/aarch64-linux-gnu/gnu/* /usr/include/gnu/
sudo ln -sf /usr/include/aarch64-linux-gnu/bits/* /usr/include/bits/
sudo ln -sf /usr/include/aarch64-linux-gnu/sys/* /usr/include/sys/
sudo ln -sf /usr/include/aarch64-linux-gnu/openssl/* /usr/include/openssl/
sudo ln -sf /usr/lib/aarch64-linux-gnu/crtn.o /usr/lib/crtn.o
sudo ln -sf /usr/lib/aarch64-linux-gnu/crt1.o /usr/lib/crt1.o
sudo ln -sf /usr/lib/aarch64-linux-gnu/crti.o /usr/lib/crti.o |
Hi,
I have a raspberry pi 4 8Gb running raspbian 64 bits (Buster):
pi@jarvis2:
/Dev $ lsb_release -a/Dev $ uname -aNo LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
pi@jarvis2:
Linux jarvis2 5.10.5-v8+ #1392 SMP PREEMPT Sat Jan 9 18:56:30 GMT 2021 aarch64 GNU/Linux
(I have downloaded native-gcc-10.2.0-pi_64.tar.gz)
sudo tar xvf ~/Downloads/native-gcc-10.2.0-pi_64.tar.gz -C /opt/
sudo mv /opt/native-pi-gcc-10.2.0-64 /opt/gcc-10.2.0
echo 'export PATH=/opt/gcc-10.2.0/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/opt/gcc-10.2.0/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
. ~/.bashrc
then I try to compile the following file :
`#include
int main() {
// if block with init-statement:
if(int a = 5; a < 8) {
std::cout << "Local variable a is < 8\n";
} else {
std::cout << "Local variable a is >= 8\n";
}
return 0;
}`
pi@jarvis2:~/Dev $ g++-10.2.0 -std=c++17 -Wall -pedantic if_test.cpp -o if_test
In file included from /opt/gcc-10.2.0/include/c++/10.2.0/aarch64-linux-gnu/bits/os_defines.h:39,
from /opt/gcc-10.2.0/include/c++/10.2.0/aarch64-linux-gnu/bits/c++config.h:518,
from /opt/gcc-10.2.0/include/c++/10.2.0/iostream:38,
from if_test.cpp:1:
/usr/include/features.h:424:12: fatal error: sys/cdefs.h: Aucun fichier ou dossier de ce type
424 | # include <sys/cdefs.h>
The text was updated successfully, but these errors were encountered: