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

Report problems with the new support for on-device builds #4157

Open
buttaface opened this issue Aug 10, 2019 · 15 comments

Comments

@buttaface
Copy link
Contributor

commented Aug 10, 2019

I've been trying it out in a fresh Termux, so I'll start. I'll note that there's at least three tiers of dependencies, with the bottom tier made up of some of the packages that are installed in the new setup script for Termux, which I purposely didn't run, let's call it Tier 1. Tier 1 is required to even run scripts/build/ from this repo. Tier 2 would be common build packages that are needed by many packages, but not by scripts/build/. Tier 3 would be the rest.

Here's my experience starting from scratch, my attempt to map part of the dependency tree by starting from the bottom:

I first tried to build ninja, but python was needed for buildorder.py in this repo and then clang to compile termux-elf-cleaner. After those two Tier 1 pre-built packages were installed, ninja wouldn't build, as its build script currently requires a pre-built ninja to build it. I'll patch that and submit a pull.

Next, I tried building kakoune, my editor of choice. That package provides a Makefile, so I had to build make, but these scripts require a pre-built make to build it, so I installed it. Kakoune would then build but fail when linking, missing several symbols from ncurses. So I tried building those ncurses packages, even though a couple are installed by default, by forcing a build.

ncurses requires the file package to build, but the file source wouldn't download, so I installed the package. Once the ncurses packages were all built, kakoune still wouldn't link, then I noticed a call to pkg-config in the build output that was failing, so I tried to build pkg-config.

pkg-config needs glib, which requires perl and meson to build. There's no package yet for meson though, and I figured perl would be too much work, so I installed those two packages. Finally, pkg-config requires itself to build, so I just ended up installing it.

At last, I got kakoune to build! 🎆 Turns out the ncurses build wasn't necessary, the only problem was missing pkg-config.

I tried git next, which appears to build but then failed when installing the docs, as it requires asciidoc, for which I see no Termux package.

Finally, I tried to build the CMake package. It requires jsoncpp, which is built by CMake, and libarchive, which won't build because it expects posix_spawn. So I installed those two packages, and then the libuv dependency wouldn't build, because it requires automake.

Automake wouldn't build initially because it requires m4, which wouldn't build because it also wanted posix_spawn, so I installed the m4 pre-built package and Automake built. libuv then also needed libtoolize from the libtool package, so I built that one and finally got to CMake itself.

CMake depends on itself, but I saw a configure script in its source, so I turned off the TERMUX_PKG_FORCE_CMAKE flag for it and tried to build it that way. At first it seemed to build if I removed the --disable-dependency-tracking flag for the autotools script, but finally failed with another flag there. After that, it always gave strange errors in that final autotools invocation about flags missing, so I gave up and just installed the pre-built package for CMake.

I'll add some of these notes to the setup script for Termux, so people can see where the dependencies come from and work to remove them if they want.

Try out the new on-device build support for yourself and report similar dependencies like this here, so we can get more packages built on-device. I've tried out mostly Tier 1 and 2 packages, but build info for all packages is welcome.

@xeffyr xeffyr added the discussion label Aug 10, 2019
@xeffyr xeffyr pinned this issue Aug 10, 2019
@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 10, 2019

so I had to build make, but these scripts require a pre-built make to build it, so I installed it

You can't build make without make. Unless you are ready to type compilation commands manually.

fail when linking, missing several symbols from ncurses. So I tried building those ncurses packages, even though a couple are installed by default

Probably because just ncurses isn't a complete package. It is splitted into ncurses-ui-libs.

ncurses requires the file package to build

./build-package.sh requires file package too since it is used in termux_step_massage().

which wouldn't build because it also wanted posix_spawn

As I wrote in #1756, environments & compiler aren't same.

Comparison of on-device config.h and cross-compiled: https://gist.github.com/xeffyr/e752f3ef4a040ea4c68279e47e2973ec

posix_spawn is enabled for on-device and disabled when using NDK somehow...

@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 10, 2019

Coreutils - breaks environment (ln utility disappears):

make  install-exec-hook
make[4]: Entering directory '/data/data/com.termux/files/home/.termux-build/coreutils/build'
/bin/sh: 12: ln: not found

On-device builds are now disabled for this package.


Doxygen:

-- Performing Test ICONV_COMPILES
-- Performing Test ICONV_COMPILES - Failed
-- Could NOT find ICONV (missing: ICONV_COMPILES)
CMake Error at cmake/FindIconv.cmake:130 (MESSAGE):
  Unable to determine iconv() signature
Call Stack (most recent call first):
  CMakeLists.txt:95 (find_package)

Glib:

[633/776] Compiling C object 'gio/6ae6c9e@@gio-2.0@sha/gunixmounts.c.o'.
FAILED: gio/6ae6c9e@@gio-2.0@sha/gunixmounts.c.o
aarch64-linux-android-clang -Igio/6ae6c9e@@gio-2.0@sha -Igio -I../src/gio -I. -I../src/ -Iglib -I../src/glib -Igobject -I../src/gobject -Igmodule -I../src/gmodule -I/data/data/com.termux/files/usr/include -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu89 -Os -g -D_GNU_SOURCE -fno-strict-aliasing -Wall -Wimplicit-fallthrough -Wstrict-prototypes -Wunused -Wno-bad-function-cast -Wno-pedantic -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -fstack-protector-strong -Oz -D__BIONIC__=1 -fPIC -pthread '-DG_LOG_DOMAIN="GLib-GIO"' -DGIO_COMPILATION '-DGIO_MODULE_DIR="/data/data/com.termux/files/usr/lib/gio/modules"' -fvisibility=hidden -MD -MQ 'gio/6ae6c9e@@gio-2.0@sha/gunixmounts.c.o' -MF 'gio/6ae6c9e@@gio-2.0@sha/gunixmounts.c.o.d' -o 'gio/6ae6c9e@@gio-2.0@sha/gunixmounts.c.o' -c ../src/gio/gunixmounts.c
../src/gio/gunixmounts.c:616:11: error: implicit declaration of function 'hasmntopt' [-Werror,-Wimplicit-function-declaration]
      if (hasmntopt (mntent, MNTOPT_RO) != NULL)
          ^
../src/gio/gunixmounts.c:616:11: warning: this function declaration is not a prototype [-Wstrict-prototypes]
../src/gio/gunixmounts.c:616:41: warning: comparison between pointer and integer ('int' and 'void *') [-Wpointer-integer-compare]
      if (hasmntopt (mntent, MNTOPT_RO) != NULL)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
../src/gio/gunixmounts.c:1115:11: error: implicit declaration of function 'hasmntopt' [-Werror,-Wimplicit-function-declaration]
      if (hasmntopt (mntent, "bind"))

Iverilog:

mv parse.cc.h parse.h 2>/dev/null || mv parse.hh parse.h
mv: cannot stat 'parse.hh': No such file or directory
make: *** [Makefile:259: parse.h] Error 1
@buttaface

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2019

Submitted a pull with some of this info and to make ninja build on-device, #4161.

@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 11, 2019

It seems that make can be built without itself. It has script in its sources:

$ head -n2 build.sh.in 
#!/bin/sh
# Shell script to build GNU Make in the absence of any 'make' program.

Just added support for bootstrapping make in #4161.

@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 11, 2019

Continuing my attempt of building on device as much as possible.
Many packages have common errors which means their fixes probably will be same.

Libgcrypt:

