ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Brian Hunt <brianmhunt@gmail.com>
To: Hans Hagen <j.hagen@xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Build for Alpine Linux
Date: Wed, 11 Apr 2018 21:08:32 +0000	[thread overview]
Message-ID: <CA+Zb4Mwrn69z+my-E=xmrQr6m9JsRaAoCJ9aR9J9h-RX7tKvkw@mail.gmail.com> (raw)
In-Reply-To: <e9e02cfa-e039-4756-0307-37c0e3551286@xs4all.nl>


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

Aditya: I did indeed; it fails with `mtxrun          | unknown script
'base.lua' or 'mtx-base.lua'` (sorry I didn't report this).

Hans:

> if musl needs different bin then there should be a different initial
> download i think because basically we're now talking of: windows, osx,
> linux, linuxmusl (a different species)

This appears to be the case currently, as first-setup.sh calls rsync to
copy files from:
http://standalone.contextgarden.net/setup/linuxmusl-64/bin/ for linux (musl)
http://standalone.contextgarden.net/setup/linux-64/bin/ for linux (glibc)

texlua just seems to be missing from the linuxmusl-64 path; it's in the
linux-64 path. I suspect it's a build issue.

> isn't there some magic env var that tels if musl is used? do programs
> and scripts really have to jumpo through such loops

It seems there is no better way to do detection. This post seems to
summarize what I'd read elsewhere:
https://unix.stackexchange.com/questions/120380

Could one symlink `texmf-linux-64` to point to `texmf-linuxmusl-64` via
first-setup.sh?  Then mtxrun wouldn't have to do any detection.

> hm, so musl is far from a drop=in for glib or do i get it wrong

There certainly do seem to be a lot of hoops.

That said, notwithstanding the weird path issues, of the six TODO items I
mentioned, 1 & 2, and 4 require musl detection, 3 is related to the rsync
setup, 5 is a shell problem (not musl per-se).

I've no idea what's going on with the paths / problem 6 though.  It could
be musl/luatex or maybe Alpine.  My most recent insight was that the
`instance.files` are essentially empty with Alpine/musl (and so is the
cache), so they're not being read for some reason.  I've not yet isolated
where that reading happens.

Brian

On Wed, 11 Apr 2018 at 16:37 Hans Hagen <j.hagen@xs4all.nl> wrote:

> On 4/11/2018 10:08 PM, Brian Hunt wrote:
> > So here's what I've got for a TODO so far to get ConTeXt working on
> > Alpine Linux with musl (subject to item #6, mtx-context.lua not being
> > found):
> >
> > 1. Add the musl test to first-setup.sh
> > 2. Add the same musl test to tex/setuptex
>
> no problem adding a robust test there
>
> > 3. Add texlua (and texluac?) to
> >    a. the setup rsync bin/ directories
> >    b. the tex/texmf-linuxmusl(|-ppc|-64)
>
> we don't use texluac, don't need texlua on windows and on linux texlua
> is just a symlink
>
> if musl needs different bin then there should be a different initial
> download i think because basically we're now talking of: windows, osx,
> linux, linuxmusl (a different species)
>
> > 4. Update mtxrun
> >
> > Here's code that ought to work for detecting musl in mtxrun.  Around
> > line 3721 of the mtxrun add:
> >
> >      if find(architecture,"x86_64",1,true) then
> >        platform="linux-64"
> >      elseif find(architecture,"ppc",1,true) then
> >        platform="linux-ppc"
> >      else
> >        platform="linux"
> >      end
> > +   if resultof("ldd --version 2>&1"):find("musl") ~= nil then
> > +     platform = platform:gsub("linux", "linuxmusl")
> > +   end
>
> that's not going to happen, some system call 9each run) in order to
> determine what linux species we run ... (there are a few calls but these
> are never used becasue we use HOSTTYPE (if needed we can set one
> ourselves on these platforms)
>
> isn't there some magic env var that tels if musl is used? do programs
> and scripts really have to jumpo through such loops
>
> > 5. Note that in tex/setuptex, there's evidently no way to get the
> > current script so one has to explicitly provide the TeX directory
> > (appears to be a BusyBox bug).
> > 6. `context` is unable to locate `mtx-context.lua`.  Some tracker output
> > sheds some light:
> >    i. context --trackers=resolvers.expansions is identical
> >    ii. context --trackers=resolvers.details,resolvers.details differs,
> > with the output attached.  Note that to keep the comparison short I
> > removed lines that differed only because `linux` had been changed to
> > `linuxmusl`.
> >
> > Will keep plugging away to see if I can determine why `mtx-context.lua`
> > cannot be found on Alpine Linux.
> hm, so musl is far from a drop=in for glib or do i get it wrong
>
> 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
> -----------------------------------------------------------------
>
-- 

*from the personal account of:*

*Brian M Hunt *<brianmhunt@gmail.com>
Direct: +1-289-684-4677
LinkedIn: https://linkedin.com/in/brianmhunt

*This e-mail may contain information that is private, privileged,
confidential and/or exempt from disclosure. Except as per this notice no
waiver of any kind is intended by sending this e-mail, and this email is
intended only for the named recipient(s) or the subscribers of a forwarding
service the email is sent directly to and to which service you are an
authorized recipient. Use, dissemination or copying without authorization
is prohibited. Please notify the sender and destroy all copies of this
e-mail if you have received this email in error.*

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

[-- Attachment #2: Type: text/plain, Size: 492 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
___________________________________________________________________________________

  reply	other threads:[~2018-04-11 21:08 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-07 21:04 double followtokens? Pablo Rodriguez
2018-04-07 21:25 ` Hans Hagen
2018-04-07 22:11   ` Pablo Rodriguez
2018-04-08 14:41     ` Hans Hagen
2018-04-08 14:56       ` Build for Alpine Linux Brian Hunt
2018-04-08 20:50         ` Mojca Miklavec
2018-04-08 21:09           ` Arthur Reutenauer
2018-04-08 21:26           ` Henri Menke
2018-04-08 21:45             ` Arthur Reutenauer
2018-04-09  0:50           ` Henri Menke
2018-04-09 18:59             ` Brian Hunt
2018-04-09 19:35               ` Arthur Reutenauer
2018-04-10 11:05                 ` Brian Hunt
2018-04-10 12:26                   ` Brian Hunt
2018-04-10 16:27                   ` Alan Braslau
2018-04-10 20:55                   ` Arthur Reutenauer
2018-04-11 12:30                     ` Brian Hunt
2018-04-11 20:08                       ` Brian Hunt
2018-04-11 20:24                         ` Aditya Mahajan
2018-04-11 20:37                         ` Hans Hagen
2018-04-11 21:08                           ` Brian Hunt [this message]
2018-04-13 11:14                           ` Mojca Miklavec
2018-04-13 11:42                             ` Henri Menke
2018-04-13 19:54                               ` Henning Hraban Ramm
2018-04-13 20:02                                 ` Aditya Mahajan
2018-04-13 12:49                             ` Hans Hagen
2018-04-11 23:13                         ` Henri Menke
2018-04-13 10:37                           ` Brian Hunt
     [not found]                             ` <CALBOmsaXyTXhR=j6Ht1LwKGcfxMD4sHjQnEOxtjH-4gc3b5R8g@mail.gmail.com>
     [not found]                               ` <20180417152547.GA1755070@phare.normalesup.org>
2018-04-17 15:54                                 ` Thomas A. Schmitz
2018-04-08 18:10       ` double followtokens? Pablo Rodriguez
2018-04-08 21:17         ` Hans Hagen
2018-04-09 18:25           ` Pablo Rodriguez
2019-01-01 18:17       ` Hans van der Meer
2019-01-01 20:17         ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+Zb4Mwrn69z+my-E=xmrQr6m9JsRaAoCJ9aR9J9h-RX7tKvkw@mail.gmail.com' \
    --to=brianmhunt@gmail.com \
    --cc=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).