HOWTO/INSTALL-ANDROID.md seems broken in OTP-22.2
Joakim G.
joagre@REDACTED
Fri Jan 10 11:24:22 CET 2020
FYI:
I followed the build instructions in HOWTO/INSTALL-ANDROID.md in
OTP-22.2 in order to build for Android.
It eventually failed and it seems that there are missing global atoms in
erts/emulator/nifs/common/socket_int.h starting on line 112, for
example, the atom 'esock_atom_user' is undeclared.
Cheers
/Joakim
What I got when I tried to follow the instructions in
HOWTO/INSTALL-ANDROID.md
$ pwd
/home/jocke/src/erlang/otp_src_22.2
$ export NDK_ROOT=/usr/lib/android-ndk
$ export
PATH=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$PATH
$ export NDK_PLAT=android-24
$ ./otp_build configure --xcomp-conf=./xcomp/erl-xcomp-arm-android.conf
--without-ssl
...
<<It eventually fails with...>>
checking CFLAGS for -O switch... configure: error:
CFLAGS must contain a -O flag. If you need to edit the CFLAGS you
probably
also want to add the default CFLAGS. The default CFLAGS are "-O2 -g".
If you want to build erts without any optimization, pass -O0 to CFLAGS.
ERROR: /home/jocke/src/erlang/otp_src_22.2/erts/configure failed!
./configure: 343: kill: No such process
<<Well, I can set CFLAGS manually and try again...>>
$ ./otp_build configure --xcomp-conf=./xcomp/erl-xcomp-arm-android.conf
--without-ssl CFLAGS="-O2 -g"
...
<<It works!!>
*********************************************************************
********************** APPLICATIONS DISABLED **********************
*********************************************************************
crypto : User gave --without-ssl option
odbc : ODBC library - link check failed
ssh : User gave --without-ssl option
ssl : User gave --without-ssl option
ssl : User gave --without-ssl option
*********************************************************************
*********************************************************************
********************** APPLICATIONS INFORMATION *******************
*********************************************************************
wx : No OpenGL headers found, wx will NOT be usable
No GLU headers (glu.h) found, wx will NOT be usable
Cross compilation of the wx driver is not supported yet, wx will NOT be
usable
*********************************************************************
<<Let's run make>>
$ make noboot
...
<<It eventually fails with:>>
CC obj/arm-unknown-linux-androideabi/opt/smp/socket_dbg.o
CC obj/arm-unknown-linux-androideabi/opt/smp/socket_tarray.o
CC obj/arm-unknown-linux-androideabi/opt/smp/socket_util.o
nifs/common/socket_util.c: In function 'esock_encode_packet_pkttype':
nifs/common/socket_util.c:1495:21: error: 'esock_atom_user' undeclared
(first use in this function)
*ePktType = esock_atom_user;
<<AFAICS: 'esock_atom_user' is indeed undeclared in
erts/emulator/nifs/common/socket_int.h starting on line 112>>
More information about the erlang-questions
mailing list