Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333177 - dev-lang/python-2.7 compilation broken (again) due to IRIX patch
Summary: dev-lang/python-2.7 compilation broken (again) due to IRIX patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All All
: High normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 17:03 UTC by Heiko
Modified: 2010-08-17 17:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for python-2.7-irix.patch (python-2.7-irix.patch.patch,496 bytes, patch)
2010-08-17 17:14 UTC, Heiko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko 2010-08-17 17:03:35 UTC
Compiling python-2.7 on my x64-macos box fails with:

Modules/_ctypes/malloc_closure.c: In function 'more_core':
Modules/_ctypes/malloc_closure.c:92: error: too few arguments to function 'mmap'
Modules/_ctypes/malloc_closure.c:93: error: expected ';' before ')' token
Modules/_ctypes/malloc_closure.c:93: error: expected statement before ')' token


Looking at the patch "python-2.7-irix" it reveals that you must've adjusted the patch wrongly:

     item = (ITEM *)mmap(NULL,
                         count * sizeof(ITEM),
                         PROT_READ | PROT_WRITE | PROT_EXEC,
-                        MAP_PRIVATE | MAP_ANONYMOUS,
-                        -1,
+                        flags,
+                        devzero);
                         0);

Note the double closing bracket for the mmap arguments, which isn't there when coompared to the 2.6.4 patch:

 	item = (ITEM *)mmap(NULL,
 			    count * sizeof(ITEM),
 			    PROT_READ | PROT_WRITE | PROT_EXEC,
-			    MAP_PRIVATE | MAP_ANONYMOUS,
-			    -1,
+			    flags,
+			    devzero,
 			    0);

So basically just sync those two patches at this spot.

This reminds me of bug #328089.

Reproducible: Always

Steps to Reproduce:
1. emerge python
2.
3.
Comment 1 Heiko 2010-08-17 17:14:21 UTC
Created attachment 243355 [details, diff]
Fix for python-2.7-irix.patch
Comment 2 Heiko 2010-08-17 17:15:55 UTC
(In reply to comment #1)
> Created an attachment (id=243355) [details]
> Fix for python-2.7-irix.patch
> 

This patch for the patch fixes compilation of python-2.7 wrt mmap for me.
Comment 3 Fabian Groffen gentoo-dev 2010-08-17 17:28:22 UTC
hmmm, I'm sure I compiled it this way (got it installed), but anyway, fixed now.
Comment 4 Heiko 2010-08-17 17:37:18 UTC
(In reply to comment #3)
> hmmm, I'm sure I compiled it this way (got it installed), but anyway, fixed
> now.
> 

Well I also was, but just looking at the patch made me feel not so sure anymore, since it was clearly broken c syntax. Anyway, thanks for listening the wire and fixing.