libtool: compile:  aarch64-linux-android-clang -DHAVE_CONFIG_H -I. -I/data/data/com.termux/files/home/.termux-build/libgcrypt/src/cipher -I.. -I../src -I/data/data/com.termux/files/home/.termux-build/libgcrypt/src/src -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include -fstack-protector-strong -Oz -no-integrated-as -fvisibility=hidden -fno-delete-null-pointer-checks -Wall -c /data/data/com.termux/files/home/.termux-build/libgcrypt/src/cipher/cipher-poly1305.c  -fPIC -DPIC -o .libs/cipher-poly1305.o
/data/data/com.termux/files/usr/tmp/cipher-gcm-armv8-aarch64-ce-8a5612.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/cipher-gcm-armv8-aarch64-ce-8a5612.s:16: Error: selected processor does not support `pmull v1.1q,v4.1d,v23.1d'
/data/data/com.termux/files/usr/tmp/cipher-gcm-armv8-aarch64-ce-8a5612.s:16: Error: selected processor does not support `pmull2 v2.1q,v4.2d,v23.2d'
/data/data/com.termux/files/usr/tmp/cipher-gcm-armv8-aarch64-ce-8a5612.s:16: Error: selected processor does not support `pmull v9.1q,v0.1d,v24.1d'

Libmesode:

checking for expat >= 2.0.0... /data/data/com.termux/files/home/.termux-build/libmesode/src/configure: 12898: /data/data/com.termux/files/home/.termux-build/libmesode/src/configure: Syntax error: word unexpected (expecting ")")

Libpulseaudio:

./bootstrap.sh: line 38: intltoolize: command not found
intltoolize is required to bootstrap this program

Memcached:

memcached.c:8084:13: error: implicit declaration of function 'sigignore' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if (sigignore(SIGHUP) == -1) {
@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 11, 2019

Mpv:

[208/209] Linking build/mpv
23:29:05 runner ['aarch64-linux-android-clang', '-rdynamic', '-rdynamic', '-Wl,-z,noexecstack', '-Wl,-version-script', '-Wl,mpv.def', 'osdep/main-fn-unix.c.20.o', 'audio/aframe.c.19.o', 'audio/audio_buffer.c.19.o', 'audio/chmap.c.19.o', 'audio/chmap_sel.c.19.o', 'audio/decode/ad_lavc.c.19.o', 'audio/decode/ad_spdif.c.19.o', 'audio/filter/af_format.c.19.o', 'audio/filter/af_lavcac3enc.c.19.o', 'audio/filter/af_lavrresample.c.19.o', 'audio/filter/af_scaletempo.c.19.o', 'audio/fmt-conversion.c.19.o', 'audio/format.c.19.o', 'audio/out/ao.c.19.o', 'audio/out/ao_lavc.c.19.o', 'audio/out/ao_null.c.19.o', 'audio/out/ao_openal.c.19.o', 'audio/out/ao_pcm.c.19.o', 'audio/out/ao_pulse.c.19.o', 'audio/out/pull.c.19.o', 'audio/out/push.c.19.o', 'common/av_common.c.19.o', 'common/av_log.c.19.o', 'common/codecs.c.19.o', 'common/common.c.19.o', 'common/encode_lavc.c.19.o', 'common/msg.c.19.o', 'common/playlist.c.19.o', 'common/recorder.c.19.o', 'common/tags.c.19.o', 'common/version.c.19.o', 'demux/codec_tags.c.19.o', 'demux/cue.c.19.o', 'demux/demux.c.19.o', 'demux/demux_cue.c.19.o', 'demux/demux_disc.c.19.o', 'demux/demux_edl.c.19.o', 'demux/demux_lavf.c.19.o', 'demux/demux_libarchive.c.19.o', 'demux/demux_mf.c.19.o', 'demux/demux_mkv.c.19.o', 'demux/demux_mkv_timeline.c.19.o', 'demux/demux_null.c.19.o', 'demux/demux_playlist.c.19.o', 'demux/demux_rar.c.19.o', 'demux/demux_raw.c.19.o', 'demux/demux_timeline.c.19.o', 'demux/ebml.c.19.o', 'demux/packet.c.19.o', 'demux/timeline.c.19.o', 'filters/f_autoconvert.c.19.o', 'filters/f_auto_filters.c.19.o', 'filters/f_decoder_wrapper.c.19.o', 'filters/f_demux_in.c.19.o', 'filters/f_hwtransfer.c.19.o', 'filters/f_lavfi.c.19.o', 'filters/f_output_chain.c.19.o', 'filters/f_swresample.c.19.o', 'filters/f_swscale.c.19.o', 'filters/f_utils.c.19.o', 'filters/filter.c.19.o', 'filters/frame.c.19.o', 'filters/user_filters.c.19.o', 'input/cmd.c.19.o', 'input/event.c.19.o', 'input/input.c.19.o', 'input/ipc.c.19.o', 'input/ipc-unix.c.19.o', 'input/keycodes.c.19.o', 'misc/bstr.c.19.o', 'misc/charset_conv.c.19.o', 'misc/dispatch.c.19.o', 'misc/json.c.19.o', 'misc/node.c.19.o', 'misc/rendezvous.c.19.o', 'misc/ring.c.19.o', 'misc/thread_pool.c.19.o', 'options/m_config.c.19.o', 'options/m_option.c.19.o', 'options/m_property.c.19.o', 'options/options.c.19.o', 'options/parse_commandline.c.19.o', 'options/parse_configfile.c.19.o', 'options/path.c.19.o', 'player/audio.c.19.o', 'player/client.c.19.o', 'player/command.c.19.o', 'player/configfiles.c.19.o', 'player/external_files.c.19.o', 'player/loadfile.c.19.o', 'player/lua.c.19.o', 'player/main.c.19.o', 'player/misc.c.19.o', 'player/osd.c.19.o', 'player/playloop.c.19.o', 'player/screenshot.c.19.o', 'player/scripting.c.19.o', 'player/sub.c.19.o', 'player/video.c.19.o', 'stream/cache.c.19.o', 'stream/cache_file.c.19.o', 'stream/cookies.c.19.o', 'stream/rar.c.19.o', 'stream/stream.c.19.o', 'stream/stream_avdevice.c.19.o', 'stream/stream_cb.c.19.o', 'stream/stream_edl.c.19.o', 'stream/stream_file.c.19.o', 'stream/stream_lavf.c.19.o', 'stream/stream_libarchive.c.19.o', 'stream/stream_memory.c.19.o', 'stream/stream_mf.c.19.o', 'stream/stream_null.c.19.o', 'stream/stream_rar.c.19.o', 'sub/dec_sub.c.19.o', 'sub/draw_bmp.c.19.o', 'sub/filter_sdh.c.19.o', 'sub/img_convert.c.19.o', 'sub/lavc_conv.c.19.o', 'sub/osd.c.19.o', 'sub/osd_dummy.c.19.o', 'sub/sd_lavc.c.19.o', 'video/csputils.c.19.o', 'video/decode/vd_lavc.c.19.o', 'video/filter/refqueue.c.19.o', 'video/filter/vf_format.c.19.o', 'video/filter/vf_sub.c.19.o', 'video/fmt-conversion.c.19.o', 'video/hwdec.c.19.o', 'video/image_loader.c.19.o', 'video/image_writer.c.19.o', 'video/img_format.c.19.o', 'video/mp_image.c.19.o', 'video/mp_image_pool.c.19.o', 'video/out/aspect.c.19.o', 'video/out/bitmap_packer.c.19.o', 'video/out/dither.c.19.o', 'video/out/dr_helper.c.19.o', 'video/out/filter_kernels.c.19.o', 'video/out/gpu/context.c.19.o', 'video/out/gpu/hwdec.c.19.o', 'video/out/gpu/lcms.c.19.o', 'video/out/gpu/libmpv_gpu.c.19.o', 'video/out/gpu/osd.c.19.o', 'video/out/gpu/ra.c.19.o', 'video/out/gpu/shader_cache.c.19.o', 'video/out/gpu/spirv.c.19.o', 'video/out/gpu/user_shaders.c.19.o', 'video/out/gpu/utils.c.19.o', 'video/out/gpu/video.c.19.o', 'video/out/gpu/video_shaders.c.19.o', 'video/out/vo.c.19.o', 'video/out/vo_caca.c.19.o', 'video/out/vo_gpu.c.19.o', 'video/out/vo_image.c.19.o', 'video/out/vo_lavc.c.19.o', 'video/out/vo_libmpv.c.19.o', 'video/out/vo_mediacodec_embed.c.19.o', 'video/out/vo_null.c.19.o', 'video/out/vo_tct.c.19.o', 'video/out/win_state.c.19.o', 'video/sws_utils.c.19.o', 'osdep/terminal-unix.c.19.o', 'osdep/io.c.19.o', 'osdep/threads.c.19.o', 'osdep/timer.c.19.o', 'osdep/timer-linux.c.19.o', 'osdep/polldev.c.19.o', 'osdep/android/posix-spawn.c.19.o', 'osdep/android/strnlen.c.19.o', 'osdep/path-unix.c.19.o', 'osdep/semaphore_osx.c.19.o', 'osdep/subprocess.c.19.o', 'osdep/subprocess-posix.c.19.o', 'ta/ta.c.19.o', 'ta/ta_talloc.c.19.o', 'ta/ta_utils.c.19.o', '-o/data/data/com.termux/files/home/.termux-build/mpv/src/build/mpv', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/data/data/com.termux/files/usr/lib', '-L/data/data/com.termux/files/usr/lib', '-L/data/data/com.termux/files/usr/lib', '-L/data/data/com.termux/files/usr/lib', '-L/data/data/com.termux/files/usr/lib', '-L/data/data/com.termux/files/usr/lib', '-L/data/data/com.termux/files/usr/lib', '-L/data/data/com.termux/files/usr/lib', '-lcaca', '-llua5.2', '-lm', '-lopenal', '-liconv', '-lm', '-lpulse', '-lrt', '-lavutil', '-lavcodec', '-lavformat', '-lswscale', '-lavfilter', '-lswresample', '-larchive', '-lavcodec', '-lavdevice', '-lz', '-L/data/data/com.termux/files/usr/lib', '-Wl,-rpath=/data/data/com.termux/files/usr/lib,--enable-new-dtags', '-Wl,--as-needed', '-Wl,-z,relro,-z,now', '-landroid-support', '-landroid-glob']
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: /system/lib64/libsqlite.so: undefined reference to `uregex_close_60'
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: /system/lib64/libminikin.so: undefined reference to `ubidi_close_60'
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: /system/lib64/libsqlite.so: undefined reference to `ucol_getSortKey_60'
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: /system/lib64/libminikin.so: undefined reference to `unorm2_getNFDInstance_60'
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: /system/lib64/libhwui.so: undefined reference to `ucnv_toUChars_60'

