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
-----------------------------------------------------------------
___________________________________________________________________________________
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 via email to