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

Enable texlive #752

Merged
merged 29 commits into from
Mar 8, 2017
Merged

Enable texlive #752

merged 29 commits into from
Mar 8, 2017

Conversation

rnauber
Copy link
Contributor

@rnauber rnauber commented Feb 8, 2017

This PR finishes the work of making texlive build without bundled dependencies. Therefore it makes harfbuzz depend on icu and graphite. This should not bloat this package too much.

Thanks for merging,
Richard

@Grimler91
Copy link
Member

Great job creating texlive for termux! :)

I've been trying to compile the package version but I can't figure out how to compile teckit. This is the error from make:

make  all-recursive
make[1]: Entering directory `/home/builder/.termux-build/texlive/build/libs/teckit`
Making all in .
make[2]: Entering directory `/home/builder/.termux-build/texlive/build/libs/teckit`
arm-linux-androideabi-clang++ -Wimplicit -Wreturn-type -Wno-unknown-pragmas -Wno-write-strings -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os  -L/data/data/com.termux/files/usr/lib -march=armv7-a -Wl,--fix-cortex-a8 -o teckit_compile TECkit-src/source/Sample-tools/TECkit_Compile.o libTECkit_Compiler.a -lz
/home/builder/.termux-build/_lib/toolchain-arm-ndk13-api21-v10/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: libTECkit_Compiler.a: bad extended name index at 8                                                                                             
TECkit-src/source/Sample-tools/TECkit_Compile.o:/home/builder/.termux-build/texlive/src/libs/teckit/TECkit-src/source/Sample-tools/TECkit_Compile.cpp:function main: error: undefined reference to 'TECkit_CompileOpt'                                                                                    
TECkit-src/source/Sample-tools/TECkit_Compile.o:/home/builder/.termux-build/texlive/src/libs/teckit/TECkit-src/source/Sample-tools/TECkit_Compile.cpp:function main: error: undefined reference to 'TECkit_DisposeCompiled'                                                                               
clang38++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [teckit_compile] Error 1                                                                                                                
make[2]: Leaving directory `/home/builder/.termux-build/texlive/build/libs/teckit'
make[1]: *** [all-recursive] Error 1                                                                                                                 
make[1]: Leaving directory `/home/builder/.termux-build/texlive/build/libs/teckit'
make: *** [all] Error 2