Neovim:

==== Building LuaJIT 2.0.5 ====
lj_arch.h:55:2: error: "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
 ^
lj_arch.h:294:2: error: "No target architecture defined"
#error "No target architecture defined"
 ^
lj_arch.h:317:2: error: "Need at least GCC 4.3 or newer"
#error "Need at least GCC 4.3 or newer"

Netpbm:

Netpbm is built.  The next step is normally to package it 
for installation by running 

    make package pkgdir=DIR

to copy all the Netpbm files you need to install into the 
directory DIR.  Then you can proceed to install.
Package x11 was not found in the pkg-config search path.
Perhaps you should add the directory containing `x11.pc'
to the PKG_CONFIG_PATH environment variable
No package 'x11' found
mkdir /tmp/netpbm
mkdir: cannot create directory ‘/tmp/netpbm’: No such file or directory
make: *** [GNUmakefile:241: init_package] Error 1

Php:

/data/data/com.termux/files/home/.termux-build/php/src/ext/standard/dns.c:1046:21: error: variable has incomplete type 'struct __res_state'
        struct __res_state state;

Play-audio:

aarch64-linux-android-clang++  -fstack-protector-strong -Oz -Wall -Wextra -Werror -std=c++14 -fno-exceptions -I/data/data/com.termux/files/usr/include -L/data/data/com.termux/files/usr/lib -Wl,-rpath=/data/data/com.termux/files/usr/lib,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now -lOpenSLES  play-audio.cpp   -o play-audio
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: /data/data/com.termux/files/usr/tmp/play-audio-879959.o: in function `AudioPlayer::AudioPlayer()':
play-audio.cpp:(.text+0x44): undefined reference to `slCreateEngine'

Python:

checking for the Android API level... 
Fatal: you must define __ANDROID_API__

Qalc:

/data/data/com.termux/files/home/.termux-build/qalc/src/configure: 1: /data/data/com.termux/files/home/.termux-build/qalc/src/configure: intltool-update: not found
checking for intltool-update... no
checking for intltool-merge... no
checking for intltool-extract... no
configure: error: The intltool scripts were not found. Please install intltool.
@buttaface

This comment has been minimized.

Copy link
Contributor Author

commented Aug 12, 2019

Looking into having CMake set CMAKE_SYSTEM_NAME and CMAKE_HOST_SYSTEM_NAME to Android by default on device and avoid the NDK support, got it to work with a small CMake project, cmark, but I think I'll need to look into the Android/Linux platform Modules more for a more robust patch. I should have a CMake pull later this week.

@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

Serf (require scons build tool):

/data/data/com.termux/files/home/termux-packages/packages/serf/build.sh: line 14: scons: command not found

Transmission:

config.status: creating web/style/transmission/images/buttons/Makefile
config.status: creating web/javascript/Makefile
config.status: creating web/javascript/jquery/Makefile
config.status: error: cannot find input file: `po/Makefile.in.in'

Valgrind (requires static libc):

aarch64-linux-android-clang -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare  -static -Oz -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare   -Wl,-z,noexecstack  -L/data/data/com.termux/files/usr/lib -Wl,-rpath=/data/data/com.termux/files/usr/lib,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now -o valgrind valgrind-launcher-linux.o valgrind-m_debuglog.o  
aarch64-linux-android-clang -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare  -static -Oz -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare   -L/data/data/com.termux/files/usr/lib -Wl,-rpath=/data/data/com.termux/files/usr/lib,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now -o vgdb vgdb-vgdb.o vgdb-vgdb-invoker-none.o     
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lc
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)

Wordgrinder:

/data/data/com.termux/files/home/.termux-build/wordgrinder/src/build/lua: build.lua:70: unable to generate a unique filename
stack traceback:
	[C]: in function 'tmpname'
	build.lua:70: in function 'package_flags'
	build.lua:403: in main chunk
	[C]: ?

Zbar:

config.status: creating zbar-gtk.pc
config.status: creating zbar-qt.pc
config.status: creating doc/doxygen.conf
config.status: creating include/config.h
config.status: executing depfiles commands
./config.status: 1532: shift: can't shift that many
@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

Finished my on-device "build session". Stats:

  • Got 553 deb files. List: https://pastebin.com/PqGL9rvg
  • Build directory took 13 GB of space in $HOME.
  • Device's arch is aarch64.
  • Device 2 times rebooted during compilation due to kernel oops (null pointer dereference).

Packages that are disabled for building on device are omitted. The same goes to packages which take long time to compile and few golang-based packages.

@buttaface

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

Great to see so many packages building fine, that's 70% of the 788 aarch64 deb packages. Why skip a few Go packages?

@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

Because I will run out of space. Their build directories expand too much at the build time process and after building other packages I had only 2.6 GB on internal storage left after building non-go packages.

$ du -hs *
32K	_cache
282M	gitea
135M	golang
31M	gotty
44M	hub
404M	hugo
632M	ipfs
795M	keybase
251M	micro
23M	obfs4proxy
163M	rclone
130M	restic
163M	syncthing
90M	tweego

I just built most of them. Golang & fzf are disabled for on-device builds. Gitea fails at:

go generate code.gitea.io/gitea code.gitea.io/gitea/cmd code.gitea.io/gitea/contrib/pr code.gitea.io/gitea/models code.gitea.io/gitea/models/migrations code.gitea.io/gitea/modules/auth code.gitea.io/gitea/modules/auth/ldap code.gitea.io/gitea/modules/auth/oauth2 code.gitea.io/gitea/modules/auth/openid code.gitea.io/gitea/modules/auth/pam code.gitea.io/gitea/modules/avatar code.gitea.io/gitea/modules/base code.gitea.io/gitea/modules/cache code.gitea.io/gitea/modules/context code.gitea.io/gitea/modules/cron code.gitea.io/gitea/modules/generate code.gitea.io/gitea/modules/gzip code.gitea.io/gitea/modules/highlight code.gitea.io/gitea/modules/httplib code.gitea.io/gitea/modules/indexer code.gitea.io/gitea/modules/indexer/issues code.gitea.io/gitea/modules/lfs code.gitea.io/gitea/modules/log code.gitea.io/gitea/modules/mailer code.gitea.io/gitea/modules/markup code.gitea.io/gitea/modules/markup/csv code.gitea.io/gitea/modules/markup/external code.gitea.io/gitea/modules/markup/markdown code.gitea.io/gitea/modules/markup/orgmode code.gitea.io/gitea/modules/metrics code.gitea.io/gitea/modules/minwinsvc code.gitea.io/gitea/modules/notification code.gitea.io/gitea/modules/notification/base code.gitea.io/gitea/modules/notification/indexer code.gitea.io/gitea/modules/notification/mail code.gitea.io/gitea/modules/notification/ui code.gitea.io/gitea/modules/options code.gitea.io/gitea/modules/pprof code.gitea.io/gitea/modules/private code.gitea.io/gitea/modules/process code.gitea.io/gitea/modules/public code.gitea.io/gitea/modules/recaptcha code.gitea.io/gitea/modules/search code.gitea.io/gitea/modules/secret code.gitea.io/gitea/modules/session code.gitea.io/gitea/modules/setting code.gitea.io/gitea/modules/ssh code.gitea.io/gitea/modules/structs code.gitea.io/gitea/modules/sync code.gitea.io/gitea/modules/templates code.gitea.io/gitea/modules/test code.gitea.io/gitea/modules/uploader code.gitea.io/gitea/modules/user code.gitea.io/gitea/modules/util code.gitea.io/gitea/modules/validation code.gitea.io/gitea/routers code.gitea.io/gitea/routers/admin code.gitea.io/gitea/routers/api/v1 code.gitea.io/gitea/routers/api/v1/admin code.gitea.io/gitea/routers/api/v1/convert code.gitea.io/gitea/routers/api/v1/misc code.gitea.io/gitea/routers/api/v1/org code.gitea.io/gitea/routers/api/v1/repo code.gitea.io/gitea/routers/api/v1/swagger code.gitea.io/gitea/routers/api/v1/user code.gitea.io/gitea/routers/api/v1/utils code.gitea.io/gitea/routers/dev code.gitea.io/gitea/routers/org code.gitea.io/gitea/routers/private code.gitea.io/gitea/routers/repo code.gitea.io/gitea/routers/routes code.gitea.io/gitea/routers/user code.gitea.io/gitea/routers/user/setting code.gitea.io/gitea/routers/utils
bindata.go
sed: Unknown option .bak (see "sed --help")
modules/options/options.go:9: running "sed": exit status 1
bindata.go
sed: Unknown option .bak (see "sed --help")
modules/public/public.go:22: running "sed": exit status 1
bindata.go
sed: Unknown option .bak (see "sed --help")
modules/templates/templates.go:9: running "sed": exit status 1
make: *** [Makefile:103: generate] Error 1
@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

