Re: git: 09c8b6c737f2 - main - games/powder-toy: Use USES=luajit (defaults to luajit-devel)

From: Dmitry Marakasov <amdmi3_at_amdmi3.ru>
Date: Mon, 17 Oct 2022 14:55:22 UTC
* Adam Weinberger (adamw@freebsd.org) wrote:

>     > diff --git a/games/powder-toy/Makefile b/games/powder-toy/Makefile
>     > index 9f3669ed3c41..83404aceaedb 100644
>     > --- a/games/powder-toy/Makefile
>     > +++ b/games/powder-toy/Makefile
>     > @@ -1,6 +1,7 @@
>     >  PORTNAME=    powder-toy
>     >  PORTVERSION= 96.2.350
>     >  DISTVERSIONPREFIX=   v
>     > +PORTREVISION=        1
>     >  CATEGORIES=  games
>     > 
>     >  MAINTAINER=  amdmi3@FreeBSD.org
>     > @@ -13,14 +14,13 @@ LICENSE_FILE=     ${WRKSRC}/LICENSE
>     > 
>     >  LIB_DEPENDS= libfftw3f.so:math/fftw3-float \
>     >               libfftw3.so:math/fftw3 \
>     > -             libluajit-5.1.so:lang/luajit-openresty \
>     >               libcurl.so:ftp/curl
>     > 
>     >  USE_GITHUB=  yes
>     >  GH_ACCOUNT=  The-Powder-Toy
>     >  GH_PROJECT=  The-Powder-Toy
>     > 
>     > -USES=                compiler:c++11-lang meson pkgconfig python:build
>     sdl
>     > +USES=                compiler:c++11-lang luajit meson pkgconfig
>     python:build sdl
>     >  USE_SDL=     sdl2
>     > 
>     >  PORTDOCS=    README.md changelog.txt
> 
>     This change is invalid, as it changes dependency from luajit-openresty
>     to luajit-devel. Please revert or change it to depend on openresty, as
>     luajit is broken and leads to segfaults. Same for minetest, for the
>     record.
> 
> 
> Done. Strange that they behave badly; Powder Toy's repo links specifically to
> luajit-devel's repo, and minetest says that it works with luajit 2.0+.
>
> That's the unfortunate part of the luajit fragmentation that we have in the
> tree. Because lang/luajit is so old, it's not clear whether a luajit-openresty
> dep means "this requires openresty" vs "I don't want to depend on the old
> version." They all compile cleanly, so I tried to use upstreams to guide the
> conversion.

Thank you!

The problem with luajit may be specific to FreeBSD. I've seen an
explanation from someone knowledgeable in some PR, AFAIR it was
something about addess space. With that I've got an imression that
all versions of upstream luajit are broken, and only openresty works.
Maybe it makes sense to retest with luajit-devel, as it's preferrable
to stay on default to avoid conflicts, but for now only openresty
it known to be safe.

Btw why don't we drop luajit completely and replace it with -devel?

-- 
Dmitry Marakasov   .
amdmi3@amdmi3.ru  ..:  https://github.com/AMDmi3  https://amdmi3.ru/