Does it look familiar? It feels like one of the teckit headers needs a patch to work for android (or maybe I'm missing some obvious package in my build environment).

@its-pointless
Copy link
Contributor

compiles here on docker image for aarch64 and arm

@Grimler91
Copy link
Member

@its-pointless Thanks for verifying! I'm also using the docker image and building for arm.
I'll keep investigating it.

@its-pointless
Copy link
Contributor

its not ready to be enabled as yet. Script issues and other non working things.

@rnauber
Copy link
Contributor Author

rnauber commented Feb 11, 2017

@its-pointless could you please list those issues and how to reproduce them? Then we can eradicate them piece by piece!

@rnauber
Copy link
Contributor Author

rnauber commented Feb 14, 2017

Hi, could you please test this?
Thanks!

@its-pointless
Copy link
Contributor

this is a lot better
i will get into it a bit further in next few days. But yeah good work.

@fornwall
Copy link
Member

Really impressive!

I'm wondering about the termux-install-tl step. Never having used texlive myself, could you describe what this does? Could the files that this script installs be part of the texlive package itself, instead of being installed in a postinstall hook?

@vishalbiswas
Copy link
Contributor

I really don't like that it uses $PREFIX/local and exports it in profile.d
I don't think a package should modify anything in profile.d

@fornwall It contains arch independent data for texlive. I suspect the size of it is very large and will greatly increase the size of the package repo.

@rnauber
Copy link
Contributor Author

rnauber commented Feb 16, 2017

@fornwall as @vishalbiswas already said, the texlive data files are >1GB. So the approach of this package is to only contain the binaries, use the official texlive installer to fetch a minimal set from the canonical sources and further use the native texlive packet manager. This is done by the termux-install-tl script, which is a wrapper around the texlive installer.

By using the texlive package manager, we get a really get the fine-grained packages that are needed for mobile devices, rather than repackaging them in big chunks, as the other distros do https://www.tug.org/texlive/distro.html ...

Regarding the profile.d change, what is the best way to add something to the PATH in termux?

Grimler91 and others added 3 commits February 16, 2017 21:21
Disabling pmx removed the need for termux_step_post_extract_package
part.

This removed the a hardcoded minor version letter ("b") from SRCURL. Had to
use _MAJOR_VERSION in PKG_FOLDERNAME though.
Small simplification to texlive build.sh
@its-pointless
Copy link
Contributor

http://www.pathname.com/fhs/pub/fhs-2.3.html
Apparently the correct directory would be opt not local?

TEXMFLOCAL $PREFIX/local/texlive/texmf-local
TEXMFSYSCONFIG $PREFIX/local/texlive/${TL_VERSION}/texmf-config
TEXMFSYSVAR $PREFIX/local/texlive/${TL_VERSION}/texmf-var
TEXMFLOCAL $PREFIX/opt/texlive/texmf-local
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$PREFIX/opt/texlive/" could be replaced by "${TL_ROOT}/"

@Grimler91
Copy link
Member

Grimler91 commented Feb 22, 2017

I'm getting another error when trying to build now. (My previous error was due to a badly configured build-environment).

It seems like configuring in /home/builder/.termux-build/texlive/build/libs/luajit/native fails:

=== configuring in native (/home/builder/.termux-build/texlive/build/libs/luajit/native)
configure: running /bin/bash /home/builder/.termux-build/texlive/src/libs/luajit/native/configure --disable-option-checking '--prefix=/data/data/com.termux/files/usr/opt/texlive/2016'  '--disable-dependency-tracking' '--disable-rpath' '--disable-rpath-hack' '--host=arm-linux-androideabi' 'AR=ar' 'RANLIB=ranlib' 'BUILDAR=ar' 'BUILDRANLIB=ranlib' '--bindir=/data/data/com.termux/files/usr/opt/texlive/2016/bin/pkg' '--libdir=/data/data/com.termux/files/usr/lib' '--build=x86_64-pc-linux-gnu' '--enable-ttfdump=no' '--enable-makeindexk=no' '--enable-makejvf=no' '--enable-mendexk=no' '--enable-musixtnt=no' '--enable-ps2pk=no' '--enable-seetexk=no' '--enable-gregorio=no' '--disable-native-texlive-build' '--disable-bibtexu' '--disable-dvisvgm' '--disable-dialog' '--disable-psutils' '--disable-multiplatform' '--disable-t1utils' '--enable-luatex' '--disable-luajittex' '--disable-mflua' '--disable-mfluajit' '--disable-xz' '--disable-pmx' '--without-texinfo' '--without-xdvipdfmx' '--without-texi2html' '--with-system-cairo' '--with-system-graphite2' '--with-system-harfbuzz' '--with-system-gd' '--with-system-gmp' '--with-system-icu' '--with-system-mpfr' '--with-system-poppler' '--with-system-zlib' '--with-system-xpdf' '--with-system-lua' '--without-x' '--with-banner-add=/Termux' '--disable-nls' '--enable-shared' '--disable-static' '--libexecdir=/data/data/com.termux/files/usr/libexec' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=arm-linux-androideabi' 'CC=arm-linux-androideabi-clang' 'CFLAGS= -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os' 'LDFLAGS=-L/data/data/com.termux/files/usr/lib -march=armv7-a -Wl,--fix-cortex-a8' 'CPPFLAGS=-I/data/data/com.termux/files/usr/include' 'CPP=arm-linux-androideabi-cpp' 'CXX=arm-linux-androideabi-clang++' 'CXXFLAGS= -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os' '--enable-largefile' '--disable-silent-rules' '--enable-cxx-runtime-hack=no' '--enable-libtool-hack=yes' '--enable-texlive-build' '--enable-autosp=yes' '--enable-devnag=yes' '--enable-lacheck=yes' '--enable-m-tx=yes' '--enable-ps2eps=yes' '--enable-texdoctk=yes' '--enable-tpic2pdftex=yes' '--enable-vlna=yes' '--disable-xindy' '--with-clisp-runtime=system' '--disable-xpdfopen' '--enable-web2c=yes' '--enable-afm2pl=yes' '--enable-bibtex-x=yes' '--enable-chktex=yes' '--enable-cjkutils=yes' '--enable-detex=yes' '--enable-dtl=yes' '--enable-dvi2tty=yes' '--enable-dvidvi=yes' '--enable-dviljk=yes' '--enable-dvipdfm-x=yes' '--enable-dvipng=yes' '--enable-dvipos=yes' '--enable-dvipsk=yes' '--enable-gsftopk=yes' '--enable-lcdf-typetools=yes' '--enable-tex4htk=yes' '--enable-ttf2pk2=yes' '--enable-upmendex=yes' '--disable-xdvik' '--enable-texlive=yes' '--with-system-teckit=no' '--with-system-zziplib=no' '--with-system-pixman' '--with-system-potrace=no' '--with-system-libpng' '--with-system-freetype2' '--with-system-libpaper=no' '--with-system-ptexenc=no' '--with-system-kpathsea=no' '--disable-build' 'HOST_PTR_SIZE=4' 'DASM_ARCH=arm' '--host=x86_64-pc-linux-gnu' 'CC=' 'CFLAGS=' 'CPPFLAGS=' 'LDFLAGS=' --cache-file=/dev/null --srcdir=/home/builder/.termux-build/texlive/src/libs/luajit/native
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for x86_64-pc-linux-gnu-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether the compiler accepts prototypes... yes
checking what warning flags to pass to the C compiler... -Wimplicit -Wreturn-type
checking for x86_64-pc-linux-gnu-gcc... gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) none
checking whether ln -s works... yes
checking how to run the C preprocessor... arm-linux-androideabi-cpp
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of void *... 8
configure: WARNING: pointer size mismatch in cross-build; use a 32bit compiler BULDCC.
configure: WARNING: trying: gcc -m32
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for library containing pow... no
configure: error: Sorry, did not find pow()
configure: error: /home/builder/.termux-build/texlive/src/libs/luajit/native/configure failed for native
=== configuring in luajit failed
Makefile:898: recipe for target 'recurse' failed
make[2]: *** [recurse] Error 1
make[2]: Leaving directory '/home/builder/.termux-build/texlive/build/libs'
Makefile:478: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/builder/.termux-build/texlive/build/libs'
Makefile:569: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

