Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

subversion: install --ruby fails if brewed ruby is present #13272

Closed
wants to merge 1 commit into from

Conversation

jeffstyr
Copy link
Contributor

@jeffstyr jeffstyr commented Jul 7, 2012

Running brew install subversion --ruby will fail if there is a brew-installed ruby 1.9, because subversion requires 1.8 and it's finding the 1.9.

The attached fix sets a few paths explicitly to the system ruby location, and sets a more specific ruby library version so that 1.8 will get used. This allows the install to succeed.

If there's a brew-installed ruby 1.9, `brew install subversion --ruby` will fail. Setting paths to the system ruby fixes this.
@adamv
Copy link
Contributor

adamv commented Jul 7, 2012

Please only include the change to Subversion in this pull request; changes to homebrew itself should be in a separate request.

@jeffstyr
Copy link
Contributor Author

jeffstyr commented Jul 7, 2012

I ordered the commits so that the first one only contains the minimal changes and omits the general code improvements, so you can merge just jeffstyr/homebrew@b6c0e11 and that will skip the other changes. (The commits are showing up out-of-order here in the issue view above, but that's the first commit.)

@adamv
Copy link
Contributor

adamv commented Jul 8, 2012

I understand, but it makes it hard to review pull requests when they have mixed changes in them like this.

@jeffstyr
Copy link
Contributor Author

jeffstyr commented Jul 8, 2012

Understood, but at this point I think that's the easiest way forward with this pull request. (I'm not sure if it's possible to attach a new branch here, and rebasing a publicly pushed branch is considered bad form.) But let me know what you want me to do.

@jeffstyr
Copy link
Contributor Author

jeffstyr commented Jul 8, 2012

Oh actually, wait, I can move the branch tip back.

@jeffstyr
Copy link
Contributor Author

jeffstyr commented Jul 8, 2012

Okay done.

@adamv
Copy link
Contributor

adamv commented Jul 8, 2012

You can git checkout -b new-branch, switch to the old branch, reset hard back to the single commit, git push -f to update the existing pull request, and still have the other changes in the new branch.

@jeffstyr
Copy link
Contributor Author

jeffstyr commented Jul 8, 2012

Yep already taken care of. Momentary lapse there.

@adamv
Copy link
Contributor

adamv commented Jul 9, 2012

We'll want to use the new MacOS::SYSTEM_RUBY const that was added today, and use the library path out of /System/Frameworks rather than /usr/lib.

@jeffstyr
Copy link
Contributor Author

jeffstyr commented Jul 9, 2012

Ha yes, that's what was in my original commit that you had me move back (using that constant, and having it point to the full path of the system Ruby down inside /System/Frameworks). I can fix it up.

@jeffstyr
Copy link
Contributor Author

jeffstyr commented Jul 9, 2012

Was the SYSTEM_RUBY const fix merged? I don't see it in master. (And if you haven't merged it yet, you can cherry-pick my jeffstyr/homebrew@9b3aa73, which is where I implemented it originally.)

(Also I did it as SYSTEM_RUBY_HOME rather than SYSTEM_RUBY, since you want the path to the base Ruby dir, rather than the path all the way to the executable, so you can make paths to lib.)

@adamv
Copy link
Contributor

adamv commented Jul 9, 2012

Pinging @jacknagel - the change is on his branch; I thought it was in master but I was mistaken.

@jacknagel
Copy link
Contributor

Haven't merged it yet.

@jeffstyr
Copy link
Contributor Author

jeffstyr commented Jul 9, 2012

Okay ping when you have and I'll fix this up. (See above my note about path-to-ruby-executable v. path-to-ruby-base-dir.)

@adamv
Copy link
Contributor

adamv commented Sep 28, 2012

Ping -- can I take this pull request and clean it up? Don't want to wait for a CONST if this solves problems now.

@adamv
Copy link
Contributor

adamv commented Oct 24, 2012

Giving me:

subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1618:38: error: implicit declaration of function 'rb_errinfo' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
                                     rb_errinfo(),

@adamv
Copy link
Contributor

adamv commented Oct 28, 2012

Doing this on Snow Leopard and trying to use the bindings gives me:

$ /usr/bin/irb
>> require 'svn/core'
LoadError: dlopen(/Library/Ruby/Site/1.8/universal-darwin10.0/svn/ext/core.bundle, 9): Library not loaded: /usr/local/Cellar/neon/0.29.0/lib/libneon.27.dylib
  Referenced from: /Library/Ruby/Site/1.8/universal-darwin10.0/svn/ext/core.bundle
  Reason: Incompatible library version: core.bundle requires version 30.0.0 or later, but libneon.27.dylib provides version 29.0.0 - /Library/Ruby/Site/1.8/universal-darwin10.0/svn/ext/core.bundle
    from /Library/Ruby/Site/1.8/universal-darwin10.0/svn/ext/core.bundle
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /Library/Ruby/Site/1.8/svn/error.rb:2
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /Library/Ruby/Site/1.8/svn/core.rb:6
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from (irb):1
>> 

@adamv
Copy link
Contributor

adamv commented Oct 28, 2012

MacPorts is setting "needs_relink" to no, among other things; https://trac.macports.org/browser/trunk/dports/devel/subversion-rubybindings/Portfile

@MikeMcQuaid
Copy link
Member

@adamv Thoughts?

@adamv
Copy link
Contributor

adamv commented Feb 1, 2013

I have been too lazy to really dig into this.

@adamv
Copy link
Contributor

adamv commented Feb 4, 2013

brew install ruby and then brew install subversion --ruby worked for me on Lion, under superenv.

Fails under std env, of course.

@adamv adamv closed this in f7a42d2 Feb 4, 2013
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants