Coder Social home page Coder Social logo

Comments (4)

alerque avatar alerque commented on June 13, 2024 1

Many distros are setting MAKEFLAGS+=--jobs=$(nproc) or similar by default now for package build environments and some even for user environments.

I think it would make sense to add a mitigation to the Makefile:

# This makefile has known race conditions that will fail if targets are run in parallel.
# Force at least GNU Make 4.3+ to only use a single job to run targets in serial order.
MAKEFLAGS += --jobs=1

This only works in GNU Make 4.3+. It will be ignored in older versions of make that already setup the job server by the time they parse the Makefile. But in 4.3 plus it actually does parse and respond to this early enough to be able to override the value from inside the Makefile.

But here's the thing: many/most of the distros that are aggressively setting defaults to parallel builds are also the ones that have a fresh enough GNU Make for this to work.

from luarocks.

hishamhm avatar hishamhm commented on June 13, 2024

Hi! Thanks for reporting, but the LuaRocks makefile was not designed (or documented) for parallel invocation. Also, it "builds" really fast (it is pure Lua and just copies a few files around) so there's no gain in running it in parallel. So in effect unfortunately this is a "wont fix". Just run make as normal and you'll be fine.

from luarocks.

chenrui333 avatar chenrui333 commented on June 13, 2024

yeah, make sense 👍

from luarocks.

Sharparam avatar Sharparam commented on June 13, 2024

Just ran into this issue as well, when installing via mise. As mentioned, my default MAKEFLAGS sets --jobs=$(nproc) so the make bootstrap of Luarocks fails.

This should at the very least be mentioned in the documentation here: https://github.com/luarocks/luarocks/wiki/Installation-instructions-for-Unix and in the README as well.

But ideally the override as mentioned above should be put in place in the makefile, why is this not being considered?

from luarocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.