On 12/26 10:07, George Koehler wrote:
> On Sun, 25 Dec 2022 15:52:33 +0000 (UTC)
> Jeremy Evans <[email protected]> wrote:
>
> > Ruby 3.2.0 was released today, release announcement at:
> > https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/
>
> I tried to build lang/ruby/3.2 after you imported it, but an installed
> devel/ruby-shims broke "make fake". I fixed the build by adding
> CONFIGURE_ENV += --without-baseruby
>
> I also observe that ruby%3.2 would depend on ruby%3.1 if your arch has
> yjit (amd64, aarch64). The chain of build dependencies is
>
> lang/ruby/3.2 -> lang/rust -> devel/llvm
> -> devel/swig -> lang/ruby/3.1
>
> If the default ruby changed from 3.1 to 3.2, this might become a
> circular dependency.
Agreed. One approach is hard coding the Ruby version used for swig:
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/swig/Makefile,v
retrieving revision 1.80
diff -u -p -r1.80 Makefile
--- Makefile 2 Nov 2022 16:37:58 -0000 1.80
+++ Makefile 28 Dec 2022 01:38:07 -0000
@@ -23,6 +23,9 @@ MODULES = lang/python \
MODRUBY_RUNDEP = No
+# Do not update to 3.2+
+MODRUBY_REV = 3.1
+
MODPY_RUNDEP = No
MODPHP_BUILDDEP = Yes
This only gets us a couple extra years (till we drop Ruby 3.1 support).
An alternative approach is adding a no_yjit FLAVOR to Ruby 3.2+, and
have swig depend on that. Maybe a committer with more experience
dealing with these issues can propose a better solution?
> My build failed on powerpc (no yjit), but I had installed both
> ruby 3.1.2 and ruby-shims for other reasons. (I hadn't upgraded to
> 3.1.3.) "make configure" detected 3.1.2 via the shim,
>
> configure: loading site script /usr/ports/pobj/ruby-3.2.0/config.site
> checking for ruby... /usr/local/bin/ruby
> ruby31: No such file or directory -- tool/downloader.rb (LoadError)
> checking build system type... powerpc-unknown-openbsd7.2
> ...
> * man page type: doc
> * BASERUBY -v: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) \
> [powerpc-openbsd]
>
> In "make fake", baseruby failed to require tool/downloader.rb because
> we had deleted it in POST_EXTRACT. I don't need to download gems nor
> run baseruby, because ruby-3.2.0.tar.gz has all the stuff. (When I
> build ruby from git, I need baseruby.) I add --without-baseruby to
> ignore ruby-shims and package ruby%3.2 normally.
>
> I put CONFIGURE_ENV += --without-baseruby in 3.2/Makefile.inc, but it
> should probably go in Makefile.inc.
> --George
OK jeremy@ for putting it in Makefile.inc. No bumps required, since it
should be a no-op if a ruby binary is not present.
>
> Index: 3.2/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/ruby/3.2/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- 3.2/Makefile 26 Dec 2022 03:03:57 -0000 1.1.1.1
> +++ 3.2/Makefile 27 Dec 2022 02:31:36 -0000
> @@ -30,6 +30,7 @@ COMPILER = base-clang ports-gcc
>
> # Fix path for JIT compiler to not use shims in ports obj bin dir
> CONFIGURE_ENV += ac_cv_path_MJIT_CC=`which ${CC}`
> +CONFIGURE_ARGS += --without-baseruby
>
> GEM_EXTENSIONS_DIR =
> lib/ruby/gems/${REV}/extensions/${MACHINE_ARCH:S/i386/x86/:S/amd64/x86_64/}-openbsd
> SUBST_VARS += GEM_EXTENSIONS_DIR