前言 在Ubuntu中搭建openwrt編譯環境時,安裝完了需要的軟體之後,我們執行命令檢查依賴是否滿足, 有時會出現以下警告: 明明我們已經安裝了git,卻顯示我們未安裝,只是openwrt裡面prereq build.mk的一個bug,我們可以通過打patch的方法來修複它。 解決辦法 1. 下 ...
前言
在Ubuntu中搭建openwrt編譯環境時,安裝完了需要的軟體之後,我們執行命令檢查依賴是否滿足,
make defconfig
有時會出現以下警告:
ihid@ubuntu:~/chaos_calmer$ make defconfig
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'libssl'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'md5sum'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'svn'... ok.
Checking 'git'... failed.
Checking 'file'... ok.
Checking 'openssl'... ok.
Checking 'ldconfig-stub'... ok.
Build dependency: Please install Git (git-core) >= 1.6.5
/home/ihid/chaos_calmer/include/prereq.mk:12: recipe for target 'prereq' failed
Prerequisite check failed. Use FORCE=1 to override.
/home/ihid/chaos_calmer/include/toplevel.mk:140: recipe for target 'staging_dir/host/.prereq-build' failed
make: *** [staging_dir/host/.prereq-build] Error 1
明明我們已經安裝了git,卻顯示我們未安裝,只是openwrt裡面prereq-build.mk的一個bug,我們可以通過打patch的方法來修複它。
解決辦法
- 下載patch文件:https://gitlab.labs.nic.cz/turris/openwrt/uploads/0673001b14ab1d1769604ff0ce7d8781/git-version-check-fix.patch
- 將文件複製到/home/ihid/chaos_calmer/include路徑下
- 在當前路徑下執行命令
patch < git-version-check-fix.patch
- 回到chaos_calmer主目錄,再次檢查依賴,發現沒,沒有問題了。