1. 初检git出错
依赖提示 Please install Git (git-core) >= 1.6.5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
➜ openwrt git:(master) ✗ make menuconfig Checking 'working-make'... 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/ubuntu/buildbot/compex/chaos_calmer/openwrt/include/prereq.mk:12: recipe for target 'prereq' failed Prerequisite check failed. Use FORCE=1 to override. /home/ubuntu/buildbot/compex/chaos_calmer/openwrt/include/toplevel.mk:140: recipe for target 'staging_dir/host/.prereq-build' failed make: *** [staging_dir/host/.prereq-build] Error 1 |
明明已经安装了git,却提示我们安装git,只是openwrt里面prereq-build.mk的一个bug,可以通过打patch的方法来修复它。
解决方案
进到xxx/chaos_calmer/include目录,就是toplevel.mk所在的目录。
1 2 |
wget https://gitlab.labs.nic.cz/turris/openwrt/uploads/0673001b14ab1d1769604ff0ce7d8781/git-version-check-fix.patch patch < git-version-check-fix.patch |
回到openwrt根目录,再次检查依赖,发现没,没有问题了。
2. gdate.c错误
1 2 3 |
gdate.c: In function 'g_date_strftime': tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm); ^~~~~~ |
解决方案
单独改源码方式不好,下次重新编译有可能又要重新改, 所以新建个patch一劳永逸.
在tools/pkg-config/目录下创建目录patches并在patches目录中新建文件 001-glib-gdate-suppress-string-format-literal-warning.patch
内容如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
--- a/glib/glib/gdate.c +++ b/glib/glib/gdate.c @@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d, * * Returns: number of characters written to the buffer, or 0 the buffer was too small */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" + gsize g_date_strftime (gchar *s, gsize slen, @@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s, return retval; #endif } + +#pragma GCC diagnostic pop |
3. automake错误,与perl版本有关
1 2 3 4 5 6 7 8 9 10 11 |
Makefile:50: recipe for target '/home/ubuntu/buildbot/compex/chaos_calmer/openwrt/build_dir/host/automake-1.15/.configured' failed make[3]: *** [/home/ubun |