<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://www.mywiki.cn/Hovercool/index.php?action=history&amp;feed=atom&amp;title=%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB</id>
	<title>编译问题汇总 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://www.mywiki.cn/Hovercool/index.php?action=history&amp;feed=atom&amp;title=%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB"/>
	<link rel="alternate" type="text/html" href="https://www.mywiki.cn/Hovercool/index.php?title=%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB&amp;action=history"/>
	<updated>2026-09-01T08:24:19Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.mywiki.cn/Hovercool/index.php?title=%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB&amp;diff=912&amp;oldid=prev</id>
		<title>2015年5月6日 (三) 12:43 Hovercool</title>
		<link rel="alternate" type="text/html" href="https://www.mywiki.cn/Hovercool/index.php?title=%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB&amp;diff=912&amp;oldid=prev"/>
		<updated>2015-05-06T12:43:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= linux driver =&lt;br /&gt;
&amp;lt;pre class=&amp;quot;prettyprint&amp;quot;&amp;gt;&lt;br /&gt;
/*error*/&lt;br /&gt;
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory&lt;br /&gt;
include/linux/mmzone.h:197:5: warning: &amp;quot;MAX_NR_ZONES&amp;quot; is not defined&lt;br /&gt;
&lt;br /&gt;
/*solution*/&lt;br /&gt;
bounds.h是在编译内核时生成的，如果运行&amp;quot;make clean&amp;quot; 或 &amp;quot;make distclean&amp;quot;，这个文件就会被清除掉（详情查看内核Makefile）。&lt;br /&gt;
因此，如果再利用此内核源码编译内核模块，如果有涉及bounds.h，就会出现找不到该文件的错误。&lt;br /&gt;
解决办法就是：&lt;br /&gt;
&amp;quot;make prepare&amp;quot;&lt;br /&gt;
这样就会重新生成bounds.h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;prettyprint&amp;quot;&amp;gt;&lt;br /&gt;
/*error*/&lt;br /&gt;
target Java: FrameworksCoreSystemPropertiesTests (out/target/common/obj/APPS/FrameworksCoreSystemPropertiesTests_intermediates/classes)&lt;br /&gt;
error: error reading out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar; invalid header field&lt;br /&gt;
1 error&lt;br /&gt;
make: *** [out/target/common/obj/APPS/FrameworksCoreSystemPropertiesTests_intermediates/classes-full-debug.jar] Error 41&lt;br /&gt;
/*solution*/&lt;br /&gt;
原因是jar打包工具打包的格式不正确导致的，具体修改如下：&lt;br /&gt;
$ sudo update-alternatives --config jar&lt;br /&gt;
有 3 个候选项可用于替换 jar (提供 /usr/bin/jar)。&lt;br /&gt;
&lt;br /&gt;
  选择       路径                               优先级  状态&lt;br /&gt;
------------------------------------------------------------&lt;br /&gt;
* 0            /usr/bin/fastjar                      100       自动模式&lt;br /&gt;
  1            /usr/bin/fastjar                      100       手动模式&lt;br /&gt;
  2            /usr/lib/jvm/java-1.5.0-sun/bin/jar   53        手动模式&lt;br /&gt;
  3            /usr/lib/jvm/java-6-sun/bin/jar       63        手动模式&lt;br /&gt;
&lt;br /&gt;
要维持当前值[*]请按回车键，或者键入选择的编号：&lt;br /&gt;
&lt;br /&gt;
此时选择3，注意这个选择需要和你的sudo update-alternatives --config java 里面选择的保持&lt;br /&gt;
一致（如果你是sun的jdk就选sun，如果是openjdk就选openjdk的打包jar），负责会出现打包错误，&lt;br /&gt;
导致无法编译通过的问题。（默认使用的是fastjar,出现问题）&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hovercool</name></author>
	</entry>
</feed>