Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138647 - dev-lang/python-x.x.x distutils installer does not link libraries
Summary: dev-lang/python-x.x.x distutils installer does not link libraries
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Highest normal (vote)
Assignee: Python Gentoo Team
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks: 131527 145984
  Show dependency tree
 
Reported: 2006-06-30 18:55 UTC by Rick Harris
Modified: 2007-05-07 07:51 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.