{"id":1877,"date":"2016-12-26T11:03:56","date_gmt":"2016-12-26T11:03:56","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1877"},"modified":"2016-12-26T11:03:56","modified_gmt":"2016-12-26T11:03:56","slug":"arm64-catastrophic-compile-errors-with-4-10-rc1-and-a-fix","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1877","title":{"rendered":"ARM64 &#8211; Catastrophic Compile Errors with 4.10-rc1 &#8211; and a Fix.."},"content":{"rendered":"<p>Tried compiling Kernel 4.10-rc1 for <strong>aarch64<\/strong>, and got &#8211; literally &#8211; hundreds of errors:<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">......\r\n.\/include\/linux\/sched.h:3299: Error: unknown mnemonic `return' -- `return test_ti_thread_flag(task_thread_info(tsk),flag)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3300: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3302: Error: unknown mnemonic `static' -- `static inline void set_tsk_need_resched(struct task_struct*tsk)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3303: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3304: Error: unknown mnemonic `set_tsk_thread_flag' -- `set_tsk_thread_flag(tsk,1)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3305: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3307: Error: unknown mnemonic `static' -- `static inline void clear_tsk_need_resched(struct task_struct*tsk)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3308: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3309: Error: unknown mnemonic `clear_tsk_thread_flag' -- `clear_tsk_thread_flag(tsk,1)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3310: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3312: Error: unknown mnemonic `static' -- `static inline int test_tsk_need_resched(struct task_struct*tsk)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3313: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3314: Error: unknown mnemonic `return' -- `return unlikely(test_tsk_thread_flag(tsk,1))'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3315: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3317: Error: unknown mnemonic `static' -- `static inline int restart_syscall(void)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3318: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3319: Error: unknown mnemonic `set_tsk_thread_flag' -- `set_tsk_thread_flag(current, 0)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3320: Error: unknown mnemonic `return' -- `return -513'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3321: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3323: Error: unknown mnemonic `static' -- `static inline int signal_pending(struct task_struct*p)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3324: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3325: Error: unknown mnemonic `return' -- `return unlikely(test_tsk_thread_flag(p,0))'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3326: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3328: Error: unknown mnemonic `static' -- `static inline int __fatal_signal_pending(struct task_struct*p)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3329: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3330: Error: unknown mnemonic `return' -- `return unlikely(sigismember(&amp;p-&gt;pending.signal,9))'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3331: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3333: Error: unknown mnemonic `static' -- `static inline int fatal_signal_pending(struct task_struct*p)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3334: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3335: Error: unknown mnemonic `return' -- `return signal_pending(p)&amp;&amp;__fatal_signal_pending(p)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3336: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3338: Error: unknown mnemonic `static' -- `static inline int signal_pending_state(long state,struct task_struct*p)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3339: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3340: Error: unknown mnemonic `if' -- `if (!(state&amp;(1|128)))'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3341: Error: unknown mnemonic `return' -- `return 0'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3342: Error: unknown mnemonic `if' -- `if (!signal_pending(p))'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3343: Error: unknown mnemonic `return' -- `return 0'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3345: Error: unknown mnemonic `return' -- `return (state&amp;1)||__fatal_signal_pending(p)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3346: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3358: Error: unknown mnemonic `static' -- `static inline int _cond_resched(void){return 0'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3358: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3366: Error: unknown mnemonic `extern' -- `extern int __cond_resched_lock(spinlock_t*lock)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3373: Error: unknown mnemonic `extern' -- `extern int __cond_resched_softirq(void)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3380: Error: unknown mnemonic `static' -- `static inline void cond_resched_rcu(void)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3381: Error: junk at end of line, first unrecognized character is `{'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3387: Error: junk at end of line, first unrecognized character is `}'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.\/include\/linux\/sched.h:3389: Error: unknown mnemonic `static' -- `static inline unsigned long get_preempt_disable_ip(struct task_struct*p)'<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">- and many more..<\/span><\/strong><\/pre>\n<p>The problems only occurs with ARM64\/aarch64.\u00a0\u00a0 I have tested ARMv7 kernel compiles, and these appear to be OK (and x86 is OK too..)<\/p>\n<p>There is a &#8216;revert&#8217; patch to fix this &#8211; although the longer-term solution may be different:\u00a0 <a href=\"http:\/\/lkml.iu.edu\/hypermail\/linux\/kernel\/1612.3\/00280.html\" target=\"_blank\">http:\/\/lkml.iu.edu\/hypermail\/linux\/kernel\/1612.3\/00280.html<\/a><\/p>\n<p>I have applied this, and it appears to fix the compile errors (Odroid C2)..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 December 26, 2016.<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tried compiling Kernel 4.10-rc1 for aarch64, and got &#8211; literally &#8211; hundreds of errors: &#8230;&#8230; .\/include\/linux\/sched.h:3299: Error: unknown mnemonic `return&#8217; &#8212; `return test_ti_thread_flag(task_thread_info(tsk),flag)&#8217; .\/include\/linux\/sched.h:3300: Error: junk at end of line, first unrecognized character is `}&#8217; .\/include\/linux\/sched.h:3302: Error: unknown mnemonic `static&#8217; &#8212; `static inline void set_tsk_need_resched(struct task_struct*tsk)&#8217; .\/include\/linux\/sched.h:3303: Error: junk at end of line, first unrecognized character is <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1877\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1132,5,6,1238,11,14,16,19,20],"tags":[1135,1133,1021,1503,1508],"class_list":["post-1877","post","type-post","status-publish","format-standard","hentry","category-aarch64","category-compilation","category-crash-and-burn","category-fix","category-hacks","category-kernel","category-linux-arm","category-opinion","category-performance-2","tag-aarch64","tag-arm64","tag-fix-available","tag-kernel-4-10-rc1","tag-multiple-compile-errors"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1877"}],"version-history":[{"count":1,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1877\/revisions"}],"predecessor-version":[{"id":1878,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1877\/revisions\/1878"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}