From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/100549 Path: news.gmane.org!.POSTED!not-for-mail From: Brian Hunt Newsgroups: gmane.comp.tex.context Subject: Re: Build for Alpine Linux Date: Wed, 11 Apr 2018 21:08:32 +0000 Message-ID: References: <026e5b07-3364-2011-50bf-29a249fb41b7@xs4all.nl> <6a1d4148-1bb5-2633-d9e1-9859c05bb665@gmx.es> <1523235042.18581.29.camel@gmail.com> <20180409193518.GA2842220@phare.normalesup.org> <20180410205530.GD3878032@phare.normalesup.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3184678015922581132==" X-Trace: blaine.gmane.org 1523480826 8245 195.159.176.226 (11 Apr 2018 21:07:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2018 21:07:06 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 11 23:07:02 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6MxI-0001zA-0L for gctc-ntg-context-518@m.gmane.org; Wed, 11 Apr 2018 23:07:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 21C2C6261DC; Wed, 11 Apr 2018 23:08:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TFYkSNcCnMZL; Wed, 11 Apr 2018 23:08:55 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 47F6E6261DD; Wed, 11 Apr 2018 23:08:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 16F6B6261DD for ; Wed, 11 Apr 2018 23:08:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OPmlm-ljE7Jz for ; Wed, 11 Apr 2018 23:08:53 +0200 (CEST) Original-Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 19D006261DC for ; Wed, 11 Apr 2018 23:08:43 +0200 (CEST) Original-Received: by mail-wm0-f48.google.com with SMTP id i3so6117785wmf.3 for ; Wed, 11 Apr 2018 14:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DyHrvJMfwOnjDfCOM4SHsT/y9rDsPrs6KSTCoJNv3TA=; b=fYZX3o3oYaqXadMLInVjkj2C/MU4XgO/C7m8XVq7Bp5uY/ikDuKhMMfL3/yZzIJmI/ DLYey0cCHoEeOyD8G11pCDuiNyg02HV3UJqvbSln5Rxq3uUHUmK7rgtbb3KupTlOLw5t e0pX3QN0ioEHF8aJAIvhUZOiXsN5hkB7RraEtjjXchqEmY9T7p/94ZEVbT59Qv5wupBI Zpn6/nHEfEv4W2z7PoB/mE1DvR0i31vlSNuVWBTcYgmXmseicTbUyd1NYZ4Q+SoS7f4n nRfirh1YRa8x1tzHI6+Kes1l1sX+uYaUtZoR81LjuWttBRnnBCDpctqqcX78Q5DxJB8Y G+6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DyHrvJMfwOnjDfCOM4SHsT/y9rDsPrs6KSTCoJNv3TA=; b=nFxdHk7eUo/62IMFevqxjumweCqNb+0Z4tol3VmWp8Ekwkg5laxJV1lWGd7wJBLMqi 2s201z6XJejEvIgsGz4NMgLlE1FVjmBuYiJiXkeREjQZwqz1Tn0uinpwVax0ilZmvNjI sCSjU6UtFTsmsAYsXQek/MgLUy4rVuJBgEgKoxqUF0KjoQF7q3iCJeahnNk25158OWUZ j6aqEGtjlH5SO2KAMSKH4fGnjILrCYuhRBGq1iXPBJ+UQkoZW1voW6RUq+5fxXDDWaGw 0pDmiCZ9/88NQKCWsjWXDxKMjBF03/Y7Vwlv14f95ZiL7zo9VG7vTxDgcrebPK0iHRfm BmUQ== X-Gm-Message-State: ALQs6tA6yDdkPY/tBqD9C/V4qjYtVT5bJJyFwVBCPEUAiDcJT5j2IgCo 88qUqM2JUaw5eILajUBNwOJyBDLk28sTky2aeVs= X-Google-Smtp-Source: AIpwx487qgvlMh1EdXNZ+tJXhPyTeHk0usABuNNC1bA7vNxcgHEv59+K1jM/5MjLvxYQpenjHr1NH0mc/T1VlOb3W/M= X-Received: by 10.80.151.133 with SMTP id e5mr12008353edb.58.1523480922719; Wed, 11 Apr 2018 14:08:42 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:100549 Archived-At: --===============3184678015922581132== Content-Type: multipart/alternative; boundary="f403045c2736388b390569990bd1" --f403045c2736388b390569990bd1 Content-Type: text/plain; charset="UTF-8" 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 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 * 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.* --f403045c2736388b390569990bd1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Aditya: I did ind= eed; it fails with `mtxrun=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 | unknown script 'base.lua' or 'mtx-base.lua&= #39;` (sorry I didn't report this).

Hans:

> if musl needs different bin then= there should be a different initial=C2=A0
> download i think because b= asically we're now talking of: windows, osx,=C2=A0
> linux, linuxmu= sl (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/=C2=A0for linux (musl)

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

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

It seems there is no better way to do detection. This post seem= s to summarize what I'd read elsewhere:=C2=A0https://un= ix.stackexchange.com/questions/120380

C= ould one symlink `texmf-linux-64` to point to `texmf-linuxmusl-64` via firs= t-setup.sh?=C2=A0 Then mtxrun wouldn't have to do any detection.

>=C2=A0hm, so musl is far = from a drop=3Din for glib or do i get it wrong

There certainly do seem to be a lot of hoops.
<= div>
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 / pro= blem 6 though.=C2=A0 It could be musl/luatex or maybe Alpine.=C2=A0 My most= recent insight was that the `instance.files` are essentially empty with Al= pine/musl (and so is the cache), so they're not being read for some rea= son.=C2=A0 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 worki= ng 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
>=C2=A0 =C2=A0 a. the setup rsync bin/ directories
>=C2=A0 =C2=A0 b. the tex/texmf-linuxmusl(|-ppc|-64)

we don't use texluac, don't need texlua on windows and on linux tex= lua
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.=C2=A0= Around
> line 3721 of the mtxrun add:
>
>=C2=A0 =C2=A0 =C2=A0 if find(architecture,"x86_64",1,true) th= en
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 platform=3D"linux-64"
>=C2=A0 =C2=A0 =C2=A0 elseif find(architecture,"ppc",1,true) t= hen
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 platform=3D"linux-ppc"
>=C2=A0 =C2=A0 =C2=A0 else
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 platform=3D"linux"
>=C2=A0 =C2=A0 =C2=A0 end
> +=C2=A0 =C2=A0if resultof("ldd --version 2>&1"):find(= "musl") ~=3D nil then
> +=C2=A0 =C2=A0 =C2=A0platform =3D platform:gsub("linux", &qu= ot;linuxmusl")
> +=C2=A0 =C2=A0end

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 <= br> 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`.=C2=A0 Some tracker= output
> sheds some light:
>=C2=A0 =C2=A0 i.=C2=A0context --trackers=3Dresolvers.expansions is iden= tical
>=C2=A0 =C2=A0 ii. context --trackers=3Dresolvers.details,resolvers.deta= ils differs,
> with the output attached.=C2=A0 Note that to keep the comparison short= I
> removed lines that differed only=C2=A0because `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=3Din for glib or do i get it wrong

Hans

-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 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:=C2=A0https://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 subscri= bers of a forwarding service the email is sent directly to and to which ser= vice you are an authorized recipient. Use, dissemination or copying without= authorization is prohibited. Please notify the sender and destroy all copi= es of this e-mail if you have received this email in error.
<= /p>

--f403045c2736388b390569990bd1-- --===============3184678015922581132== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============3184678015922581132==--