Bug 202999 - devel/ruby-build: install 2.2.x fails
Summary: devel/ruby-build: install 2.2.x fails
Status: Closed Rejected
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Michael Moll
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-09 17:25 UTC by Tony Narlock
Modified: 2015-11-02 13:26 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (meta)


Attachments
Verbose build log output (132.28 KB, text/x-log)
2015-09-09 17:25 UTC, Tony Narlock
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Narlock 2015-09-09 17:25:30 UTC
Created attachment 160869 [details]
Verbose build log output

Also posted as issue at https://github.com/sstephenson/ruby-build/issues/805.

$ pkg info ruby-build
ruby-build-20150818
Name           : ruby-build
Version        : 20150818
Installed on   : Mon Sep  7 16:51:09 CDT 2015
Origin         : devel/ruby-build
Architecture   : freebsd:11:*
Prefix         : /usr/local
Categories     : ruby devel
Licenses       : MIT
Maintainer     : meta+ports@vmeta.jp
WWW            : https://github.com/sstephenson/ruby-build
Comment        : Compile and install different ruby versions
Options        :
	RBENV          : on
Annotations    :
	repo_type      : binary
	repository     : FreeBSD

$ uname -a; freebsd-version
FreeBSD z600 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r286893: Tue Aug 18 18:44:28 UTC 2015     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
11.0-CURRENT

$ rbenv install 2.2.2 -v > ~/freebsd222build.log
Downloading ruby-2.2.2.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44
load: 0.58  cmd: curl 46215 [select] 2.37r 0.07u 0.03s 1% 9184k
giInstalling ruby-2.2.2...

BUILD FAILED (FreeBSD 11.0-CURRENT using ruby-build 20150818)

Inspect or clean up the working tree at /tmp/ruby-build.20150908103654.46184
Results logged to /tmp/ruby-build.20150908103654.46184.log

Last 10 log lines:
                              power_assert-0.2.2.gem
installing rdoc:              /usr/home/tony/.rbenv/versions/2.2.2/share/ri/2.2.0/system
installing capi-docs:         /usr/home/tony/.rbenv/versions/2.2.2/share/doc/ruby
The Ruby readline extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/usr/home/tony/.rbenv/versions/2.2.2
  CFLAGS= -O3 -Wno-error=shorten-64-to-32 
  LDFLAGS=-L/usr/home/tony/.rbenv/versions/2.2.2/lib 
  CPPFLAGS=-I/usr/home/tony/.rbenv/versions/2.2.2/include 


Verbose Log attached

I have gmake installed. It also fails with MAKE=make set.
Comment 1 Tony Narlock 2015-09-27 09:59:18 UTC
As an update, the trick to getting it to work is RUBY_CONFIGURE_OPTS=--with-opt-dir=/usr/local.

So:

$ RUBY_CONFIGURE_OPTS=--with-opt-dir=/usr/local  rbenv install 2.2.2
Downloading ruby-2.2.2.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44
Installing ruby-2.2.2...
Installed ruby-2.2.2 to /usr/home/tony/.rbenv/versions/2.2.2
Comment 2 Michael Moll freebsd_committer 2015-09-28 22:22:18 UTC
I think it's no good to build rubygem-* ports with rbenv/rvm. Does it work with lang/ruby22 installed and used?
Comment 3 Tony Narlock 2015-09-28 22:52:48 UTC
(In reply to Michael Moll from comment #2)

As an update:

I'm talking this over on there tracker at https://github.com/sstephenson/ruby-build/issues/805#issuecomment-143547211. They are open to fixing this.

> I think it's no good to build rubygem-* ports with rbenv/rvm. Does it work with lang/ruby22 installed and used?

Maybe I'm misunderstanding, can you clarify this?

Do you mean that if the user's environment was sourced using rbenv/rvm, it could conflict with building ports?
Comment 4 Michael Moll freebsd_committer 2015-09-28 23:06:16 UTC
(In reply to Tony Narlock from comment #3)
> Do you mean that if the user's environment was sourced using rbenv/rvm,
> it could conflict with building ports?

exactly.
Comment 5 Tony Narlock 2015-09-29 00:59:40 UTC
(In reply to Michael Moll from comment #4)
I created a separate topic at bug #203429 for this, where I expand upon that a bit and test building a port. So far, I haven't seen a conflict. If I'm misunderstanding or you have more to add we can continue that discussion there.

The scope of our current issue is related to a library not getting detected on the system when building ruby.

The fix for it is adding `RUBY_CONFIGURE_OPTS=--with-opt-dir=/usr/local` to the ruby-build(1) or `rbenv install` command.

I've spoken with one of the upstream maintainers and they said could fix it [1], I replied and asked them to tag it. Then we can update devel/ruby-build and builds should work.

[1] https://github.com/sstephenson/ruby-build/issues/805#issuecomment-143547211
Comment 6 Michael Moll freebsd_committer 2015-09-29 10:33:55 UTC
I'm just saying that the ruby-ports from the ports collection are designed to work with the lang/ruby* ports and not tested in any way otherwise.

My personal experience (mainly on Linux and OSX) is that mixing any package/ports system with things like rvm/rbenv/similar is crying to blow up into your face. Actually I'm surprised it's working that well for you. :)
Comment 7 Koichiro Iwao freebsd_committer 2015-10-22 02:32:17 UTC
Waiting for upstream fix. I've submitted Bug 203946 updates to 20150928 but probably not fixed yet.
Comment 8 Michael Moll freebsd_committer 2015-10-22 08:56:14 UTC
I'm leaning towards closing this, as the original problem is something not supported by the ports collection anyway.
Comment 9 Michael Moll freebsd_committer 2015-11-02 13:26:18 UTC
Closing this for the reasons stated above.