CC, CFLAGS, CPPFLAGS and LDFLAGS are passed twice in the configure command (and the second time they are empty) so the build seem to fail due to not finding headers etc (I at least think that this is the problem).
Configuring in /home/builder/.termux-build/texlive/build/libs/luajit/ and many other folders worked fine.

I'm not sure if this is due to how build-package.sh builds or if it's an error in some Makefile in texlive.

Does anyone have a suggestion for a fix or could you point me in the right direction?

@rnauber
Copy link
Contributor Author

rnauber commented Feb 22, 2017

strange, it works for me at 77a2e1e for arm outside a docker container:
(see next post)

@mklein994
Copy link
Contributor

Can anyone build texlive and post a link to the .deb file? I'm willing to test. Also, how big is the package?

@mklein994
Copy link
Contributor

graphite and libicu support for harfbuzz enabled: dbe34b2

@Grimler91
Copy link
Member

@mklein994 Which arch do you need?
The package is about 111 MB with the (very minimum) installation profile termux-install-tl currently provides. It can probably be decreased a bit though, the binaries are 18 MB and exists at two places after the installation (for example).

@fornwall you're probably right that gcc-multilib isn't really needed. It was needed for compiling luajit but luajit shouldn't be necessary (I think). I tried building with a

termux_step_post_extract_package () {
    rm -rdf $TERMUX_PKG_SRCDIR/libs/luajit
}

function, and it built fine without gcc-multilib (and seems to work on my arm device).

@mklein994
Copy link
Contributor

@Grimler91 arm would be great. Thank you! Space is not an issue; I was guessing over 1 GB.

@Grimler91
Copy link
Member

@mklein994 I've uploaded all the debs needed here. These are built with the latest commit to rnauber/termux-packages.

@mklein994
Copy link
Contributor

Thank you very much, but but before I bork my phone, I noticed that harfbuzz is at version 1.4.1, not 1.4.3 where libicu and graphite are enabled. Is that a problem?

@Grimler91
Copy link
Member

@mklein994 Hmm, termux's harfbuzz + libicu (+harfbuzz-icu?) should work instead of the 1.4.1 version I uploaded. Both have been built with icu and graphite2.

I can upload updated .deb files to the same repo tomorrow.

Removed gcc-multilib from setup-ubuntu.sh.
Reverted previous changes to the texlive.sh profile.
Added patch for texlive's install-tl script to get rid off warning when
fmtutil is run during installation.

Removing gcc-multilib meant adding a termux_step_post_extract_package function
to remote luajit folder from source as well. (Recursive build fails otherwise)

