-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
python-2.7.4 fails to patch with 000-homebrew.diff #19203
Comments
Does |
I had this exact same issue, but solved it by updating my CLT, unlinking python ( |
~ $ brew doctor Set variables: DYLD_LIBRARY_PATH Warning: Unbrewed dylibs were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected dylibs: /usr/local/lib/libusb-1.0.0.dylib |
Reinstalling CLT didn't fix the problem too... It looks like diff file does not apply cleanly onto source tree untared from Python-2.7.4.tar.bz2. Downloading Python-2.7.4.tar.bz2 by hand, unpacking and trying to apply the diff fails, so i think that we can assume that this dtrace patch is bad... See: jabbas@ /tmp $ wget www.python.org/ftp/python/2.7.4/Python-2.7.4.tar.bz2 --2013-04-17 10:21:05-- http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tar.bz2 Resolving www.python.org (www.python.org)... 82.94.164.162, 2001:888:2000:d::a2 Connecting to www.python.org (www.python.org)|82.94.164.162|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 12146770 (12M) [application/x-bzip2] Saving to: ‘Python-2.7.4.tar.bz2’ 100%[====================================================================================================================>] 12,146,770 3.66MB/s in 3.3s 2013-04-17 10:21:08 (3.50 MB/s) - ‘Python-2.7.4.tar.bz2’ saved [12146770/12146770] jabbas@ /tmp $ tar xjf Python-2.7.4.tar.bz2 jabbas@ /tmp $ cd Python-2.7.4/ jabbas@ /tmp/Python-2.7.4 $ curl 'https://raw.github.com/gist/3415636/2365dea8dc5415daa0148e98c394345e1191e4aa/pythondtrace-patch.diff' | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 65479 100 65479 0 0 68382 0 --:--:-- --:--:-- --:--:-- 127k patching file Doc/library/debug.rst patching file Doc/library/dtrace.rst patching file Include/code.h patching file Include/pydtrace.d patching file Include/pydtrace_offsets.c patching file Include/pydtrace_offsets.sh patching file Lib/test/dtrace_sample.py patching file Lib/test/test_dtrace.py patching file Makefile.pre.in Hunk #1 succeeded at 51 (offset 4 lines). Hunk #2 succeeded at 567 (offset 41 lines). Hunk #3 succeeded at 575 (offset 41 lines). Hunk #4 succeeded at 667 (offset 49 lines). Hunk #5 succeeded at 1310 (offset 70 lines). Hunk #6 succeeded at 1340 (offset 70 lines). patching file Modules/dtracemodule.c patching file Modules/gcmodule.c Hunk #2 succeeded at 873 (offset 51 lines). Hunk #3 succeeded at 1038 (offset 54 lines). patching file Objects/classobject.c Hunk #2 succeeded at 557 (offset 10 lines). Hunk #3 succeeded at 622 (offset 10 lines). Hunk #4 succeeded at 676 (offset 10 lines). Hunk #5 succeeded at 758 (offset 10 lines). patching file Objects/codeobject.c patching file Objects/typeobject.c Hunk #2 succeeded at 754 (offset 4 lines). Hunk #3 succeeded at 798 (offset 4 lines). Hunk #4 succeeded at 935 with fuzz 1 (offset 9 lines). patching file Python/ceval.c patching file Python/sysmodule.c patching file configure Hunk #1 succeeded at 639 (offset 28 lines). Hunk #2 succeeded at 802 (offset 43 lines). Hunk #3 succeeded at 1480 (offset 45 lines). Hunk #4 FAILED at 2652. Hunk #5 FAILED at 3584. Hunk #6 FAILED at 3699. Hunk #7 FAILED at 3742. Hunk #8 FAILED at 3801. Hunk #9 FAILED at 3853. Hunk #10 FAILED at 4396. Hunk #11 FAILED at 6749. Hunk #12 FAILED at 6782. Hunk #13 FAILED at 6815. Hunk #14 FAILED at 6848. Hunk #15 FAILED at 6881. Hunk #16 FAILED at 6914. Hunk #17 FAILED at 6947. Hunk #18 FAILED at 6980. Hunk #19 FAILED at 7013. Hunk #20 FAILED at 7073. Hunk #21 FAILED at 7134. Hunk #22 FAILED at 7195. Hunk #23 FAILED at 7243. Hunk #24 FAILED at 7284. Hunk #25 FAILED at 7346. Hunk #26 FAILED at 7417. Hunk #27 succeeded at 10014 (offset 559 lines). Hunk #28 FAILED at 13031. Hunk #29 FAILED at 13083. Hunk #30 FAILED at 13202. Hunk #31 FAILED at 13468. Hunk #32 FAILED at 15268. Hunk #33 FAILED at 15583. Hunk #34 FAILED at 15611. Hunk #35 FAILED at 15638. 31 out of 35 hunks FAILED -- saving rejects to file configure.rej can't find file to patch at input line 2055 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -r 70274d53c1dd -r 56ac083c60dc configure.in |--- a/configure.in Mon Apr 09 19:04:04 2012 -0400 |+++ b/configure.in Tue Jul 03 03:19:10 2012 +0200 -------------------------- File to patch: ^C jabbas@ /tmp/Python-2.7.4 $ |
@jabbas, did you originally install python 2.7.3 with the DTrace option? That's the only extra option I had used with Python 2.7.3, and it's currently unsupported with 2.7.4. To confirm that this is the issue, I removed my new build of 2.7.4 and tried re-upgrading from 2.7.3 ( |
Ah, missed that comment. Yeah, the DTrace patch doesn't work with 2.7.4 (@fbf7be913) |
So, how about disabling it in the formulae? there is no flag for that right now. |
Ok.. sorry, i'm still pretty new to the homebrew, so i'm probably missing something... I briefly searched python.rb formula and didn't find any references to dtrace or curl, so how this happens that it want to patch it? |
The problem is line 37. Even though there's no declared option |
Ok, found it. Here's a patch https://gist.github.com/jabbas/5402809 |
I came to homebrew from the gentoo world, there was some kind of conditional patch applying. Generally something like this:
Same thing can be applied for other things like configure arguments, CFLAGS/CXXFLAGS etc... So if there is no such thing in homebrew maybe it will be an good idea to implement it? |
Homebrew normally deals with just one version at a time (the latest), but that is certainly possible within Ruby. I cleaned up the patch and have submitted a pull request (#19257), so this should be fixed properly soon. |
Thanks! 2013/4/17 Will Ross [email protected]
Grzegorz Dzięgielewski |
The old patch had a lot of whitespace differences, and they were failing with Python 2.7.4. In addition to removing the whitespace differences, configure.in was removed from the patch, as configure is being patched already. Closes Homebrew#19257. Closes Homebrew#19203. Closes Homebrew#19400. Signed-off-by: Adam Vandenberg <[email protected]>
It fails for around one or two weeks...
The text was updated successfully, but these errors were encountered: