<p></p>
<p>Android builds have been broken by the addition of datafiles.c</p>
<pre><code>jni/../jni/application/ohrrpgce/tmp//filelayer.cpp:702: error: undefined reference to 'embedded_files_table'
collect2: error: ld returned 1 exit status
/home/james/misc/android-ndk-r12b/build/core/build-binary.mk:677: recipe for target 'obj/local/armeabi/libapplication.so' failed
make: *** [obj/local/armeabi/libapplication.so] Error 1
</code></pre>
<p>tmc correctly points out:</p>
<blockquote>
<p>Oops. Probably because datafiles.c is generate under build/ so doesn't<br>
get symlinked into android/tmp.</p>
</blockquote>
<p>A quick hack to fix that does avoid the first error message:</p>
<pre><code>Index: ohrbuild.py
===================================================================
--- ohrbuild.py (revision 12602)
+++ ohrbuild.py (working copy)
@@ -495,7 +495,12 @@
             source_nodes += [node]
         else:
             # node.sources[0] itself is a path in build/ (to a nonexistent file)
-            source_files.append (node.sources[0].srcnode().abspath)
+            if node.sources[0].name.endswith('datafiles.c'):
+                # special case for datafiles.c which is created in builds dir
+                p = node.sources[0].srcnode().abspath
+                source_files.append (os.path.join(os.path.dirname(p), "build", os.path.basename(p)))
+            else:
+                source_files.append (node.sources[0].srcnode().abspath)
             source_nodes += node.sources
 
     # hacky. Copy the right source files to a temp directory because the Android.mk used
</code></pre>
<p>However, then compiling for android results in a colossal cascade of errors like this:</p>
<pre><code>jni/../jni/application/ohrrpgce/tmp//datafiles.c:4:3: error: 'R' undeclared here (not in a function)
   R,E,L,D,^A,^M, , , ,<A6>,^G, , ,<95>,^G, , , , ,^F,^E, , , ,^A,^B,@,^A, ,^E, , , ,^B,^B,<C8>, , ,^D, ,
   ^
jni/../jni/application/ohrrpgce/tmp//datafiles.c:4:5: error: 'E' undeclared here (not in a function)
   R,E,L,D,^A,^M, , , ,<A6>,^G, , ,<95>,^G, , , , ,^F,^E, , , ,^A,^B,@,^A, ,^E, , , ,^B,^B,<C8>, , ,^D, ,
     ^
jni/../jni/application/ohrrpgce/tmp//datafiles.c:4:7: error: 'L' undeclared here (not in a function)
   R,E,L,D,^A,^M, , , ,<A6>,^G, , ,<95>,^G, , , , ,^F,^E, , , ,^A,^B,@,^A, ,^E, , , ,^B,^B,<C8>, , ,^D, ,
       ^
jni/../jni/application/ohrrpgce/tmp//datafiles.c:4:9: error: 'D' undeclared here (not in a function)
   R,E,L,D,^A,^M, , , ,<A6>,^G, , ,<95>,^G, , , , ,^F,^E, , , ,^A,^B,@,^A, ,^E, , , ,^B,^B,<C8>, , ,^D, ,
         ^
jni/../jni/application/ohrrpgce/tmp//datafiles.c:4:3: error: stray '\1' in program
   R,E,L,D,^A,^M, , , ,<A6>,^G, , ,<95>,^G, , , , ,^F,^E, , , ,^A,^B,@,^A, ,^E, , , ,^B,^B,<C8>, , ,^D, ,
   ^
jni/../jni/application/ohrrpgce/tmp//datafiles.c:4:12: error: expected expression before ',' token
   R,E,L,D,^A,^M, , , ,<A6>,^G, , ,<95>,^G, , , , ,^F,^E, , , ,^A,^B,@,^A, ,^E, , , ,^B,^B,<C8>, , ,^D, ,
            ^
jni/../jni/application/ohrrpgce/tmp//datafiles.c:5:2: warning: null character(s) ignored
    , ,^C,^A,<FF>, ,^D, , , ,^D,^A,<FF>, ,^M, , , ,^E,^F, ,C,o,n,t,a,i,n,e,r, ,[,^G, , ,^F, ,^B,*,^F,
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ohrrpgce/ohrrpgce/issues/1222">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AMWGWZQSHQNXV7RBZBZA4C3UJ2TRJANCNFSM5HEHIVYA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AMWGWZXMPXESY2HHECQ6TW3UJ2TRJA5CNFSM5HEHIVYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4PQQQDIA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ohrrpgce/ohrrpgce/issues/1222",
"url": "https://github.com/ohrrpgce/ohrrpgce/issues/1222",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>