こちらのサイトを参考にrt-preempt導入カーネルをビルドしようとしたのですが、何度やっても make 時にエラーが起きます。
WSL2(Ubuntu20.04)
1make bcm2709_defconfig 2 HOSTCC scripts/basic/fixdep 3 HOSTCC scripts/kconfig/conf.o 4 HOSTCC scripts/kconfig/confdata.o 5 HOSTCC scripts/kconfig/expr.o 6 LEX scripts/kconfig/lexer.lex.c 7 YACC scripts/kconfig/parser.tab.[ch] 8 HOSTCC scripts/kconfig/lexer.lex.o 9 HOSTCC scripts/kconfig/menu.o 10 HOSTCC scripts/kconfig/parser.tab.o 11 HOSTCC scripts/kconfig/preprocess.o 12 HOSTCC scripts/kconfig/symbol.o 13 HOSTCC scripts/kconfig/util.o 14 HOSTLD scripts/kconfig/conf 15*** 16*** Compiler is too old. 17*** Your GCC version: 4.8.3 18*** Minimum GCC version: 5.1.0 19*** 20scripts/Kconfig.include:44: Sorry, this compiler is not supported. 21make[1]: *** [scripts/kconfig/Makefile:94: bcm2709_defconfig] Error 1 22make: *** [Makefile:616: bcm2709_defconfig] Error 2
sudo apt install build-essential や g++を入れなおしてもダメでした。
エラーが出るまでの操作手順(更のWSL2 Ubuntu20.04上)
WSL2(Ubuntu20.04)
1(HOME内) 2sudo apt-get update 3sudo apt-get upgrade -y 4sudo apt-get dist-upgrade -y 5mkdir raspberry-rt && cd raspberry-rt 6git clone -b rpi-5.15.y --depth 1 https://github.com/raspberrypi/linux.git 7cd linux 8wget https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/patch-5.15.14-rt27.patch.gz 9zcat patch-5.15.14-rt27.patch.gz | patch -p1 10cd .. 11git clone https://github.com/raspberrypi/tools.git --depth 12export ARCH=arm 13export CROSS_COMPILE=/home/username/raspberry-rt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- 14export INSTALL_MOD_PATH=/home/username/raspberry-rt/rtkernel 15export KERNEL=kernel7 16cd linux 17make bcm2709_defconfig 18*** 19*** Compiler is too old. 20*** Your GCC version: 4.8.3 21*** Minimum GCC version: 5.1.0 22*** 23scripts/Kconfig.include:44: Sorry, this compiler is not supported. 24make[1]: *** [scripts/kconfig/Makefile:48: menuconfig] Error 1 25make: *** [Makefile:616: menuconfig] Error 2
追記
gcc --version の出力
WSL2(Ubuntu20.04)
1gcc --version 2 3gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 4Copyright (C) 2019 Free Software Foundation, Inc. 5This is free software; see the source for copying conditions. There is NO 6warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
sudo apt show gcc の出力
WSL2(Ubuntu20.04)
1sudo apt show gcc 2 3Package: gcc 4Version: 4:9.3.0-1ubuntu2 5Priority: optional 6Build-Essential: yes 7Section: devel 8Source: gcc-defaults (1.185.1ubuntu2) 9Origin: Ubuntu 10Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> 11Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org> 12Bugs: https://bugs.launchpad.net/ubuntu/+filebug 13Installed-Size: 51.2 kB 14Provides: c-compiler, gcc-x86-64-linux-gnu (= 4:9.3.0-1ubuntu2) 15Depends: cpp (= 4:9.3.0-1ubuntu2), gcc-9 (>= 9.3.0-3~) 16Recommends: libc6-dev | libc-dev 17Suggests: gcc-multilib, make, manpages-dev, autoconf, automake, libtool, flex, bison, gdb, gcc-doc 18Conflicts: gcc-doc (<< 1:2.95.3) 19Task: ubuntustudio-video, ubuntu-mate-core, ubuntu-mate-desktop 20Download-Size: 5208 B 21APT-Manual-Installed: no 22APT-Sources: http://archive.ubuntu.com/ubuntu focal/main amd64 Packages 23Description: GNU C compiler 24 This is the GNU C compiler, a fairly portable optimizing compiler for C. 25 . 26 This is a dependency package providing the default GNU C compiler.

回答1件
あなたの回答
tips
プレビュー