install-tl currently run's fmtutil with the '--no-strict', but this isn't
implemented in current texlive version (development version of fmtutil.pl has
this option).
@mklein994
Copy link
Contributor

@Grimler91 good news: it works! I used the existing packages from termux.net, and just installed the texlive package. Here's the install-tl.log file:

Automated TeX Live installation using profile: texlive_inst.profile
Trying to verify cryptographic signatures!
Loading http://ctan.math.ca/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Installing TeX Live 2016 from: http://ctan.math.ca/tex-archive/systems/texlive/tlnet (verified)
Platform: armel-linux => 'GNU/Linux on ARM'
Platform overridden, binaries taken from /data/data/com.termux/files/usr/opt/texlive/2016/bin/pkg
and will be installed into .../bin/custom.
Distribution: net  (downloading)
Using URL: http://ctan.math.ca/tex-archive/systems/texlive/tlnet
Directory for temporary files: /data/data/com.termux/files/usr/tmp/EQEuHaljRp
Installer revision: 41646
Database revision: 43377
Settings:
  TEXDIR: "/data/data/com.termux/files/usr/opt/texlive/2016"
  TEXMFCONFIG: "~/.texlive2016/texmf-config"
  TEXMFHOME: "~/texmf"
  TEXMFLOCAL: "/data/data/com.termux/files/usr/opt/texlive/texmf-local"
  TEXMFSYSCONFIG: "/data/data/com.termux/files/usr/opt/texlive/2016/texmf-config"
  TEXMFSYSVAR: "/data/data/com.termux/files/usr/opt/texlive/2016/texmf-var"
  TEXMFVAR: "~/.texlive2016/texmf-var"
  binary_amd64-freebsd: "0"
  binary_amd64-netbsd: "0"
  binary_armel-linux: "0"
  binary_armhf-linux: "0"
  binary_i386-cygwin: "0"
  binary_i386-freebsd: "0"
  binary_i386-linux: "0"
  binary_i386-netbsd: "0"
  binary_i386-solaris: "0"
  binary_powerpc-linux: "0"
  binary_sparc-solaris: "0"
  binary_universal-darwin: "0"
  binary_win32: "0"
  binary_x86_64-cygwin: "0"
  binary_x86_64-darwin: "0"
  binary_x86_64-linux: "0"
  binary_x86_64-solaris: "0"
  collection-basic: "1"
  collection-bibtexextra: "0"
  collection-binextra: "0"
  collection-context: "0"
  collection-fontsextra: "0"
  collection-fontsrecommended: "0"
  collection-fontutils: "0"
  collection-formatsextra: "0"
  collection-games: "0"
  collection-genericextra: "0"
  collection-genericrecommended: "0"
  collection-htmlxml: "0"
  collection-humanities: "0"
  collection-langafrican: "0"
  collection-langarabic: "0"
  collection-langchinese: "0"
  collection-langcjk: "0"
  collection-langcyrillic: "0"
  collection-langczechslovak: "0"
  collection-langenglish: "0"
  collection-langeuropean: "0"
  collection-langfrench: "0"
  collection-langgerman: "0"
  collection-langgreek: "0"
  collection-langindic: "0"
  collection-langitalian: "0"
  collection-langjapanese: "0"
  collection-langkorean: "0"
  collection-langother: "0"
  collection-langpolish: "0"
  collection-langportuguese: "0"
  collection-langspanish: "0"
  collection-latex: "1"
  collection-latexextra: "0"
  collection-latexrecommended: "0"
  collection-luatex: "1"
  collection-mathscience: "0"
  collection-metapost: "0"
  collection-music: "0"
  collection-omega: "0"
  collection-pictures: "0"
  collection-plainextra: "0"
  collection-pstricks: "0"
  collection-publishers: "0"
  collection-texworks: "0"
  collection-wintools: "0"
  collection-xetex: "0"
  doc_splitting_supported: "1"
  in_place: "0"
  n_collections_available: "47"
  n_collections_selected: "46"
  n_systems_available: "17"
  n_systems_selected: "0"
  option_adjustrepo: "1"
  option_autobackup: "1"
  option_backupdir: "tlpkg/backups"
  option_desktop_integration: "0"
  option_doc: "0"
  option_file_assocs: "0"
  option_fmt: "1"
  option_letter: "0"
  option_menu_integration: "1"
  option_path: "0"
  option_post_code: "1"
  option_src: "0"
  option_sys_bin: "/data/data/com.termux/files/usr/bin"
  option_sys_info: "/data/data/com.termux/files/usr/local/share/info"
  option_sys_man: "/data/data/com.termux/files/usr/local/share/man"
  option_w32_multi_user: "0"
  option_write18_restricted: "1"
  portable: "0"
  selected_scheme: "scheme-custom"
  src_splitting_supported: "1"
  this_platform: "armel-linux"
  total_size: "0"
