Opened 7 months ago

Closed 6 months ago

#20312 closed enhancement (fixed)

Add luajit to the book to replace Lua 5.2

Reported by: Douglas R. Reno Owned by: Douglas R. Reno
Priority: normal Milestone: 12.3
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

Let's replace Lua 5.2 with LuaJIT (see the thread on blfs-dev)

In addition to modifying MPV and VLC, we'll also need to modify gegl and libpeas.

Change History (6)

comment:1 by Douglas R. Reno, 7 months ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

comment:2 by Joe Locash, 7 months ago

This should do it.

sed -i 's|/local||' Makefile
make

As root:
make install

comment:3 by Xi Ruoyao, 6 months ago

Please just use make PREFIX=/usr and make PREFIX=/usr install instead of overusing sed.

comment:4 by Xi Ruoyao, 6 months ago

Generally overusing sed is bad, and in this case particularly bad because the upstream explicitly says "don't do that." From http://luajit.org/install.html#distro:

The LuaJIT build system has extra provisions for the needs of most POSIX-based distributions. If you're a package maintainer for a distribution, please make use of these features and avoid patching, subverting, autotoolizing or messing up the build system in unspeakable ways.

And:

PREFIX overrides the installation path and should usually be set to /usr. Setting this also changes the module paths and the paths needed to locate the shared library.

Last edited 6 months ago by Xi Ruoyao (previous) (diff)

comment:5 by Xi Ruoyao, 6 months ago

The upstream also says:

The build system has a special target for an amalgamated build, i.e. make amalg. This compiles the LuaJIT core as one huge C file and allows GCC to generate faster and shorter code. Alas, this requires lots of memory during the build. This may be a problem for some users, that's why it's not enabled by default. But it shouldn't be a problem for most build farms. It's recommended that binary distributions use this target for their LuaJIT builds.

I'm not sure if make amalg is suitable for us. Maybe we need to measure how much RAM is used by it.

comment:6 by Douglas R. Reno, 6 months ago

Resolution: fixed
Status: assignedclosed

This was one of the easiest additions I've had to do in a while, as everything that the book said supported it didn't have any problems.

Because this is designed to be grabbed from git, I'll create a ticket in the pre-release milestone to remind us of what we need to do to create a new tarball.

Fixed at the following commits...

Note: See TracTickets for help on using tickets.