Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 138647

Summary: dev-lang/python-x.x.x distutils installer does not link libraries
Product: Gentoo Linux Reporter: Rick Harris <rickfharris>
Component: New packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: crusaderky, genstef, olivier, rockoo, rossi.f
Priority: Highest    
Version: 2006.0   
Hardware: All   
OS: Linux   
URL: http://sourceforge.net/tracker/index.php?func=detail&aid=1254718&group_id=5470&atid=305470
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 131527, 145984    

Description Rick Harris 2006-06-30 18:55:32 UTC
Old bug here (6 years), but trips up many apps. that use Python's distutils module.

Distutils tries to pass '-R' to GCC instead of '-Wl,-R' when linking libraries. If any of the libraries linked against in the built library are located in directories that are not in the system's LDPATH, the application will fail to find the linked library.

Read about it here -> http://sourceforge.net/tracker/index.php?func=detail&aid=445902&group_id=5470&atid=105470

One line patch is included on that page from last year.
Comment 1 Rick Harris 2006-06-30 18:57:37 UTC
Correction, patch is located here:

http://sourceforge.net/tracker/index.php?func=detail&aid=1254718&group_id=5470&atid=305470

Thanks
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2006-07-02 09:08:10 UTC
Can we apply this simple patch please, seems it does not work correctly on gentoo without it.


To get the patchfile please run:
wget -q 'http://sourceforge.net/tracker/download.php?group_id=5470&atid=305470&file_id=144928&aid=1254718' -O patchfile

It looks like that:
--- Lib/distutils/unixccompiler.py.orig 2005-08-09 11:54:17.000000000 +0900
+++ Lib/distutils/unixccompiler.py      2005-08-09 12:54:37.000000000 +0900
@@ -207,7 +207,8 @@
             return "+s -L" + dir
         elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
             return ["-rpath", dir]
-        elif compiler[:3] == "gcc" or compiler[:3] == "g++":
+        # This should recognize gcc, g++, gcc-x.y, ccache gcc, etc.
+        elif compiler.find("gcc") >= 0 or compiler.find("g++") >= 0:
             return "-Wl,-R" + dir
         else:
             return "-R" + dir
Comment 3 Stefan Schweizer (RETIRED) gentoo-dev 2006-12-01 15:34:47 UTC
ping
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2007-02-11 11:37:12 UTC
ping?
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2007-03-27 10:10:37 UTC
ping
Comment 6 Bryan Østergaard (RETIRED) gentoo-dev 2007-05-07 07:51:22 UTC
Fixed in 2.3.6-r1, 2.4.4-r1 and 2.5.1.