Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoarVM build fail on termux/Android 6.0.1 #6669

Closed
p6rt opened this issue Jan 29, 2018 · 3 comments
Closed

MoarVM build fail on termux/Android 6.0.1 #6669

p6rt opened this issue Jan 29, 2018 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 29, 2018

Migrated from rt.perl.org#132785 (status was 'new')

Searchable as RT132785$

@p6rt
Copy link
Author

p6rt commented Jan 29, 2018

From myforumemail@arcor.de

Device​: Onyx Boox Max2, Android 6.0.1, cpu rk3288
termux is a prefixed linux, device is not rooted

It's possible to make nqp and rakudo using a cross-compiled MoarVM.
Building MoarVM itself on device fails, both 2017.10 and 2017.12

$ apt install libuv-dev libatomic-ops-dev libffi-dev libtommath-dev
$ export MVM_SPESH_DISABLE=1
$ perl Configure.pl --backends=moar --gen-moar --gen-nqp --prefix=$PREFIX --sysroot=$PREFIX
HEAD is now at e4f79cbae [MoarVM Bump] Brings 21 commits
Building NQP ...
/data/data/com.termux/files/usr/bin/perl Configure.pl --prefix=/data/data/com.termux/files/usr --backends=moar --make-install --git-protocol=https --gen-moar

Creating tools/build/install-jvm-runner.pl ...
HEAD is now at d3ce626b4 Add JIT template for atkey_o

Configuring and building MoarVM ...
/data/data/com.termux/files/usr/bin/perl Configure.pl --optimize --prefix=/data/data/com.termux/files/usr --make-install
Welcome to MoarVM!

Updating submodules .................................... OK
Configuring native build environment ...................
FAIL
  unknown OS 'android'
  assuming POSIX userland ............................ trying to compile a simple C program ............... YES
OK

  probing whether your compiler thinks that it is gcc YES
  probing how your compiler does static inline ....... static __inline__
  your CPU can read unaligned values for only int32
  probing the size of pointers ....................... 4
JIT isn't supported on platforms with 4 byte pointers.
  probing C type support for​: _Bool, bool ............ YES​: _Bool,bool
  probing computed goto support ...................... YES
  probing pthread_yield support ...................... NO
  probing support of rdtscp intrinsic ................ NO

  make​: make
  compile​: cc -O -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC
  includes​: -I3rdparty/libuv/include -I3rdparty/libuv/src -I3rdparty/libatomic_ops/src -I3rdparty/libtommath -I3rdparty/dyncall/dynload -I3rdparty/dyncall/dyncall -I3rdparty/dyncall/dyncallback
  link​: cc -O -DNDEBUG -Wl,-rpath,"/@​libdir@​"
  libs​: -lm -lpthread

  byte order​: little endian

Configuring 3rdparty libs .............................. FAIL
  no idea how to build '3rdparty/libuv/libuv.a'
  continuing anyway .................................. OK

  3rdparty​: 3rdparty/dyncall/dyncall/libdyncall_s.a
  3rdparty/dyncall/dyncallback/libdyncallback_s.a
  3rdparty/dyncall/dynload/libdynload_s.a
  3rdparty/libatomic_ops/src/libatomic_ops.a
  3rdparty/libtommath/libtommath.a
  3rdparty/libuv/libuv.a
  3rdparty/sha1/libsha1.a
  3rdparty/tinymt/libtinymt.a

Generating src/gen/config.c ............................ OK
Generating src/gen/config.h ............................ OK
Generating Makefile .................................... OK
Generating tools/check.mk .............................. OK
Generating build/mk-moar-pc.pl ......................... OK

Configuration FAIL. You can try to salvage the generated Makefile.
Command failed (status 256)​: /data/data/com.termux/files/usr/bin/perl Configure.pl --optimize --prefix=/data/data/com.termux/files/usr --make-install
Command failed (status 7424)​: /data/data/com.termux/files/usr/bin/perl Configure.pl --prefix=/data/data/com.termux/files/usr --backends=moar --make-install --git-protocol=https --gen-moar
$ pkg files libuv
/.
/data
/data/data
/data/data/com.termux
/data/data/com.termux/files
/data/data/com.termux/files/usr
/data/data/com.termux/files/usr/lib
/data/data/com.termux/files/usr/lib/libuv.so
$ pkg files libuv-dev
/.
/data
/data/data
/data/data/com.termux
/data/data/com.termux/files
/data/data/com.termux/files/usr
/data/data/com.termux/files/usr/lib
/data/data/com.termux/files/usr/lib/pkgconfig
/data/data/com.termux/files/usr/lib/pkgconfig/libuv.pc
/data/data/com.termux/files/usr/include
/data/data/com.termux/files/usr/include/uv.h
/data/data/com.termux/files/usr/include/uv-threadpool.h
/data/data/com.termux/files/usr/include/android-ifaddrs.h
/data/data/com.termux/files/usr/include/uv-unix.h
/data/data/com.termux/files/usr/include/uv-version.h
/data/data/com.termux/files/usr/include/pthread-barrier.h
/data/data/com.termux/files/usr/include/uv-errno.h
/data/data/com.termux/files/usr/include/uv-linux.h

@p6rt p6rt added the build label Jan 5, 2020
@tinmarino
Copy link

The issue is with libuv io that need a special treatment (i.e. patch) on android. As stated in nodejs termux package and uvloop.
The current state is that MoarVm is announcing it doesn't know a way to install libuv. The system installation does not work because it misses -fPIC in my Termux install. But manually installing the termux libuv package (with apply the patch), recompiling the sources and moving it in 3dparty works !

@JJ
Copy link

JJ commented Dec 30, 2020

This is a MoarVM issue, and @tinmarino provides a solution to it. So I'm closing.

@JJ JJ closed this as completed Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants