uchan-nos / os-from-zero

『ゼロからのOS自作入門』(内田公太著、マイナビ出版)のサポートサイトです
https://zero.osdev.jp/
244 stars 10 forks source link

fatal error: ./brotli/c/common/constants.h: No such file or directoryと出てきます #131

Closed syuusyuu closed 1 year ago

syuusyuu commented 1 year ago

45 を参考に

コマンドを実行してみたところ

make: Entering directory '/$HOME/Desktop/mikanos/edk2/BaseTools/Source/C'
Attempting to detect HOST_ARCH from 'uname -m': x86_64
Detected HOST_ARCH of X64 using uname.
mkdir -p .
make -C Common
make[1]: Entering directory '/$HOME/Desktop/mikanos/edk2/BaseTools/Source/C/Common'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '$HOME/Desktop/mikanos/edk2/BaseTools/Source/C/Common'
make -C BrotliCompress
make[1]: Entering directory '$HOME/Desktop/mikanos/edk2/BaseTools/Source/C/BrotliCompress'
gcc  -c -I ./brotli/c/include -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ -MD -fshort-wchar -fno-strict-aliasing -fwrapv -fno-delete-null-pointer-checks -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -g -O2  BrotliCompress.c -o BrotliCompress.o
BrotliCompress.c:20:10: fatal error: ./brotli/c/common/constants.h: No such file or directory
   20 | #include "./brotli/c/common/constants.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [../Makefiles/footer.makefile:21: BrotliCompress.o] Error 1
make[1]: Leaving directory '$HOME/Desktop/mikanos/edk2/BaseTools/Source/C/BrotliCompress'
make: *** [GNUmakefile:76: BrotliCompress] Error 2
make: Leaving directory '$HOME/Desktop/mikanos/edk2/BaseTools/Source/C'

と出てきてビルドができませんでした どうすればいいでしょうか

環境 os:wslのubuntu 始めに付録を見ていなく、本と環境がだいぶちがいます ツリーは

ツリー
``` . ├── disk.img ├── edk2 │   ├── ArmPkg │   ├── ArmPlatformPkg │   ├── ArmVirtPkg │   ├── BaseTools │   ├── Build │   ├── CONTRIBUTING.md │   ├── Conf │   ├── CryptoPkg │   ├── DynamicTablesPkg │   ├── EmbeddedPkg │   ├── EmulatorPkg │   ├── FatPkg │   ├── FmpDevicePkg │   ├── IntelFsp2Pkg │   ├── IntelFsp2WrapperPkg │   ├── License-History.txt │   ├── License.txt │   ├── Maintainers.txt │   ├── MdeModulePkg │   ├── MdePkg │   ├── MikanLoaderPkg -> $HOME/Desktop/mikanos/workspace/mikanos/day02/MikanLoaderPkg │   ├── NetworkPkg │   ├── OvmfPkg │   ├── PcAtChipsetPkg │   ├── ReadMe.rst │   ├── RedfishPkg │   ├── SecurityPkg │   ├── ShellPkg │   ├── SignedCapsulePkg │   ├── SourceLevelDebugPkg │   ├── StandaloneMmPkg │   ├── UefiCpuPkg │   ├── UefiPayloadPkg │   ├── UnitTestFrameworkPkg │   ├── edksetup.bat │   ├── edksetup.sh │   └── pip-requirements.txt ├── mikanos ├── mnt ├── osbook │   ├── LICENSE │   ├── README.md │   ├── day01 │   ├── devenv │   └── devenv_src └── workspace ├── master.zip └── mikanos ├── IPA_Font_License_Agreement_v1.0.txt ├── LICENSE ├── MikanLoaderPkg ├── README.md ├── apps ├── build.sh ├── day02 ├── docs ├── kernel ├── mikanos-after30-photo.png ├── resource ├── run.sh └── tools ```

です

uchan-nos commented 1 year ago

@syuusyuu https://github.com/uchan-nos/os-from-zero/issues/45#issuecomment-819952506 を参考に git clone --recursive してみたらどうなるでしょうか。

syuusyuu commented 1 year ago

@uchan-nos not existでできませんでした というか、mikanosやedk2をcloneするとき、gitが出来なくなっていました その時はgithubからそのままZipをダウンロードしました それがいけなかったのでしょうか

uchan-nos commented 1 year ago

その時はgithubからそのままZipをダウンロードしました それがいけなかったのでしょうか

はい。それが原因と思います。 git clone でもってこないと、リポジトリの外側にあるソースコードを再帰的に(recursiveに)取得することができません。

syuusyuu commented 1 year ago

分かりました しかし、cloneをすると UserNameとPasswordを聞いてくるのですが どうすればいいでしょうか

uchan-nos commented 1 year ago

どのようにgit cloneしているかによっても差があるので、 実際に実行したコマンドと、その出力を省略せずに貼ってもらえますか?

syuusyuu commented 1 year ago

もう一回やってみましたが なぜか出来ました もう一回環境作りやってみます