Subject: pkg/28605: some (all?) pthon modules fail to build on OSX due to missing -lpython
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 12/11/2004 12:57:00
>Number:         28605
>Category:       pkg
>Synopsis:       some (all?) pthon modules fail to build on OSX due to missing -lpython
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 11 12:57:00 +0000 2004
>Originator:     Adrian Portelli
>Release:        n/a
Darwin monty.local 7.6.0 Darwin Kernel Version 7.6.0: Sun Oct 10 12:05:27 PDT 2004; root:xnu/xnu-517.9.4.obj~1/RELEASE_PPC  Power Macintosh powerpc
Trying to build bittorrent, which pulls in two py-* modules, fails because gcc is missing -lpython when building the Python modules.  Adding LDFLAGS+= -lpython fixed the build for me in both cases. 

A user reported a smiliar issue to this on teck-pkg on 19/10/04
( but AFAIK did not receive a response. 
try building bittorrent on OSX with pkgsrc -current.
This is a really bad, slightly tested hack, no more.  Someone who knows more about python and how the modules infrastructure works should see if this is the correct way to address the issue.

RCS file: /cvsroot/pkgsrc/lang/python/,v
retrieving revision 1.11
diff -u -r1.11
---        12 Jun 2004 21:18:31 -0000      1.11
+++        11 Dec 2004 12:53:42 -0000
@@ -35,3 +35,8 @@
 .if defined(PY_PATCHPLIST)
+.include "../../mk/"
+.if ${OPSYS} == "Darwin"
+LDFLAGS+=      -lpython