xplr
xplr copied to clipboard
Fails to link on aarch64 termux
Compiler output:
Compiling xplr v0.17.0 (/data/data/com.termux/files/home/xplr)
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-Wl,--allow-multiple-definition" "/data/data/com.termux/files/home/xplr/target/release/deps/xplr-ad66d81f4c6d084b.xplr.1b821203-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/data/data/com.termux/files/home/xplr/target/release/deps" "-L" "/data/data/com.termux/files/home/xplr/target/release/build/mlua-b77dc0e1dbfa7140/out/luajit-build/lib" "-L" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib" "-Wl,-Bstatic" "/data/data/com.termux/files/usr/tmp/rustcYhgQRH/libmlua-6cbbf93d6ac37f01.rlib" "-Wl,--start-group" "-Wl,--end-group" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libcompiler_builtins-e245a2dd77604f24.rlib" "-Wl,-Bdynamic" "-ldl" "-llog" "-lunwind" "-lc" "-lm" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib" "-o" "/data/data/com.termux/files/home/xplr/target/release/deps/xplr-ad66d81f4c6d084b" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs"
= note: ld.lld: error: undefined symbol: __emutls_get_address
>>> referenced by lj_err.c:724
>>> lj_err.o:(lj_err_throw) in archive /data/data/com.termux/files/usr/tmp/rustcYhgQRH/libmlua-6cbbf93d6ac37f01.rlib
ld.lld: error: undefined symbol: __clear_cache
>>> referenced by lj_mcode.c:49
>>> lj_mcode.o:(lj_mcode_sync) in archive /data/data/com.termux/files/usr/tmp/rustcYhgQRH/libmlua-6cbbf93d6ac37f01.rlib
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
Is xplr still supported on termux, or am I doing something wrong?
Hey have you followed this instructions?
Yes I did, the only thing I changed was doing a git clone, so if the compilation fails again, I don't have to start over.
Hmm I'm also getting some error with local build. Will investigate later.
Now getting this error even with cargo install.
error: failed to run custom build command for `mlua v0.8.4`
Caused by:
process didn't exit successfully: `/data/data/com.termux/files/home/xplr/target/release/build/mlua-fc4218d0e1f03781/build-script-main` (exit status: 101)
--- stdout
CC_aarch64-linux-android = None
CC_aarch64_linux_android = None
HOST_CC = None
CC = None
CFLAGS_aarch64-linux-android = None
CFLAGS_aarch64_linux_android = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("neon")
running "make" "-e"
CC lj_init.o
HOSTCC host/minilua.o
HOSTLINK host/minilua
DYNASM host/buildvm_arch.h
HOSTCC host/buildvm.o
HOSTCC host/buildvm_asm.o
HOSTCC host/buildvm_peobj.o
HOSTCC host/buildvm_lib.o
HOSTCC host/buildvm_fold.o
HOSTLINK host/buildvm
BUILDVM lj_vm.S
ASM lj_vm.o
CC lj_assert.o
CC lj_gc.o
BUILDVM lj_ffdef.h
CC lj_err.o
CC lj_char.o
BUILDVM lj_bcdef.h
CC lj_bc.o
CC lj_obj.o
CC lj_buf.o
CC lj_str.o
CC lj_tab.o
CC lj_func.o
CC lj_udata.o
CC lj_meta.o
CC lj_debug.o
CC lj_prng.o
CC lj_state.o
CC lj_dispatch.o
CC lj_vmevent.o
CC lj_vmmath.o
CC lj_strscan.o
CC lj_strfmt.o
CC lj_strfmt_num.o
CC lj_serialize.o
CC lj_api.o
CC lj_profile.o
CC lj_lex.o
CC lj_parse.o
CC lj_bcread.o
CC lj_bcwrite.o
CC lj_load.o
CC lj_ir.o
CC lj_opt_mem.o
BUILDVM lj_folddef.h
CC lj_opt_fold.o
CC lj_opt_narrow.o
CC lj_opt_dce.o
CC lj_opt_loop.o
CC lj_opt_split.o
CC lj_opt_sink.o
CC lj_mcode.o
CC lj_snap.o
CC lj_record.o
CC lj_crecord.o
BUILDVM lj_recdef.h
CC lj_ffrecord.o
CC lj_asm.o
CC lj_trace.o
CC lj_gdbjit.o
CC lj_ctype.o
CC lj_cdata.o
CC lj_cconv.o
CC lj_ccall.o
CC lj_ccallback.o
CC lj_carith.o
CC lj_clib.o
CC lj_cparse.o
CC lj_lib.o
CC lj_alloc.o
CC lib_aux.o
BUILDVM lj_libdef.h
CC lib_base.o
CC lib_math.o
CC lib_bit.o
CC lib_string.o
CC lib_table.o
CC lib_io.o
CC lib_os.o
CC lib_package.o
CC lib_debug.o
CC lib_jit.o
CC lib_ffi.o
CC lib_buffer.o
CC lib_init.o
CC lj_str_hash.o
AR libluajit.a
--- stderr
make: *** [Makefile:731: libluajit.a] Error 127
thread 'main' panicked at '
Error building LuaJIT:
Command: "make" "-e"
Exit status: exit status: 2
', /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/luajit-src-210.4.3+resty8384278/src/lib.rs:200:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to compile `xplr v0.20.0 (/data/data/com.termux/files/home/xplr)`, intermediate artifacts can be found at `/data/data/com.termux/files/home/xplr/target`
The error isn't very helpful. Probably need to raise this in mlua repo.
pkg install luajit
then remove the vendored
feature on mlua makes it compile and run.
Nice 👍. So I guess it just needs dedicated packaging for termux, similar to how BSDs are doing it. We can probably add this in doc, but it seems there's little interest for this (no real usecase), so just closing this for now.