With certain amounts of trial-and-errors, I succeeded to compile and run Mogan 1.1.1 on termux
under Android. I will write up details when I have spare time. Here are some key points:
-
First of all, one has to disable the phantom processes killing for Android 12+, otherwise many processes are killed tacitly, making compilation and something else failed. A guide can be found here. One can also look at this post.
-
We install termux, then X11 and vnc.
One should also install some libGL (I installed(Edit: thanks to this patch,mesa
) to runtigervnc
, which is not mentioned in the previous wiki page.mesa
is already included into the dependency thus the extra step is no longer necessary.) -
Then we install
termux-packages
and setup. We enter the main directory of this package. -
Create a folder
mogan
underx11-packages
, a build scriptbuild.sh
(expand below), and compile via./build-package.sh -I mogan
as described in this page.build.sh
# http(s) link to package home page. TERMUX_PKG_HOMEPAGE=https://mogan.app/ # One-line, short package description. TERMUX_PKG_DESCRIPTION="A structured editor for science and technology" # License. TERMUX_PKG_LICENSE="GPL-3.0" # Who cares about package. # Specify yourself (Github nick, or name + email) if you wish to maintain the # package, fix its bugs, etc. Otherwise specify "@termux". # Please note that unofficial repositories are not allowed to reference @termux # as their maintainer. TERMUX_PKG_MAINTAINER="@termux" # Version. TERMUX_PKG_VERSION=1.1.1 # URL to archive with source code. #TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/ed/ed-${TERMUX_PKG_VERSION}.tar.lz TERMUX_PKG_SRCURL=https://github.com/XmacsLabs/mogan/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz # SHA-256 checksum of the source code archive. #TERMUX_PKG_SHA256=ad4489c0ad7a108c514262da28e6c2a426946fb408a3977ef1ed34308bdfd174 TERMUX_PKG_SHA256=0d474267b7a777ae0fb22705c8515bfc24eb2de15ed69aa758dc51377fc6d9f9 TERMUX_PKG_DEPENDS="libc++, qt5-qtbase, qt5-qtsvg" termux_step_pre_configure(){ LDFLAGS+=" -lexecinfo" }
-
The package is installed automatically after compilation (this seems dirty, but since
termux
is not a system, it seems acceptable), and we get adeb
package inoutput
directory. We candpkg -i
to “install” it so that later it is easier to usepkg remove
to uninstall.
@darcy I am not sure whether there is an issue in I suspect that the current file cannot be compiled with cmake
.clang/llvm
(there seems no problem for . I have to add gcc
)-lexecinfo
into LDFLAGS
(as shown in the script below), otherwise there are errors during linking about the references backtrace()
and backtrace_symbols()
in /src/System/Misc/stack_trace.cpp
. There is an if
branch in the CMakeList.txt
, and maybe we should add add_includes_ldflags
there.
Update: This might be related to https://github.com/awslabs/aws-c-common/issues/322 which seems to indicate that backtrace
etc. are not included in Android’s libc
.