Ronald Oussoren added the comment: I've attached an updated patch (against the 2.7 branch, the same idea should work for 3.3 and default).
This does two things: 1) Explicity add '-Wl,-search_paths_first' to LDFLAGS on Mac OS X. This ensures that the linker behaves like other platforms: in every directory on the search path look for both shared and static libraries, the default (upto xcode 4) was to first walk the entire path looking for dylibs, then walk the path again looking for static libraries. 2) Change the order of arguments when linking $(BUILDPYTHON), the -L flags in $(LDFLAGS) were first added before the "-L." flag, and are now after that flag. This ensures that the correct python library will be found, even if there is a libpython in one of the directories on the search path that's added by $(LDFLAGS). This should work fine on OSX (obviously) and Linux, but I'm not 100% that moving $(LDFLAGS) will work with the vendor compilers on commercial unix systems. (Adding 3.3 and 3.4 to the versions because those should also be affected by this issue) ---------- keywords: -patch versions: +Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30820/issue-11445-linkflags.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11445> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com