Re: Early Look: ruby 2.3.0-preview1
On 11/12/15 07:53, Jeremy Evans wrote: Attached is a port for ruby 2.3.0-preview1. This is useful if you want to test your ruby software to make sure it will run on ruby 2.3, but it won't be committed till the ruby 2.3.0 final release in late December. Release announcement is at: https://www.ruby-lang.org/en/news/2015/11/11/ruby-2-3-0-preview1-released/ Thanks, good work preparing for the release like this! I tested it out and receive errors like this when installing some gems (json, sqlite3) using bundler 1.3.5 from ports: Installing json (1.8.3) Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator /usr/local/bin/ruby23 -r ./siteconf20151115-14676-coy40a.rb extconf.rb creating Makefile current directory: /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator make "DESTDIR=" clean current directory: /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator make "DESTDIR=" compiling generator.c linking shared-object json/ext/generator.so current directory: /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator make "DESTDIR=" install /usr/ports/pobj/ruby-2.3.0-preview1/bin/install -c -m 0755 generator.so ./.gem.20151115-14676-1oavqqb/json/ext /usr/ports/pobj/ruby-2.3.0-preview1/bin/install: not found *** Error 1 in /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator (Makefile:186 'install-so') make install failed, exit code 1 Gem files will remain installed in /home/frank/.gem/ruby/2.3/gems/json-1.8.3 for inspection. Results logged to /home/frank/.gem/ruby/2.3/extensions/x86_64-openbsd/2.3/json-1.8.3/gem_make.out An error occurred while installing json (1.8.3), and Bundler cannot continue. Make sure that `gem install json -v '1.8.3'` succeeds before bundling. Do you think this is a bug in the port? You can reproduce this by running: git clone https://github.com/ivaldi/brimir bundle install --path ~/.gem Let me know if I can help or re-test. Frank
Re: Early Look: ruby 2.3.0-preview1
On 11/15/15 18:04, Jeremy Evans wrote: There's various ports that don't build without modifications (textproc/ruby-nokogiri) or that have issues at runtime with ruby 2.3.0-preview1 (www/ruby-capybara). Hopefully these issues will be fixed before the ruby 2.3.0 final release, but they aren't a bug in the port as far as I know. If you believe this is a bug in the port itself, please provide a diff or at least a reason why you think that. I believe this is a bug in the port, because of the error: > /usr/ports/pobj/ruby-2.3.0-preview1/bin/install: not found It seems Ruby is somehow passing the install command to the gem with the build path of ruby-2.3.0-preview1 prepended. Note that the json gem ships with ruby since 1.9. Instead of bundle install, try: gem23 install -G ~/.gem --conservative Thanks, but the bug occurs in various other gems as well, including sqlite3. Thanks. Frank
Re: Early Look: ruby 2.3.0-preview1
On 11/15/15 20:08, Jeremy Evans wrote: I apologize, I obviously didn't read your bug report closely enough. Yes that is a bug in the port, and it's because the port adds a post-install target to fix a bug, which overrides the post-install target in Makefile.inc. No problem. I tested your fix and it works great. Thanks for solving it and lets hope 2.3 is release soon! Frank
Re: Early Look: ruby 2.3.0-preview1
On Sun, Nov 15, 2015 at 8:03 AM, Frank Groeneveld < frank+openbsd-po...@frankgroeneveld.nl> wrote: > On 11/12/15 07:53, Jeremy Evans wrote: > >> Attached is a port for ruby 2.3.0-preview1. This is useful if you want >> to test your ruby software to make sure it will run on ruby 2.3, but it >> won't be committed till the ruby 2.3.0 final release in late December. >> >> Release announcement is at: >> https://www.ruby-lang.org/en/news/2015/11/11/ruby-2-3-0-preview1-released/ >> > > Thanks, good work preparing for the release like this! I tested it out and > receive errors like this when installing some gems (json, sqlite3) using > bundler 1.3.5 from ports: > > Installing json (1.8.3) > Gem::Ext::BuildError: ERROR: Failed to build gem native extension. > > current directory: > /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator > /usr/local/bin/ruby23 -r ./siteconf20151115-14676-coy40a.rb extconf.rb > creating Makefile > > current directory: > /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator > make "DESTDIR=" clean > > current directory: > /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator > make "DESTDIR=" > compiling generator.c > linking shared-object json/ext/generator.so > > current directory: > /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator > make "DESTDIR=" install > /usr/ports/pobj/ruby-2.3.0-preview1/bin/install -c -m 0755 generator.so > ./.gem.20151115-14676-1oavqqb/json/ext > /usr/ports/pobj/ruby-2.3.0-preview1/bin/install: not found > *** Error 1 in > /home/frank/.gem/ruby/2.3/gems/json-1.8.3/ext/json/ext/generator > (Makefile:186 'install-so') > > make install failed, exit code 1 > > Gem files will remain installed in > /home/frank/.gem/ruby/2.3/gems/json-1.8.3 for inspection. > Results logged to > /home/frank/.gem/ruby/2.3/extensions/x86_64-openbsd/2.3/json-1.8.3/gem_make.out > > An error occurred while installing json (1.8.3), and Bundler cannot > continue. > Make sure that `gem install json -v '1.8.3'` succeeds before bundling. > > Do you think this is a bug in the port? You can reproduce this by running: > git clone https://github.com/ivaldi/brimir > bundle install --path ~/.gem > > Let me know if I can help or re-test. There's various ports that don't build without modifications (textproc/ruby-nokogiri) or that have issues at runtime with ruby 2.3.0-preview1 (www/ruby-capybara). Hopefully these issues will be fixed before the ruby 2.3.0 final release, but they aren't a bug in the port as far as I know. If you believe this is a bug in the port itself, please provide a diff or at least a reason why you think that. Note that the json gem ships with ruby since 1.9. Instead of bundle install, try: gem23 install -G ~/.gem --conservative Thanks, Jeremy
Re: Early Look: ruby 2.3.0-preview1
On Sun, Nov 15, 2015 at 9:57 AM, Frank Groeneveld < frank+openbsd-po...@frankgroeneveld.nl> wrote: > On 11/15/15 18:04, Jeremy Evans wrote: > >> There's various ports that don't build without modifications >> (textproc/ruby-nokogiri) or that have issues at runtime with ruby >> 2.3.0-preview1 (www/ruby-capybara). Hopefully these issues will be fixed >> before the ruby 2.3.0 final release, but they aren't a bug in the port as >> far as I know. If you believe this is a bug in the port itself, please >> provide a diff or at least a reason why you think that. >> > > I believe this is a bug in the port, because of the error: > > > /usr/ports/pobj/ruby-2.3.0-preview1/bin/install: not found > > It seems Ruby is somehow passing the install command to the gem with the > build path of ruby-2.3.0-preview1 prepended. I apologize, I obviously didn't read your bug report closely enough. Yes that is a bug in the port, and it's because the port adds a post-install target to fix a bug, which overrides the post-install target in Makefile.inc. Here's a diff for Makefile.inc: Index: Makefile.inc === RCS file: /cvs/ports/lang/ruby/Makefile.inc,v retrieving revision 1.11 diff -u -p -r1.11 Makefile.inc --- Makefile.inc 15 Oct 2014 02:06:35 - 1.11 +++ Makefile.inc 15 Nov 2015 19:06:06 - @@ -28,7 +28,8 @@ SUB ?= ${MACHINE_ARCH:S/amd64/x86_64/} SUBST_VARS += SUB REV FILESDIR ?= ${.CURDIR}/../files +FIX_RBCONFIG = sed 's/INSTALL_ARGS/-c -o ${BINOWN} -g ${BINGRP}/' < \ + ${FILESDIR}/rbconfig_fix.rb >> \ + ${PREFIX}/lib/ruby/${RUBYLIBREV}/${SUB}/rbconfig.rb post-install: - sed 's/INSTALL_ARGS/-c -o ${BINOWN} -g ${BINGRP}/' < \ - ${FILESDIR}/rbconfig_fix.rb >> \ - ${PREFIX}/lib/ruby/${RUBYLIBREV}/${SUB}/rbconfig.rb + ${FIX_RBCONFIG} Here's a new 2.3/Makefile: # $OpenBSD: Makefile,v 1.6 2015/08/22 15:14:14 jeremy Exp $ BROKEN-mips64 = miniruby spins on rbconfig.rb COMMENT-main = object oriented script language with threads COMMENT-gdbm = gdbm interface for ruby COMMENT-tk = tk interface for ruby COMMENT-ri_docs = ri documentation files for ruby VERSION = 2.3.0-preview1 RUBYLIBREV = 2.3 DISTNAME = ruby-${VERSION} SHARED_LIBS = ruby23 0.0 PKGNAME-main = ruby-${VERSION} PKGNAME-gdbm = ruby23-gdbm-${VERSION} PKGNAME-tk = ruby23-tk-${VERSION} PKGNAME-ri_docs = ruby23-ri_docs-${VERSION} PKG_ARCH-ri_docs = * WANTLIB-ri_docs = # empty NEXTVER = 2.4 PKGSPEC-main = ruby->=${RUBYLIBREV},<${NEXTVER} CONFIGURE_ARGS = --program-suffix=23 \ --with-soname=ruby23 \ --with-ruby-version=minor \ --with-mantype=doc \ --enable-pthread \ --enable-ipv6 \ --without-bundled-libffi \ --disable-option-checking CONFIGURE_ENV = LIBruby23_VERSION=${LIBruby23_VERSION} \ ac_cv_prog_DOXYGEN="" \ ac_cv_prog_DOT="" \ DLDFLAGS="-L${LOCALBASE}/lib" MAKE_ENV = DLDFLAGS="-I${LOCALBASE}/lib" ALL_TARGET = V=1 main INSTALL_TARGET = V=1 install-nodoc WANTLIB-main = c crypto ffi gmp m ncurses pthread readline ssl \ util yaml z LIB_DEPENDS-main = devel/gmp \ devel/libyaml \ devel/libffi PSEUDO_FLAVORS= no_x11 no_ri_docs # Do not build the RI docs on slow arches .if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Marm} || ${MACHINE_ARCH:Mhppa} || ${MACHINE_ARCH:Msparc} || ${MACHINE_ARCH:Mvax} FLAVOR?= no_ri_docs .else FLAVOR?= .endif MULTI_PACKAGES = -main -gdbm WANTLIB-gdbm = c m gdbm gmp pthread ruby23 LIB_DEPENDS-gdbm = databases/gdbm \ devel/gmp \ lang/ruby/${REV},-main>=${VERSION},<${NEXTVER} RUN_DEPENDS-gdbm = .if !${FLAVOR:Mno_x11} MULTI_PACKAGES+= -tk CONFIGURE_ARGS+= --with-tcl-include=${LOCALBASE}/include/tcl8.5 \ --with-tk-include=${LOCALBASE}/include/tk8.5 \ --with-tcllib=tcl85 \ --with-tklib=tk85 \ --with-X11-dir=${X11BASE} WANTLIB-tk = X11 c gmp m pthread ruby23 tcl85 tk85 LIB_DEPENDS-tk = tk->=8.5,<8.6:x11/tk/8.5 \ devel/gmp \ lang/ruby/${REV},-main>=${VERSION},<${NEXTVER} RUN_DEPENDS-tk = .endif .if !${FLAVOR:Mno_ri_docs} MULTI_PACKAGES += -ri_docs ALL_TARGET += rdoc INSTALL_TARGET += install-doc .endif SUBST_VARS += RUBYLIBREV TEST_DEPENDS = ${FULLPKGNAME-main}:${BUILD_PKGPATH} post-extract: rm -rf ${WRKSRC}/ext/fiddle/libffi-* ${WRKSRC}/tool/downloader.rb pre-install: find ${WRKSRC} -name '*.orig' -print0 | xargs -0r rm ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ruby post-install: ${FIX_RBCONFIG} chmod 444 ${PREFIX}/lib/ruby/gems/*/{cache,specifications}/*.gem* do-test: -cd ${WRKSRC} && make test-sample -cd ${WRKSRC} && make btest-ruby cd ${WRKSRC} && make test-all TESTOPTS="-v -q" .include Thanks, Jeremy
Early Look: ruby 2.3.0-preview1
Attached is a port for ruby 2.3.0-preview1. This is useful if you want to test your ruby software to make sure it will run on ruby 2.3, but it won't be committed till the ruby 2.3.0 final release in late December. Release announcement is at: https://www.ruby-lang.org/en/news/2015/11/11/ruby-2-3-0-preview1-released/ Inline is the ruby.port.mk diff adding a ruby23 FLAVOR. Looks like I forgot to commit the diff to remove the ruby19 or rbx FLAVORs, so I suppose that can wait until this is committed. If anyone wants the rbx/ruby19 removal committed separately, please let me know. Thanks, Jeremy Index: ruby.port.mk === RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v retrieving revision 1.84 diff -u -p -r1.84 ruby.port.mk --- ruby.port.mk27 Aug 2015 14:36:14 - 1.84 +++ ruby.port.mk12 Nov 2015 06:43:38 - @@ -24,7 +24,7 @@ MODRUBY_HANDLE_FLAVORS ?= No # If ruby.pork.mk should handle FLAVORs, define a separate FLAVOR # for each ruby interpreter .if !defined(FLAVORS) -FLAVORS= ruby18 ruby19 ruby20 ruby21 ruby22 rbx +FLAVORS= ruby18 ruby20 ruby21 ruby22 ruby23 . if !${CONFIGURE_STYLE:L:Mext} && !${CONFIGURE_STYLE:L:Mextconf} FLAVORS+= jruby . endif @@ -53,13 +53,13 @@ FLAVOR =ruby22 # Check for conflicting FLAVORs and set MODRUBY_REV appropriately based # on the FLAVOR. -.for i in ruby18 ruby19 ruby20 ruby21 ruby22 jruby rbx +.for i in ruby18 ruby20 ruby21 ruby22 ruby23 jruby . if ${FLAVOR:M$i} MODRUBY_REV = ${i:C/ruby([0-9])/\1./} -.if ${FLAVOR:N$i:Mruby18} || ${FLAVOR:N$i:Mruby19} || \ +.if ${FLAVOR:N$i:Mruby18} || \ ${FLAVOR:N$i:Mruby20} || ${FLAVOR:N$i:Mruby21} || \ -${FLAVOR:N$i:Mruby22} || \ - ${FLAVOR:N$i:Mjruby} || ${FLAVOR:N$i:Mrbx} +${FLAVOR:N$i:Mruby22} || ${FLAVOR:N$i:Mruby23} || \ + ${FLAVOR:N$i:Mjruby} ERRORS += "Fatal: Conflicting flavors used: ${FLAVOR}" .endif . endif @@ -92,11 +92,6 @@ MODRUBY_BINREV = 18 MODRUBY_PKG_PREFIX = ruby MODRUBY_FLAVOR = ruby18 GEM_BIN_SUFFIX = 18 -.elif ${MODRUBY_REV} == 1.9 -MODRUBY_LIBREV = 1.9.1 -MODRUBY_BINREV = 19 -MODRUBY_FLAVOR = ruby19 -GEM_BIN_SUFFIX = 19 .elif ${MODRUBY_REV} == 2.0 MODRUBY_LIBREV = 2.0 MODRUBY_BINREV = 20 @@ -112,6 +107,11 @@ MODRUBY_LIBREV = 2.2 MODRUBY_BINREV = 22 MODRUBY_FLAVOR = ruby22 GEM_BIN_SUFFIX = 22 +.elif ${MODRUBY_REV} == 2.3 +MODRUBY_LIBREV = 2.3 +MODRUBY_BINREV = 23 +MODRUBY_FLAVOR = ruby23 +GEM_BIN_SUFFIX = 23 .elif ${MODRUBY_REV} == jruby MODRUBY_LIBREV = 2.2.0 @@ -124,12 +124,6 @@ MODRUBY_LIBREV = 2.2.0 MODRUBY_FLAVOR = jruby GEM_MAN_SUFFIX = -${MODRUBY_FLAVOR} -.elif ${MODRUBY_REV} == rbx -MODRUBY_LIBREV = 2.1 -#.poison MODRUBY_BINREV -#.poison MODRUBY_WANTLIB -MODRUBY_FLAVOR = rbx -GEM_MAN_SUFFIX = -${MODRUBY_FLAVOR} .endif MODRUBY_RSPEC_DEPENDS =devel/ruby-rspec/1,${MODRUBY_FLAVOR}<2.0 @@ -144,12 +138,6 @@ RAKE= ${RUBY} -S rake RSPEC= ${RUBY} -S spec MODRUBY_BIN_RSPEC =${RUBY} -S rspec MODRUBY_BIN_TESTRB = ${RUBY} -S testrb -.elif ${MODRUBY_REV} == rbx -RUBY= ${LOCALBASE}/bin/rbx -RAKE= ${RUBY} -S rake -RSPEC= ${RUBY} -S spec -MODRUBY_BIN_RSPEC =${RUBY} -S rspec -MODRUBY_BIN_TESTRB = ${RUBY} -S testrb .else RUBY= ${LOCALBASE}/bin/ruby${MODRUBY_BINREV} RAKE= ${LOCALBASE}/bin/rake${MODRUBY_BINREV} @@ -187,8 +175,6 @@ ERRORS += "Fatal: Ruby C extensions are . else MODRUBY_RUN_DEPENDS= lang/jruby . endif -.elif ${MODRUBY_REV} == rbx -MODRUBY_RUN_DEPENDS= lang/rubinius .else MODRUBY_WANTLIB= ruby${MODRUBY_BINREV} MODRUBY_RUN_DEPENDS= lang/ruby/${MODRUBY_REV} @@ -200,8 +186,6 @@ MODRUBY_BUILD_DEPENDS= ${MODRUBY_RUN_DEP # location of ruby libraries .if ${MODRUBY_REV} == jruby MODRUBY_LIBDIR=${LOCALBASE}/jruby/lib/ruby -.elif ${MODRUBY_REV} == rbx -MODRUBY_LIBDIR=${LOCALBASE}/lib/rubinius .else MODRUBY_LIBDIR=${LOCALBASE}/lib/ruby .endif @@ -218,10 +202,6 @@ SUBST_VARS += ^MODRUBY_RELDOCDIR ^MODRU MODRUBY_ARCH= ${MACHINE_ARCH:S/amd64/x86_64/}-java MODRUBY_SITEDIR = jruby/lib/ruby/site_ruby/${MODRUBY_LIBREV} MODRUBY_SITEARCHDIR = ${MODRUBY_SITEDIR}/java -.elif ${MODRUBY_REV} == rbx -MODRUBY_ARCH= ${MACHINE_ARCH}-openbsd -MODRUBY_SITEDIR = lib/rubinius/site/ -MODRUBY_SITEARCHDIR = ${MODRUBY_SITEDIR}/${MODRUBY_ARCH} .else MODRUBY_ARCH= ${MACHINE_ARCH:S/amd64/x86_64/}-openbsd MODRUBY_SITEDIR = lib/ruby/site_ruby/${MODRUBY_LIBREV} @@ -267,7 +247,7 @@ MODRUBY_WANTLIB+= c m .if ${MODRUBY_REV} != 1.8 MODRUBY_WANTLIB+=