Skip to content

Compiling luatex #1139

Open
Open
@luigiScarso

Description

@luigiScarso

Hi all,
I have managed to compile
(or I should said κόσμος-compile ) luatex and luahbtex from
https://gitlab.lisn.upsaclay.fr/texlive/luatex
under Linux Ubuntu x86_64, using its build.sh script.

  1. building is done in 2 steps, one with CC="x86_64-unknown-cosmo-cc
    and one with CC="aarch64-unknown-cosmo-cc because the arm step needs
    the "--enable-arm-neon=on option at config time.
    Then I build the ape binary following the example in cosmocc --help.
    Two steps are ok but I would like to use a single step with CC=cosmocc, any suggestion is welcome.

  2. llround is unresolved at linking time: I have replaced it with lround
    but I am not sure if it can be solved in another way.

  3. texk/web2c/luatexdir/tex/maincontrol.h has
    extern boolean privileged(void);
    that seem to conflicts with a privileged symbol used by cosmocc; I have fixed with

#ifdef __COSMOPOLITAN__
#undef privileged
#endif
extern boolean privileged(void);

There are also a few other patches to some config.ac, but I think that they can go upstream (to TexLive, I mean),
and texk/web2c/luatexdir/luasocket/src/usocket.c
has

#ifdef __COSMOPOLITAN__
#include "libc/sock/struct/pollfd.h"
#endif

that I think I cannot avoid.

The ape format runs on Linux / Windows / FreeBSD x86_64 (I have to check aarch64 with a rpi) but
I haven't done extensive testing yet.

--
luigi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions