ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem getting lmtx version up
@ 2021-07-15 22:46 jdh
  2021-07-16 10:24 ` George N. White III
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: jdh @ 2021-07-15 22:46 UTC (permalink / raw)
  To: ntg-context



#
# 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
  
cp: cannot stat '/opt/context-lmtx/tex/texmf-linux-aarch64/bin/mtxrun': No such file or directory
cp: cannot stat '/opt/context-lmtx/tex/texmf-context/scripts/context/lua/mtxrun.lua': No such file or directory
cp: cannot stat '/opt/context-lmtx/tex/texmf-context/scripts/context/lua/mtx-install.lua': No such file or directory


Thanks,
  jay
  ---------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
  2021-07-15 22:46 Problem getting lmtx version up jdh
@ 2021-07-16 10:24 ` George N. White III
  2021-07-16 11:39 ` Mojca Miklavec
  2021-07-17  0:21 ` Michal Vlasák
  2 siblings, 0 replies; 10+ messages in thread
From: George N. White III @ 2021-07-16 10:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 822 bytes --]

On Thu, 15 Jul 2021 at 19:47, jdh <dhenman@gmail.com> 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

[-- Attachment #1.2: Type: text/html, Size: 1284 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
  2021-07-15 22:46 Problem getting lmtx version up jdh
  2021-07-16 10:24 ` George N. White III
@ 2021-07-16 11:39 ` Mojca Miklavec
  2021-07-16 19:47   ` Hans Hagen
  2021-07-17  0:21 ` Michal Vlasák
  2 siblings, 1 reply; 10+ messages in thread
From: Mojca Miklavec @ 2021-07-16 11:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
  2021-07-16 11:39 ` Mojca Miklavec
@ 2021-07-16 19:47   ` Hans Hagen
  2021-07-16 20:15     ` Alan Braslau
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2021-07-16 19:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mojca Miklavec

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
  2021-07-16 19:47   ` Hans Hagen
@ 2021-07-16 20:15     ` Alan Braslau
  2021-07-18 18:00       ` Mojca Miklavec
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Braslau @ 2021-07-16 20:15 UTC (permalink / raw)
  To: Hans Hagen, Mojca Miklavec; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
  2021-07-15 22:46 Problem getting lmtx version up jdh
  2021-07-16 10:24 ` George N. White III
  2021-07-16 11:39 ` Mojca Miklavec
@ 2021-07-17  0:21 ` Michal Vlasák
  2021-07-17  5:30   ` Lutz Haseloff
  2 siblings, 1 reply; 10+ messages in thread
From: Michal Vlasák @ 2021-07-17  0:21 UTC (permalink / raw)
  To: jdh, mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
  2021-07-17  0:21 ` Michal Vlasák
@ 2021-07-17  5:30   ` Lutz Haseloff
  0 siblings, 0 replies; 10+ messages in thread
From: Lutz Haseloff @ 2021-07-17  5:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1792 bytes --]

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" <lahcim8@gmail.com>:
>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
>___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 2471 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
  2021-07-16 20:15     ` Alan Braslau
@ 2021-07-18 18:00       ` Mojca Miklavec
  0 siblings, 0 replies; 10+ messages in thread
From: Mojca Miklavec @ 2021-07-18 18:00 UTC (permalink / raw)
  To: Alan Braslau; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
@ 2021-07-18 19:54 jdh
  0 siblings, 0 replies; 10+ messages in thread
From: jdh @ 2021-07-18 19:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem getting lmtx version up
       [not found] <20210717014720.8365@binki>
@ 2021-07-17 12:16 ` Michal Vlasák
  0 siblings, 0 replies; 10+ messages in thread
From: Michal Vlasák @ 2021-07-17 12:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users, jdh

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-18 19:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 22:46 Problem getting lmtx version up jdh
2021-07-16 10:24 ` George N. White III
2021-07-16 11:39 ` Mojca Miklavec
2021-07-16 19:47   ` Hans Hagen
2021-07-16 20:15     ` Alan Braslau
2021-07-18 18:00       ` Mojca Miklavec
2021-07-17  0:21 ` Michal Vlasák
2021-07-17  5:30   ` Lutz Haseloff
     [not found] <20210717014720.8365@binki>
2021-07-17 12:16 ` Michal Vlasák
2021-07-18 19:54 jdh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).