Installing to: /data/data/com.termux/files/usr/opt/texlive/2016
Installing [001/106, time/total: ??:??/??:??]: ae [57k]
Installing [002/106, time/total: 00:02/04:01]: amscls [32k]
Installing [003/106, time/total: 00:04/05:07]: amsfonts [3542k]
Installing [004/106, time/total: 00:09/00:16]: amsmath [30k]
Installing [005/106, time/total: 00:11/00:20]: babel [24k]
Installing [006/106, time/total: 00:13/00:23]: babel-english [3k]
Installing [007/106, time/total: 00:15/00:27]: babelbib [26k]
Installing [008/106, time/total: 00:18/00:32]: bibtex [15k]
Installing [009/106, time/total: 00:20/00:36]: carlisle [12k]
Installing [010/106, time/total: 00:21/00:37]: checkcites [5k]
Installing [011/106, time/total: 00:23/00:41]: chickenize [11k]
Installing [012/106, time/total: 00:25/00:45]: cloze [5k]
Installing [013/106, time/total: 00:27/00:48]: cm [234k]
Installing [014/106, time/total: 00:30/00:50]: collection-basic [1k]
Installing [015/106, time/total: 00:31/00:52]: collection-latex [1k]
Installing [016/106, time/total: 00:33/00:55]: collection-luatex [1k]
Installing [017/106, time/total: 00:35/00:59]: colortbl [4k]
Installing [018/106, time/total: 00:37/01:02]: cstypo [2k]
Installing [019/106, time/total: 00:39/01:05]: ctablestack [2k]
Installing [020/106, time/total: 00:41/01:09]: dvipdfmx [26k]
Installing [021/106, time/total: 00:43/01:12]: dvips [34k]
Installing [022/106, time/total: 00:45/01:14]: enctex [24k]
Installing [023/106, time/total: 00:47/01:17]: enigma [18k]
Installing [024/106, time/total: 00:49/01:20]: etex [12k]
Installing [025/106, time/total: 00:51/01:23]: etex-pkg [6k]
Installing [026/106, time/total: 00:53/01:27]: fancyhdr [9k]
Installing [027/106, time/total: 00:55/01:30]: fix2col [3k]
Installing [028/106, time/total: 00:57/01:33]: geometry [9k]
Installing [029/106, time/total: 00:59/01:36]: glyphlist [25k]
Installing [030/106, time/total: 01:01/01:39]: graphics [14k]
Installing [031/106, time/total: 01:03/01:42]: graphics-cfg [2k]
Installing [032/106, time/total: 01:05/01:45]: graphics-def [24k]
Installing [033/106, time/total: 01:07/01:47]: gsftopk [4k]
Installing [034/106, time/total: 01:09/01:51]: hyperref [106k]
Installing [035/106, time/total: 01:12/01:53]: hyph-utf8 [16k]
Installing [036/106, time/total: 01:14/01:55]: hyphen-base [22k]
Installing [037/106, time/total: 01:16/01:58]: ifluatex [3k]
Installing [038/106, time/total: 01:18/02:01]: ifxetex [2k]
Installing [039/106, time/total: 01:19/02:02]: interpreter [7k]
Installing [040/106, time/total: 01:21/02:05]: knuth-lib [30k]
Installing [041/106, time/total: 01:23/02:07]: knuth-local [23k]
Installing [042/106, time/total: 01:26/02:11]: kpathsea [30k]
Installing [043/106, time/total: 01:28/02:14]: latex [160k]
Installing [044/106, time/total: 01:30/02:12]: latex-bin [1k]
Installing [045/106, time/total: 01:32/02:15]: latex-fonts [18k]
Installing [046/106, time/total: 01:34/02:17]: latexconfig [5k]
Installing [047/106, time/total: 01:36/02:20]: ltxmisc [16k]
Installing [048/106, time/total: 01:38/02:22]: lua-alt-getopt [2k]
Installing [049/106, time/total: 01:40/02:25]: lua-check-hyphen [4k]
Installing [050/106, time/total: 01:42/02:28]: lua-visual-debug [4k]
Installing [051/106, time/total: 01:43/02:29]: lua2dox [8k]
Installing [052/106, time/total: 01:45/02:32]: luabibentry [3k]
Installing [053/106, time/total: 01:47/02:35]: luabidi [3k]
Installing [054/106, time/total: 01:49/02:38]: luacode [3k]
Installing [055/106, time/total: 01:51/02:41]: luahyphenrules [3k]
Installing [056/106, time/total: 01:53/02:43]: luaindex [5k]
Installing [057/106, time/total: 01:55/02:46]: luainputenc [5k]
Installing [058/106, time/total: 01:57/02:49]: luaintro [1k]
Installing [059/106, time/total: 01:59/02:52]: lualatex-doc [1k]
Installing [060/106, time/total: 02:01/02:55]: lualatex-math [3k]
Installing [061/106, time/total: 02:03/02:57]: lualibs [72k]
Installing [062/106, time/total: 02:05/02:58]: luamplib [12k]
Installing [063/106, time/total: 02:07/03:00]: luaotfload [432k]
Installing [064/106, time/total: 02:10/02:49]: luasseq [10k]
Installing [065/106, time/total: 02:12/02:51]: luatex [13k]
Installing [066/106, time/total: 02:14/02:53]: luatex85 [2k]
Installing [067/106, time/total: 02:16/02:56]: luatexbase [4k]
Installing [068/106, time/total: 02:18/02:58]: luatexko [24k]
Installing [069/106, time/total: 02:20/03:00]: luatextra [2k]
Installing [070/106, time/total: 02:22/03:03]: luatodonotes [26k]
Installing [071/106, time/total: 02:24/03:04]: luaxml [11k]
Installing [072/106, time/total: 02:26/03:07]: makeindex [5k]
Installing [073/106, time/total: 02:28/03:09]: metafont [33k]
Installing [074/106, time/total: 02:30/03:10]: mflogo [2k]
Installing [075/106, time/total: 02:32/03:13]: mfnfss [2k]
Installing [076/106, time/total: 02:34/03:15]: mfware [4k]
Installing [077/106, time/total: 02:35/03:17]: mptopdf [38k]
Installing [078/106, time/total: 02:37/03:18]: natbib [17k]
Installing [079/106, time/total: 02:40/03:21]: nodetree [6k]
Installing [080/106, time/total: 02:42/03:23]: oberdiek [221k]
Installing [081/106, time/total: 02:44/03:18]: odsfile [5k]
Installing [082/106, time/total: 02:46/03:20]: pdftex [36k]
Installing [083/106, time/total: 02:48/03:21]: placeat [4k]
Installing [084/106, time/total: 02:50/03:23]: plain [60k]
Installing [085/106, time/total: 02:52/03:23]: pslatex [6k]
Installing [086/106, time/total: 02:54/03:26]: psnfss [12k]
Installing [087/106, time/total: 02:56/03:28]: pspicture [2k]
Installing [088/106, time/total: 02:58/03:30]: selnolig [53k]
Installing [089/106, time/total: 03:00/03:30]: showhyphens [2k]
Installing [090/106, time/total: 03:02/03:33]: spelling [14k]
Installing [091/106, time/total: 03:04/03:34]: tetex [59k]
Installing [092/106, time/total: 03:06/03:35]: tex [1k]
Installing [093/106, time/total: 03:08/03:37]: tex-ini-files [4k]
Installing [094/106, time/total: 03:10/03:39]: texconfig [13k]
Installing [095/106, time/total: 03:12/03:41]: texlive-common [1k]
Installing [096/106, time/total: 03:14/03:43]: texlive-docindex [108k]
Installing [097/106, time/total: 03:16/03:41]: texlive-en [1k]
Installing [098/106, time/total: 03:18/03:44]: texlive-msg-translations [110k]
Installing [099/106, time/total: 03:20/03:42]: texlive-scripts [65k]
Installing [100/106, time/total: 03:23/03:43]: texlive.infra [190k]
Installing [101/106, time/total: 03:25/03:38]: tools [39k]
Installing [102/106, time/total: 03:27/03:39]: ucharcat [2k]
Installing [103/106, time/total: 03:29/03:41]: unicode-data [217k]
Installing [104/106, time/total: 03:31/03:36]: updmap-map [158k]
Installing [105/106, time/total: 03:34/03:34]: url [6k]
Installing [106/106, time/total: 03:36/03:36]: xdvi [7k]
Time used for installing the packages: 03:38
running mktexlsr /data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist ...
writing fmtutil.cnf to /data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/web2c/fmtutil.cnf
writing updmap.cfg to /data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/web2c/updmap.cfg
writing language.dat to /data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/tex/generic/config/language.dat
writing language.def to /data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/tex/generic/config/language.def
writing language.dat.lua to /data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/tex/generic/config/language.dat.lua
running mktexlsr /data/data/com.termux/files/usr/opt/texlive/2016/texmf-var /data/data/com.termux/files/usr/opt/texlive/2016/texmf-config /data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist ...
running updmap-sys --nohash ...done
Use of uninitialized value in -x at /data/data/com.termux/files/usr/lib/perl5/5.24.1/arm-android/Cwd.pm line 200.
updmap will read the following updmap.cfg files (in precedence order):
  /data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
  /data/data/com.termux/files/usr/opt/texlive/2016/texmf-config/web2c/updmap.cfg
