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