Re: [NTG-context] Problem getting lmtx version up
Mojca, sorry I missed you query about the location of the image zip. I used: https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2020-05-28/2020-05-27-raspios-buster-arm64.zip But the lite version you mention below should use the same library. > Does this look like the correct place for fetching the images with Debian > 10? > > https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-05-28/ > > Mojca Regards, Jay p.s. I'm away from the rpi now but will try out the new runtime prog you sent and get back to you. --- END ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem getting lmtx version up
Jdh, Can you please try again with this binary? https://dl.contextgarden.net/build/luametatex/aarch64-linux/ On Fri, 16 Jul 2021 at 22:16, Alan Braslau wrote: > > Freebsd on arm64 is now a Tier 1 architecture. ;-) I figured out that there are should-be-working-out-of-the-box images for FreeBSD for RPi. Maybe we just need to fetch another one for the farm ;) I installed https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RELEASE/aarch64/Latest/ inside https://github.com/utmapp/UTM but I had some issues figuring out how to install packages. Maybe something for another weekend. I also got Debian 10 working inside UTM and it resulted in pretty fast compilation. (I still need to set up automatic start-up after the power outage.) Tests with Windows ARM64 come next. The installation procedure seems to have started at least, I guess that the support is much better now than what it used to be when M1 got released. Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem getting lmtx version up
On Sat Jul 17, 2021 at 7:30 AM CEST, Lutz Haseloff wrote: > both binaries work in my system. > (Galaxy A50, Userland, Kali Linux) On Sat Jul 17, 2021 at 10:47 AM CEST, jdh wrote: > Both binaries you provided ran successufully. I ran them both and they > both exited with a 0 return code, when invoked with only the --help > options. > > System ran on: > HW: Raspberry Pi 4 Model B Rev 1.4 > CPU: ARM aarch64 > RAM: 8GB > SSD: 1TB > > OS: aarch64 - Raspberry Pi 64 bit OS. Based on Debian/Linux 10 Lutz, jdh, thanks for testing, great to hear that it works! Although now it remains to apply this technique to LuaMetaTeX. Without access to source code I can't try anything, but the general ideas should apply: I used Zig for cross compiling. While Zig is a full fledged programming language in its own right, it also has the ability to compile C/C++ (with built-in Clang). The more interesting part is that it also bundles different C libraries for the different targets it supports for cross compilation. This is a great match for Lua(Meta)TeX, because standard C library is the only "external" dependency. Depending on the chosen target (CPU+OS+ABI triple), the binary can then be fully statically linked or dynamically linked against the target's system C library. Zig exposes the "C compiler" functionality with two interfaces: the Zig build system and the "zig cc" command. In theory "zig cc" should be a drop-in replacement for "clang" or "gcc" [1] and therefore should be usable with existing build systems used by LuaTeX/LuaMetaTeX. In practice it is not that easy, because some "compiler feature detections" of these build systems often try to run compiled results (and fail). But in the best case (like with Lua) cross compilation may be as easy as: # "bsd" is almost like "linux", but doesn't link "readline" make CC="zig cc -target aarch64-linux-musl" bsd The result is a fully statically linked executable, that can be used on all Linux distributions. But because it is statically linked, dynamic loading of external Lua libraries written in C is not possible. The following will result in a binary that is dynamically linked against (the target system) glibc and should be able to load even Lua libraries written in C: make CC="zig cc -target aarch64-linux-gnu.2.28" bsd (Note that Zig support all relevant glibc versions, that means that compiling for older Linux distributions can be done from any OS, not just ancient Debian or CentOS. Here "2.28" is old enough to support jdh's Raspberry Pi OS -- and anything newer.) Applying this to LuaMetaTeX may or may not be hard. Frankly I don't know much about CMake. But I have experience converting LuaTeX (or rather its subset) to another build systems: 1) https://github.com/vlasakm/mmtex/blob/ltex/build.zig This was used to produce the two binaries I sent previously. Usage (no setup required): wget 'https://github.com/vlasakm/mmtex/archive/refs/tags/cross-test2.zip' unzip cross-test2.zip cd mmtex-cross-test2/ wget 'https://ziglang.org/download/0.8.0/zig-linux-x86_64-0.8.0.tar.xz' tar xf zig-linux-x86_64-0.8.0.tar.xz zig-linux-x86_64-0.8.0/zig build -Dtarget=aarch64-linux-musl qemu-aarch64 zig-out/bin/mmtex --help Something similar should work on Windows/Mac and for other targets (see `zig targets`). 2) https://github.com/vlasakm/mmtex/blob/master/mmtex/files/meson.build This one compiles full LuaTeX, although it doesn't support cross compilation and links to system zlib, libpng and zzliplib. The Zig cross compilation is sadly limited (https://ziglang.org/download/0.8.0/release-notes.html#Tier-1-Support), but not because more exotic systems will never be supported, it's just that nobody did the required work, yet. The support for Linux (various architectures), macOS (aarch64+x86_64) + Windows (x86_64) should be very good. I don't think there is other cross compiler that is able to target the M1 Macs. The Zig build you download from their website [2] is kind of huge, but note that it includes LLVM+Clang+Zig in one single dependency free binary + (efficiently packed) C libraries for many targets. I.e. this is all you need for all your C/C++/Zig. Provided that you (as of now) don't need anything other than Linux/Mac/Windows. Hans, Mojca, is this something worth pursuing for LuaMetaTeX before "native" compilation is available? I am interested in trying. Michal Vlasák [1]: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html [2]: https://ziglang.org/download/ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net
Re: [NTG-context] Problem getting lmtx version up
Hello Michal, both binaries work in my system. (Galaxy A50, Userland, Kali Linux) Greetings Lutz Am 17. Juli 2021 02:21:08 MESZ schrieb "Michal Vlasák" : >On Fri Jul 16, 2021 at 12:46 AM CEST, jdh wrote: >> # My system has GLIBC 2.28, but I don't know how to upgrade it for >RPis > >Can you jdh or anyone with a similar setup try to run the following two >binaries? Run with '--help' only, other than that not much works. > >https://github.com/vlasakm/mmtex/releases/download/cross-test/ltex-aarch64-linux-gnu.2.28 >https://github.com/vlasakm/mmtex/releases/download/cross-test/ltex-aarch64-linux-musl > >If I didn't mistake the architecture, these should work. At least I can >confirm that the second (fully statically linked) one works on my >x86_64 >linux with: > >chmod +x ./ltex-aarch64-linux-musl >qemu-aarch64 ./ltex-aarch64-linux-musl --help > >The above are cross compiled (debug) builds of very stripped down >version of LuaTeX, that I have been experimenting with. They won't >solve >the immediate problem, but the cross compiling procedure could be used >to generate luametatex binaries for this target until a better option >is >available. Of course, depending on whether it even works. :) > >Michal Vlasák >___ >If your question is of interest to others as well, please add an entry >to the Wiki! > >maillist : ntg-context@ntg.nl / >http://www.ntg.nl/mailman/listinfo/ntg-context >webpage : http://www.pragma-ade.nl / http://context.aanhet.net >archive : https://bitbucket.org/phg/context-mirror/commits/ >wiki : http://contextgarden.net >___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem getting lmtx version up
On Fri Jul 16, 2021 at 12:46 AM CEST, jdh wrote: > # My system has GLIBC 2.28, but I don't know how to upgrade it for RPis Can you jdh or anyone with a similar setup try to run the following two binaries? Run with '--help' only, other than that not much works. https://github.com/vlasakm/mmtex/releases/download/cross-test/ltex-aarch64-linux-gnu.2.28 https://github.com/vlasakm/mmtex/releases/download/cross-test/ltex-aarch64-linux-musl If I didn't mistake the architecture, these should work. At least I can confirm that the second (fully statically linked) one works on my x86_64 linux with: chmod +x ./ltex-aarch64-linux-musl qemu-aarch64 ./ltex-aarch64-linux-musl --help The above are cross compiled (debug) builds of very stripped down version of LuaTeX, that I have been experimenting with. They won't solve the immediate problem, but the cross compiling procedure could be used to generate luametatex binaries for this target until a better option is available. Of course, depending on whether it even works. :) Michal Vlasák ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem getting lmtx version up
On 16/07/21 21:47, Hans Hagen wrote: would be a pitty because i like the ubuntu interface that we have on it more than the rather ugly default rpi one (an ubuntu install is also more comfortable) ... when we go headless we might give opensuse a try (actually we had debian first but it was a pain with the ssd on usb so we gave up on that and harald made it work with ubuntu) wondering: does the 32 bit run on 64 boit with some extra libs installed? of courese someone can send us a bunch of rpi's .. one can even build a simple rack setup, or maybe we can install some vm on the rpi ... (reminds me to consider windows 11 on the pi for testing windows arm) Freebsd on arm64 is now a Tier 1 architecture. ;-) -- Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem getting lmtx version up
On 7/16/2021 1:39 PM, Mojca Miklavec wrote: Hi, /opt/context-lmtx $ sudo sh ./install.sh Error: /opt/context-lmtx/bin/mtxrun: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /opt/context-lmtx/bin/mtxrun) We need to set up an older linux distro for building 64-bit binaries if we want to be "more compatible". It doesn't help that it took forever for 64-bit Linux to start working on RPi, and if one goes to https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit they officially still offer just the 32-bit version. So we installed whatever came to the market first, and so far this is probably the second complaint on the mailing list. Does this look like the correct place for fetching the images with Debian 10? https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-05-28/ would be a pitty because i like the ubuntu interface that we have on it more than the rather ugly default rpi one (an ubuntu install is also more comfortable) ... when we go headless we might give opensuse a try (actually we had debian first but it was a pain with the ssd on usb so we gave up on that and harald made it work with ubuntu) wondering: does the 32 bit run on 64 boit with some extra libs installed? of courese someone can send us a bunch of rpi's .. one can even build a simple rack setup, or maybe we can install some vm on the rpi ... (reminds me to consider windows 11 on the pi for testing windows arm) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem getting lmtx version up
Hi, > /opt/context-lmtx $ sudo sh ./install.sh > Error: /opt/context-lmtx/bin/mtxrun: /lib/aarch64-linux-gnu/libm.so.6: > version `GLIBC_2.29' not found (required by /opt/context-lmtx/bin/mtxrun) We need to set up an older linux distro for building 64-bit binaries if we want to be "more compatible". It doesn't help that it took forever for 64-bit Linux to start working on RPi, and if one goes to https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit they officially still offer just the 32-bit version. So we installed whatever came to the market first, and so far this is probably the second complaint on the mailing list. Does this look like the correct place for fetching the images with Debian 10? https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-05-28/ Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem getting lmtx version up
On Thu, 15 Jul 2021 at 19:47, jdh wrote: > > > # > # I followed all instruction for downloading context-lmtx, then did the > rsync > # procedures, then a another > # > # $ sudo sh ./install.h > # > # I get the following error: > > /opt/context-lmtx $ sudo sh ./install.sh > Error: /opt/context-lmtx/bin/mtxrun: /lib/aarch64-linux-gnu/libm.so.6: > version `GLIBC_2.29' not found (required by /opt/context-lmtx/bin/mtxrun) > > # My system has GLIBC 2.28, but I don't know how to upgrade it for RPis > It is good practice to mention your platform in problem reports. For this error, your best source of help will be RPi and OS forums. Once you find a solution it may help others to post the details (including the forum that provided the solution) here. -- George N. White III ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___