dvips output dir: "/data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/fonts/map/dvips/updmap"
pdftex output dir: "/data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/fonts/map/pdftex/updmap"
dvipdfmx output dir: "/data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/fonts/map/dvipdfmx/updmap"

updmap is creating new map files
using the following configuration:
  LW35 font names                  : URWkb (/data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/web2c/updmap.cfg)
  prefer outlines                  : true (/data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/web2c/updmap.cfg)
  texhash enabled                  : false
  download standard fonts (dvips)  : true (/data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/web2c/updmap.cfg)
  download standard fonts (pdftex) : true (/data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/web2c/updmap.cfg)
  kanjiEmbed replacement string    : ipaex (/data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/web2c/updmap.cfg)
  kanjiVariant replacement string  :  (default)
  create a mapfile for pxdvi       : false (default)

Scanning for LW35 support files  [  3 files]
Scanning for MixedMap entries    [  6 files]
Scanning for KanjiMap entries    [  0 files]
Scanning for Map entries         [  7 files]

Generating output for dvipdfmx...
Generating output for ps2pk...
Generating output for dvips...
Generating output for pdftex...

Files generated:
  /data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/fonts/map/dvips/updmap:
       15846 2017-03-02 15:11:46 builtin35.map
       21319 2017-03-02 15:11:46 download35.map
       23993 2017-03-02 15:11:46 psfonts_pk.map
       27844 2017-03-02 15:11:46 psfonts_t1.map
       27839 2017-03-02 15:11:46 ps2pk.map
          14 2017-03-02 15:11:46 psfonts.map -> psfonts_t1.map
  /data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/fonts/map/pdftex/updmap:
       27846 2017-03-02 15:11:46 pdftex_dl14.map
       26181 2017-03-02 15:11:46 pdftex_ndl14.map
          15 2017-03-02 15:11:46 pdftex.map -> pdftex_dl14.map
  /data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/fonts/map/dvipdfmx/updmap:
         369 2017-03-02 15:11:46 kanjix.map

