Android 8 crash lazarus / 43-Android ---------------------------------------------------------------------- BeniBela · 2017-10-15 17:30 Has anyone tried anything on Android 8? Google has blocked many syscalls for "security" reasons My app crashs on startup on its emulator Code: [Select]10-15 19:13:52.044  6375  6375 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 10-15 19:13:52.044  6375  6375 F DEBUG   : Build fingerprint: 'google/ sdk_gphone_x86/generic_x86:8.0.0/OSR1.170901.008/4328566:userdebug/dev -keys' 10-15 19:13:52.044  6375  6375 F DEBUG   : Revision: '0' 10-15 19:13:52.044  6375  6375 F DEBUG   : ABI: 'x86' 10-15 19:13:52.044  6375  6375 F DEBUG   : pid: 6353, tid: 6353, name: ibela.videlibri  >>> de.benibela.videlibri <<< 10-15 19:13:52.044  6375  6375 F DEBUG   : signal 31 (SIGSYS), code 1 (SYS_SECCOMP), fault addr -------- 10-15 19:13:52.044  6375  6375 F DEBUG   : Cause: seccomp prevented call to disallowed x86 system call 13 10-15 19:13:52.044  6375  6375 F DEBUG   :     eax 0000000d  ebx bfb925d8  ecx ae4a6ab4  edx bfb925d8 10-15 19:13:52.044  6375  6375 F DEBUG   :     esi 8e4949c0  edi 00000009 10-15 19:13:52.044  6375  6375 F DEBUG   :     xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b 10-15 19:13:52.044  6375  6375 F DEBUG   :     eip ae4a6ac4  ebp bfb925b8  esp bfb92598  flags 00000202 10-15 19:13:52.525  6375  6375 F DEBUG   : backtrace: 10-15 19:13:52.525  6375  6375 F DEBUG   :     #00 pc 00000ac4  [vdso:ae4a6000] (__kernel_vsyscall+16) 10-15 19:13:52.525  6375  6375 F DEBUG   :     #01 pc 000c9062  /data/app/de.benibela.videlibri-wv6hb2Liin- hdGUMUHOiNw==/lib/x86/liblclapp.so 10-15 19:13:52.525  6375  6375 F DEBUG   :     #02 pc 000ca065  /data/app/de.benibela.videlibri-wv6hb2Liin- hdGUMUHOiNw==/lib/x86/liblclapp.so 10-15 19:13:52.526  6375  6375 F DEBUG   :     #03 pc 000eed37  /data/app/de.benibela.videlibri-wv6hb2Liin- hdGUMUHOiNw==/lib/x86/liblclapp.so 10-15 19:13:52.526  6375  6375 F DEBUG   :     #04 pc 00389b23  /system/lib/libart.so (_ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvR KNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocat I think that is syscall sys_time. ---------------------------------------------------------------------- marcov · 2017-10-15 17:48 Did you ever try to compile with -dFPC_USE_LIBC ? The whole RTL i mean ---------------------------------------------------------------------- BeniBela · 2017-10-15 18:16 No ---------------------------------------------------------------------- marcov · 2017-10-15 19:00 That switches the RTL to use libc as much as possible, giving you a better chance. ---------------------------------------------------------------------- BeniBela · 2017-10-15 21:26 Code: [Select]$ sudo make crossinstall OS_TARGET=android CPU_TARGET=i386 PP=$localcompiler OPT=-dFPC_USE_LIBC  .... /usr/bin/ppcx64 -Ur -Xs -O2 -n -Fux86_64 -Fusystems -Fu/home/theo/opt/fpc-trunk/rtl/units/x86_64-linux -Fix86_64 -FE. -FUx86_64/units/x86_64-linux -Cg -dRELEASE -dFPC_USE_LIBC   -dx86_64 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas pp.pas(234,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure pp.pas(234,1) Warning: "crtendS.o" not found, this will probably cause a linking failure /usr/bin/ld: warning: ./link.res contains output sections; did you forget -T? pp.pas(234,1) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted make[4]: *** [Makefile:4143: ppc] Fehler 1 make[4]: Verzeichnis „/home/theo/opt/fpc-trunk/compiler“ wird verlassen make[3]: *** [Makefile:4226: cycle] Fehler 2 make[3]: Verzeichnis „/home/theo/opt/fpc-trunk/compiler“ wird verlassen make[2]: *** [Makefile:2901: compiler_cycle] Fehler 2 make[2]: Verzeichnis „/home/theo/opt/fpc-trunk“ wird verlassen make[1]: *** [Makefile:2933: build-stamp.i386-android] Fehler 2 make[1]: Verzeichnis „/home/theo/opt/fpc-trunk“ wird verlassen make: *** [Makefile:3001: crossinstall] Fehler 2 Should I have used CROSSOPT ? Code: [Select]$ sudo make crossinstall OS_TARGET=android CPU_TARGET=arm PP=$localcompiler CROSSOPT=-dFPC_USE_LIBC  .... /usr/bin/mkdir -p /home/theo/opt/fpc-trunk/rtl/units/arm-android arm-linux-androideabi-as  -o /home/theo/opt/fpc-trunk/rtl/units/arm- android/prt0.o arm/prt0.as arm-linux-androideabi-as  -o /home/theo/opt/fpc-trunk/rtl/units/arm- android/dllprt0.o arm/dllprt0.as /home/theo/opt/fpc-trunk/compiler/ppcrossarm -Ur -Tandroid -Parm -XParm-linux-androideabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FU/home/theo/opt/fpc-trunk/rtl/units/arm-android -darm -dRELEASE -dFPC_USE_LIBC -Us -Sg ../linux/system.pp osmacro.inc(103,11) Error: overloaded functions have the same parameter list oscdeclh.inc(109,15) Error: Found declaration: FpFstat(LongInt;var Stat):LongInt; CDecl; osmacro.inc(109,11) Error: overloaded functions have the same parameter list oscdeclh.inc(110,15) Error: Found declaration: fpLstat(PChar;PStat):LongInt; CDecl; osmacro.inc(115,11) Error: overloaded functions have the same parameter list oscdeclh.inc(111,15) Error: Found declaration: FpStat(PChar;var Stat):LongInt; CDecl; sysandroid.inc(27,13) Error: Identifier not found "do_syscall" sysandroid.inc(27,24) Error: Identifier not found "syscall_nr_fcntl" sysandroid.inc(27,42) Error: Identifier not found "TSysParam" system.pp(394) Fatal: There were 9 errors compiling module, stopping Fatal: Compilation aborted make[4]: *** [Makefile:3590: system.ppu] Fehler 1 make[4]: Verzeichnis „/home/theo/opt/fpc-trunk/rtl/android“ wird verlassen make[3]: *** [Makefile:2810: android_all] Fehler 2 make[3]: Verzeichnis „/home/theo/opt/fpc-trunk/rtl“ wird verlassen make[2]: *** [Makefile:2644: rtl_all] Fehler 2 make[2]: Verzeichnis „/home/theo/opt/fpc-trunk“ wird verlassen make[1]: *** [Makefile:2937: build-stamp.arm-android] Fehler 2 make[1]: Verzeichnis „/home/theo/opt/fpc-trunk“ wird verlassen make: *** [Makefile:3001: crossinstall] Fehler 2 ---------------------------------------------------------------------- yuriy_sydorov · 2017-10-17 18:58 Should be fixed in r37480 of FPC trunk. ---------------------------------------------------------------------- francesco · 2017-10-27 15:52 Hi, I have the same crash. I've tried the last development version of FPC but I still have the the same issue. Has anyone managed to solve it? Thanks Bye ---------------------------------------------------------------------- BeniBela · 2017-10-27 17:52 I did not have this crash in the emulator after updating to r37480  (although it added this one on linux. something is always broken  ) ---------------------------------------------------------------------- francesco · 2017-11-21 09:10 Hi, I tried to install fpc trunk r37480 with fpcupdeluxe, both on windows 8.1 and Ubuntu 16.04 but  I still have the problem. How do you solve it? Thanks