NetBSD Problem Report #28605
From www@netbsd.org Sat Dec 11 12:56:46 2004
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id 696E6251F87; Sat, 11 Dec 2004 12:56:46 +0000 (UTC)
Message-Id: <20041211125646.696E6251F87@narn.netbsd.org>
Date: Sat, 11 Dec 2004 12:56:46 +0000 (UTC)
From: adrianp@netbsd.org
Reply-To: adrianp@netbsd.org
To: gnats-bugs@netbsd.org
Subject: some (all?) pthon modules fail to build on OSX due to missing -lpython
X-Send-Pr-Version: www-1.0
>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: recht
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Dec 11 12:57:00 +0000 2004
>Closed-Date: Tue Dec 28 22:54:21 +0000 2004
>Last-Modified: Tue Dec 28 22:54:21 +0000 2004
>Originator: Adrian Portelli
>Release: n/a
>Organization:
>Environment:
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
>Description:
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
(20041018215440.3705D14401@tiamat.goathill.org) but AFAIK did not receive a response.
>How-To-Repeat:
try building bittorrent on OSX with pkgsrc -current.
>Fix:
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.
Index: extension.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python/extension.mk,v
retrieving revision 1.11
diff -u -r1.11 extension.mk
--- extension.mk 12 Jun 2004 21:18:31 -0000 1.11
+++ extension.mk 11 Dec 2004 12:53:42 -0000
@@ -35,3 +35,8 @@
.if defined(PY_PATCHPLIST)
PLIST_SUBST+= PYINC=${PYINC} PYSITELIB=${PYSITELIB}
.endif
+
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "Darwin"
+LDFLAGS+= -lpython
+.endif
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->recht
Responsible-Changed-By: recht@netbsd.org
Responsible-Changed-When: Sun, 12 Dec 2004 17:43:52 +0000
Responsible-Changed-Why:
assigned to myself
From: Adrian Portelli <adrianp@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/28605 CVS commit: pkgsrc/lang/python
Date: Tue, 28 Dec 2004 22:48:11 +0000 (UTC)
Module Name: pkgsrc
Committed By: adrianp
Date: Tue Dec 28 22:48:11 UTC 2004
Modified Files:
pkgsrc/lang/python: extension.mk
Log Message:
- Fix an error where -lpython does not get defined on Darwin and causes
the compile of python modules to fail.
- Fixes PR# 28605
- Ok'ed recht@
To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 pkgsrc/lang/python/extension.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: adrianp@netbsd.org
State-Changed-When: Tue, 28 Dec 2004 22:54:21 +0000
State-Changed-Why:
I've committed a slightly modified version of the fix to pkgsrc.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.