Transcript written on "/data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/web2c/updmap.log".
re-running mktexlsr /data/data/com.termux/files/usr/opt/texlive/2016/texmf-var /data/data/com.termux/files/usr/opt/texlive/2016/texmf-config ...
pre-generating all format files, be patient...
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-strict --all ...done
Unknown option: no-strict
Try "fmtutil --help" for more information.
./install-tl: fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-strict --all failed: 
running package-specific postactions
postaction install script for dvipdfmx: perl /data/data/com.termux/files/usr/opt/texlive/2016/tlpkg/tlpostcode/dvipdfmx.pl
finished with package-specific postactions

A few things:

  1. tlmgr spits out this on every use:
Use of uninitialized value in -x at /data/data/com.termux/files/usr/lib/perl5/5.24.1/arm-android/Cwd.pm line 200.
  1. The script in $PREFIX/etc/profile.d/ echos a message every time Termux logs in. Good for debugging, but I'd remove it. Scripts there should be silent.

  2. fmtutil, called in ./install-tl, doesn't seem to have a --no-strict option(?). It makes the install say that it failed, yet it still works.

@Grimler91
Copy link
Member

@mklein994 Thanks for testing! I agree that the echo'ed message should be removed.
I've also prepared a patch for Cwd.pm and one for install-tl that seem to work.