What is fixed:

  • Attempts to use posix_spawn by some packages.

  • liblog linking problems.

  • libiconv linking problems.

@termux termux deleted a comment from muhdali00001 Aug 14, 2019
@Grimler91

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

I was hoping that using
test ! -z "$TERMUX_PKG_BUILD_DEPENDS" && echo "Build-Depends: $TERMUX_PKG_BUILD_DEPENDS" >> DEBIAN/control
would make it possible to install build-dependencies with apt build-dep {PKG}, but that wasn't how Build-Depends works unfortunately.

I suppose that creating a script setup-termux.sh that installs build dependencies like setup-ubuntu.sh does is the best way to make sure necessary tools for building packages

@xeffyr

This comment has been minimized.

Copy link
Member

commented Aug 16, 2019

asciidoc is now available for installation (at time of writing for android-7 only). Problems with packages requiring asciidoc are now solved & packages are building on device fine.

@buttaface

This comment has been minimized.

Copy link
Contributor Author

commented Aug 23, 2019

Is there a regression with CMake where it no longer detects CMAKE_HOST_SYSTEM_PROCESSOR and CMAKE_SYSTEM_PROCESSOR, returning "Process failed because: No such file or directory" instead? I've been making the aforementioned modifications to set CMAKE_SYSTEM_NAME to Android in Termux, then I started hitting strange errors for CMake projects that check the host processor, which I hadn't seen before. I checked with stock CMake 3.15.2 on another device using the Android-5 package repo and I see the problem there too, which makes me think this might be tied to all the recent busybox/coreutils changes, not CMake?

To be precise, this is the invocation of uname -m that breaks now. Just check that variable in a CMake project by adding this line, message(STATUS "What is the host proc? ${CMAKE_HOST_SYSTEM_PROCESSOR}") and you will likely see that error, which I'm pretty sure is a recent regression.

Update: found the bug and fixed it in #4212.

@termux termux temporarily blocked dirapratama Sep 19, 2019
@termux termux deleted a comment from dirapratama Sep 19, 2019
@fornwall fornwall unpinned this issue Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.