[Ohrrpgce] [ohrrpgce/ohrrpgce] Android builds broken by datafiles.c (Issue #1222)
James Paige
notifications at github.com
Mon Nov 1 08:00:36 PDT 2021
Android builds have been broken by the addition of datafiles.c
```
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
```
tmc correctly points out:
> Oops. Probably because datafiles.c is generate under build/ so doesn't
> get symlinked into android/tmp.
A quick hack to fix that does avoid the first error message:
```
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
```
However, then compiling for android results in a colossal cascade of errors like this:
```
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,
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1222
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20211101/643f1958/attachment.html>
More information about the Ohrrpgce
mailing list