Have fmtutil created the format files needed? (I think it exits due to the faulty option and never creates pdflatex.fmt and all the others)
Try compiling a simple .tex file:

\documentclass{article}
\begin{document}
Hello world
\end{document}

with pdflatex to see if it works, it might say that it can't locate pdflatex.fmt.

@mklein994
Copy link
Contributor

Here's the log:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Termux) (preloaded format=pdflatex 2017.3.2)  2 MAR 2017 16:48
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**helloworld.tex
(./helloworld.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.

(/data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/tex/latex/base/art
icle.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class

(/data/data/com.termux/files/usr/opt/texlive/2016/texmf-dist/tex/latex/base/siz
e10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
No file helloworld.aux.
\openout1 = `helloworld.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
[1

{/data/data/com.termux/files/usr/opt/texlive/2016/texmf-var/fonts/map/pdftex/up
dmap/pdftex.map}] (./helloworld.aux) ) 
Here is how much of TeX's memory you used:
 199 strings out of 494945
 2272 string characters out of 6179197
 47493 words of memory out of 5000000
 3582 multiletter control sequences out of 15000+600000
 3640 words of font info for 14 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 23i,4n,17p,134b,107s stack positions out of 5000i,500n,10000p,200000b,80000s
</data/data/com.termux/files/usr/opt/texl
ive/2016/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on helloworld.pdf (1 page, 11544 bytes).
PDF statistics:
 12 PDF objects out of 1000 (max. 8388607)
 7 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

The PDF looks fine.

@vishalbiswas
Copy link
Contributor

So, its finally done? You may want to open another pull request after rebasing those 27 commits to have a cleaner history.

@mklein994
Copy link
Contributor

I haven't used TeX Live outside of a distribution before, but I'd recommend installing extra fonts, i.e. running tlmgr install collection-fonts{recommend,extra}. It brings the whole install to about 1.2GB (du -hs $PREFIX/opt), but it simplifies installing multiple fonts. Tried on Termux of course, and it works fine.

@rnauber
Copy link
Contributor Author

rnauber commented Mar 3, 2017

Well that patch improved a lot, thank you all for contributing!

@vishalbiswas fornwall has the option to squash all commits of this PR
https://github.com/blog/2141-squash-your-commits

@mklein994
Copy link
Contributor

Ping @fornwall

@fornwall
Copy link
Member

fornwall commented Mar 4, 2017

@rnauber Impressive work!

I guess texlive should depend on harfbuzz-icu (which contains the libharfbuzz-icu.so library linking against libicu) and not harfbuzz?

@rnauber
Copy link
Contributor Author

rnauber commented Mar 5, 2017

@fornwall right! I fixed it...

@fornwall fornwall merged commit d415b12 into termux:master Mar 8, 2017
@fornwall
Copy link
Member

fornwall commented Mar 8, 2017

@rnauber Merged, thanks! I'm building the packages and will run some validation on them, I'll post an update here soon!

@fornwall
Copy link
Member

fornwall commented Mar 8, 2017

The package builds fine!

What is the reason for having a custom prefix?

--prefix=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4}
--bindir=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4}/bin/pkg

Using the standard prefix would have e.g. binaries in the $PATH automatically and man pages would work if they are placed in the standard location.

@Grimler91
Copy link
Member

@fornwall I'm guessing it just to keep the installation similar to the standard one. On linux it installs to /usr/local/texlive/2016/bin per default when built.

The texlive installation currently has 331 binaries, which is quite a lot. Would we want that many binaries from a single package in $PREFIX/usr/bin folder?

@rnauber
Copy link
Contributor Author

rnauber commented Mar 8, 2017

@fornwall @Grimler91
The purpose of the custom ../bin/pkg is to have the binaries separate for the texlive installer to copy from. They will be put in ../bin/custom. And the custom prefix ensures that the texlive scripts land in ../share/texmf-dist/scripts/ . That makes them reachable through the symlinks in ..bin/custom .
I guess we could streamline that, if we decide to patch the texlive installer script and distribute it within the deb.

@fornwall
Copy link
Member

fornwall commented Mar 9, 2017

@Grimler91 @rnauber Ok, I'll let you as texlive users and packagers decide how you want to have it :)!

its-pointless pushed a commit to its-pointless/termux-packages that referenced this pull request May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants