Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

railsexpress patches won't apply on p448 and latest stable RVM (1.21.20) #20

Closed
srobertjames opened this issue Aug 9, 2013 · 15 comments

Comments

@srobertjames
Copy link

Applying patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/13-railsbench-gc-fixes.patch...................
Error running 'patch -F 25 -p1 -N -f -i /tmp/tmp.KS6QFKzsmCghFhvZHQ',
please read /usr/local/rvm/log/ruby-1.9.3-p448-railsexpress/1376062746_patch.apply.13-railsbench-gc-fixes.patch.log

$ cat /usr/local/rvm/log/ruby-1.9.3-p448-railsexpress/1376062746_patch.apply.13-railsbench-gc-fixes.patch.log
patching file gc.c
Hunk #1 FAILED at 108.
Hunk #2 succeeded at 312 (offset -9 lines).
Hunk #3 FAILED at 557.
Hunk #4 succeeded at 572 with fuzz 3 (offset -9 lines).
Hunk #5 FAILED at 604.
Hunk #6 FAILED at 643.
Hunk #7 succeeded at 593 (offset -111 lines).
Hunk #8 FAILED at 1536.
Hunk #9 FAILED at 1794.
Hunk #10 succeeded at 1299 with fuzz 3 (offset -620 lines).
Hunk #11 FAILED at 2547.
Hunk #12 FAILED at 2563.
Hunk #13 FAILED at 3048.
Hunk #14 succeeded at 2373 with fuzz 2 (offset -714 lines).
Hunk #15 succeeded at 2386 with fuzz 3 (offset -714 lines).
Hunk #16 FAILED at 3150.
Hunk #17 FAILED at 3437.
11 out of 17 hunks FAILED -- saving rejects to file gc.c.rej

$ cat /etc/redhat-release
CentOS release 6.3 (Final)

$ rvm -v

rvm 1.21.20 (stable) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]

@srobertjames
Copy link
Author

Also, for what it's worth, I tried this on another, similar machine, with similar results

@skaes
Copy link
Owner

skaes commented Aug 11, 2013

Is it possible that you applied additional patches?

Can you paste the full rvm command you used and all output?

Otherwise I don't see how to make progress on this issue.

@srobertjames
Copy link
Author

Certainly. Here it is:

$ rvmsudo rvm install 1.9.3 --patch railsexpress -n railsexpress
Warning: can not check /etc/sudoers for secure_path, falling back to call via /usr/bin/env, this breaks rules from /etc/sudoers. Run:

export rvmsudo_secure_path=1

to avoid the warning, put it in shell initialization file to make it persistent.

In case there is no secure_path in /etc/sudoers. Run:

export rvmsudo_secure_path=0

to avoid the warning, put it in shell initialization file to make it persistent.
Installing requirements for centos, might require sudo password.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p448-railsexpress, this may take a while depending on your cpu(s)...
ruby-1.9.3-p448-railsexpress - #downloading ruby-1.9.3-p448, this may take a while depending on your connection...
ruby-1.9.3-p448-railsexpress - #extracted to /usr/local/rvm/src/ruby-1.9.3-p448-railsexpress (already extracted)
Patch 'https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/01-fix-make-clean.patch' not found.
Fetching patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/02-railsbench-gc.patch
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 35340 100 35340 0 0 164k 0 --:--:-- --:--:-- --:--:-- 383k
Applying patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/02-railsbench-gc.patch............................................
Error running 'patch -F 25 -p1 -N -f -i /tmp/tmp.UYd71XelK8JG0xlNAh',
please read /usr/local/rvm/log/ruby-1.9.3-p448-railsexpress/1376419798_patch.apply.02-railsbench-gc.patch.log
Fetching patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/03-display-more-detailed-stack-trace.patch
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
101 405 101 405 0 0 3959 0 --:--:-- --:--:-- --:--:-- 28928
Applying patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/03-display-more-detailed-stack-trace.patch.
Fetching patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/04-fork-support-for-gc-logging.patch
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1704 100 1704 0 0 14794 0 --:--:-- --:--:-- --:--:-- 110k
Applying patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/04-fork-support-for-gc-logging.patch.....
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/05-track-live-dataset-size.patch was already applied.
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/06-webrick_204_304_keep_alive_fix.patch was already applied.
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/07-export-a-few-more-symbols-for-ruby-prof.patch was already applied.
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/08-thread-variables.patch was already applied.
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/09-faster-loading.patch was already applied.
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/10-falcon-st-opt.patch was already applied.
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/11-falcon-sparse-array.patch was already applied.
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/12-falcon-array-queue.patch was already applied.
Fetching patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/13-railsbench-gc-fixes.patch
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8064 100 8064 0 0 76114 0 --:--:-- --:--:-- --:--:-- 492k
Applying patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/13-railsbench-gc-fixes.patch..................
Error running 'patch -F 25 -p1 -N -f -i /tmp/tmp.wzqHKMI5DvhKFogspS',
please read /usr/local/rvm/log/ruby-1.9.3-p448-railsexpress/1376419801_patch.apply.13-railsbench-gc-fixes.patch.log
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/14-show-full-backtrace-on-stack-overflow.patch was already applied.
Patch https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/15-configurable-fiber-stack-sizes.patch was already applied.
There has been an error applying the specified patches. Halting the installation.

@srobertjames
Copy link
Author

In pasting this, I noticed:

Patch 'https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/railsexpress/01-fix-make-clean.patch' not found.

Not sure if that is relevant.

@srobertjames
Copy link
Author

$ patch -v
patch 2.6
Copyright (C) 1988 Larry Wall
Copyright (C) 2003 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

written by Larry Wall and Paul Eggert

@fernandomm
Copy link
Contributor

@srobertjames did you found a solution or workaround? I'm also experiencing this issue when using rvm 1.22.14.

@skaes
Copy link
Owner

skaes commented Sep 30, 2013

I have no clue yet.

I'll try to investigate a bit more this week.

Sorry for the delay.

@justinlocsei
Copy link

I just encountered this when trying to install Ruby 1.9.3-p448 with the railsexpress patch on a CentOS 5.9 box via Chef. When I tried installing it using the execute resource, rvm was creating about ten separate install processes, all of which appeared to be trying to patch Ruby simultaneously, resulting in consistent errors applying the patches but inconsistent results as to which patches failed. When I used the bash resource, rvm used a single process and I could consistently apply the railsexpress patches.

This might not be the cause of the issue that @srobertjames was experiencing, but I feel like there's at least a non-zero chance that looking at how many rvm-related processes are running might be illuminating, and a reasonable chance that this might be related to issues outside of this repo.

@fernandomm
Copy link
Contributor

I just found out that my issue happens when i'm using zsh. I'm using Mountain Lion with oh-my-zsh.

I simply switched to bash and used the same command that I was trying with zsh. It worked perfectly. All patches were properly applied.

Maybe this is related to what @justinlocsei reported.

@skaes skaes closed this as completed in afd8e5f Oct 8, 2013
@jeffomatic
Copy link

FWIW, I just ran into "patch not found" errors while running rvm install directly from bash, so it is possible to encounter this outside of zsh.

After attempting this several times, it seems that rvm will fail to download railsexpress's subpatches in a non-deterministic manner--sometimes it successfully gets a few of them, sometimes only one or two.

I'm able to install the ruby version after attempting the install several times (allowing the local patch cache to populate), which implies a race condition or network-related issue. I'm hoping it's just network-related, which means it's temporary, but I'll post a follow-up if the problem continues.

Relevant details:

  • Environment: Ubuntu 12.04 hosted on OSX 10.8 via VirtualBox 4.2.16 and Vagrant 1.3.5
  • RVM version: 1.23.16 (latest stable as of this posting)
  • RVM command: rvm install 1.9.3-p448-railsexpress --patch railsexpress

@srobertjames
Copy link
Author

Interesting - I'm using zsh as well

On 11/17/13, Jeff Lee notifications@github.com wrote:

FWIW, I just ran into "patch not found" errors while running rvm install
directly from bash, so it is possible to encounter this outside of zsh.

After attempting this several times, it seems that rvm will fail to download
railsexpress's subpatches in a non-deterministic manner--sometimes it
successfully gets a few of them, sometimes only one or two.

I'm able to install the ruby version after attempting the install several
times (allowing the local patch cache to populate), which implies a race
condition or network-related issue. I'm hoping it's just network-related,
which means it's temporary, but I'll post a follow-up if the problem
continues.

Relevant details:

  • Environment: Ubuntu 12.04 hosted on OSX 10.8 via VirtualBox 4.2.16 and
    Vagrant 1.3.5
  • RVM version: 1.23.16 (latest stable as of this posting)
  • RVM command: rvm install 1.9.3-p448-railsexpress --patch railsexpress

Reply to this email directly or view it on GitHub:
#20 (comment)

@jeffomatic
Copy link

@srobertjames Just to clarify, we're not using zsh. Previous commentators mentioned that moving from zsh to bash fixes it, but we're still encountering this problem intermittently using bash.

@Strech
Copy link

Strech commented Apr 3, 2014

Confirm the same (patch not found) problem on debian

@thomasbaustert
Copy link

I head the same issue and could fix it.
I run "rvm install 2.2.3 --patch railsexpress -n railsexpress" and got "Patch railsexpress not found".

I run "rvm get stable" and still got the error.
But .rvm/patchsets/ruby/ only includes 2.2.1 as latest ruby.

I run "rvm get head" and .rvm/patchsets/ruby/ includes 2.2.3 as latest ruby.
I run "rvm install 2.2.3 --patch railsexpress -n railsexpress" and it works.

@SebiTimeWaster
Copy link

SebiTimeWaster commented Mar 22, 2018

"rvm get head" also made it work for me with "rvm install 2.5.0 --patch railsexpress -n railsexpress".
Friendly XING greetings!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants