NetBSD Problem Report #24599

Received: (qmail 25274 invoked by uid 605); 29 Feb 2004 10:41:54 -0000
Message-Id: <20040229104152.4921F11155@narn.netbsd.org>
Date: Sun, 29 Feb 2004 10:41:52 +0000 (UTC)
From: dotz@irc.pl
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: dotz@irc.pl
To: gnats-bugs@gnats.NetBSD.org
Subject: lang/python23 doesn't build libpython.so on FreeBSD
X-Send-Pr-Version: www-1.0

>Number:         24599
>Category:       pkg
>Synopsis:       lang/python23 doesn't build libpython.so on FreeBSD
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 29 10:42:00 +0000 2004
>Closed-Date:    Thu Apr 21 19:03:02 +0000 2005
>Last-Modified:  Thu Apr 21 19:03:02 +0000 2005
>Originator:     Michal Pasternak
>Release:        N/A
>Organization:
>Environment:
N/A
>Description:
lang/python23 won't create libpython*.so on FreeBSD
>How-To-Repeat:
Obvious
>Fix:
Apply this patch, ASAP:

(tested on 4.9 and 5.2.1, works okay)

Summary: add "|FreeBSD*" around line 3602 of configure.

cvs diff: Diffing .
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python23/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo    26 Jan 2004 12:10:24 -0000      1.10
+++ distinfo    29 Feb 2004 10:40:50 -0000
@@ -7,5 +7,5 @@
 SHA1 (patch-ae) = 544af90b9b7c5eb5cbad0ba0cefa3d9496b5efe3
 SHA1 (patch-af) = 2989a1975c8ea435903eafc9add57cb7c4d7de14
 SHA1 (patch-ah) = 4bc95e775a2b3f4f1997d0779c561db2e9e7b575
-SHA1 (patch-al) = 3678af129442eb5602f2c8ccec7dc7030b554775
+SHA1 (patch-al) = 1ff2293908fb746460e6d9ab48582bc23ee1bbd1
 SHA1 (patch-am) = 8580ec64d2d369f4426e30368e10d350aac82c03
cvs diff: Diffing patches
Index: patches/patch-al
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python23/patches/patch-al,v
retrieving revision 1.5
diff -u -r1.5 patch-al
--- patches/patch-al    23 Dec 2003 17:24:42 -0000      1.5
+++ patches/patch-al    29 Feb 2004 10:40:50 -0000
@@ -1,7 +1,5 @@
-$NetBSD: patch-al,v 1.5 2003/12/23 17:24:42 recht Exp $
-
---- configure.orig     2003-11-18 20:59:36.000000000 +0100
-+++ configure  2003-12-23 12:29:27.000000000 +0100
+--- configure.orig     Tue Nov 18 20:59:36 2003
++++ configure  Sun Feb 29 11:34:53 2004
 @@ -1440,6 +1440,8 @@
    # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
    OpenBSD/2.* | OpenBSD/3.[01234])
@@ -11,6 +9,15 @@
    # On Solaris 2.6, sys/wait.h is inconsistent in the usage
    # of union __?sigval. Reported by Stuart Bishop.
    SunOS/5.6)
+@@ -3602,7 +3604,7 @@
+         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+         INSTSONAME="$LDLIBRARY".$SOVERSION
+           ;;
+-    Linux*|GNU*|NetBSD*)
++    Linux*|GNU*|NetBSD*|FreeBSD*)
+         LDLIBRARY='libpython$(VERSION).so'
+         BLDLIBRARY='-L. -lpython$(VERSION)'
+         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
 @@ -13854,6 +13856,7 @@
  /* end confdefs.h.  */


>Release-Note:
>Audit-Trail:

From: Michal Pasternak <michal@pasternak.w.lub.pl>
To: dotz@irc.pl
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: pkg/24599: lang/python23 doesn't build libpython.so on FreeBSD
Date: Sun, 29 Feb 2004 14:50:00 +0100

 dotz@irc.pl [Sun, Feb 29, 2004 at 10:41:52AM +0000]:
 > Summary: add "|FreeBSD*" around line 3602 of configure.

 ... same thing applies to lang/python23-pth/patches/patch-al . Add
 "FreeBSD*" after "NetBSD*" around line 3602 in configure.

From: Michal Pasternak <michal@pasternak.w.lub.pl>
To: dotz@irc.pl
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: pkg/24599: lang/python23 doesn't build libpython.so on FreeBSD
Date: Sun, 29 Feb 2004 17:38:25 +0100

 --liOOAslEiF7prFVr
 Content-Type: text/plain; charset=iso-8859-2
 Content-Disposition: inline

 dotz@irc.pl [Sun, Feb 29, 2004 at 10:41:52AM +0000]:
 > Summary: add "|FreeBSD*" around line 3602 of configure.

 ... and in such situation, another *SERIOUS* problem arises: RUNSHARED.
 RUNSHARED declared LD_LIBRARY_PATH (and sets it to somewhere below
 ${WRKSRC}/build/). This seems okay for Linux and NetBSD, but on FreeBSD it
 causes _ssl and bsd185 builds to fail: (bmake -dx output)

 [...]
 case $MAKEFLAGS in  *-s*) LD_LIBRARY_PATH=/build/builds/lang/python23-pth/work.foo/Python-2.3.3: CC='gcc -pthread' LDSHARED='cc -shared -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib' OPT='-DNDEBUG -O2 -I/usr/pkg/include' ./python -E ./setup.py -q build;;  *) LD_LIBRARY_PATH=/build/builds/lang/python23-pth/work.foo/Python-2.3.3: CC='gcc -pthread' LDSHARED='cc -shared -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib' OPT='-DNDEBUG -O2 -I/usr/pkg/include' ./python -E ./setup.py build; ;  esac
 + LD_LIBRARY_PATH=/build/builds/lang/python23-pth/work.foo/Python-2.3.3: CC=gcc -pthread LDSHARED=cc -shared -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib OPT=-DNDEBUG -O2 -I/usr/pkg/include ./python -E ./setup.py build
 running build
 running build_ext
 [...]
 building '_ssl' extension
 gcc -pthread -DNDEBUG -O2 -I/usr/pkg/include -fPIC -fno-strict-aliasing -I. -I/build/builds/lang/python23-pth/work.foo/Python-2.3.3/./Include -I/usr/pkg/include -I/build/builds/lang/python23-pth/work.foo/.buildlink/include -I/build/builds/lang/python23-pth/work.foo/Python-2.3.3/Include -I/build/builds/lang/python23-pth/work.foo/Python-2.3.3 -c /build/builds/lang/python23-pth/work.foo/Python-2.3.3/Modules/_ssl.c -o build/temp.freebsd-4.9-STABLE-i386-2p3/_ssl.o
 cc -shared -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib build/temp.freebsd-4.9-STABLE-i386-2p3/_ssl.o -L/usr/pkg/lib -L/build/builds/lang/python23-pth/work.foo/.buildlink/lib -lssl -lcrypto -o build/lib.freebsd-4.9-STABLE-i386-2p3/_ssl.so -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib
 *** WARNING: renaming "_ssl" since importing it failed: Shared object "libcrypto.so.300" not found
 [...]


 and, after a moment later:

 ===> Building binary package for python23-2.3.3nb1
 pkg_create: can't stat `/usr/pkg/lib/python2.3/lib-dynload/_ssl.so'
 pkg_create: can't stat `/usr/pkg/lib/python2.3/lib-dynload/bsddb185.so'
 tar: Unable to access lib/python2.3/lib-dynload/_ssl.so (No such file or directory)
 tar: Unable to access lib/python2.3/lib-dynload/bsddb185.so (No such file or directory)
 tar: WARNING! These file names were not selected:
 lib/python2.3/lib-dynload/_ssl.so
 lib/python2.3/lib-dynload/bsddb185.so
 pkg_create: /usr/pkg/bin/tar command failed with code 256


 So, we need to setup a reasonable RUNSHARED LD_LIBRARY_PATH, that will allow
 Python to find libcrypt.

 As I don't want to complicate the things for the reader more, than they
 already are - I include attached whole lang/python23-pth/patch-al .

 Another thing is, that bsddb185.so is not built (and system db2 is used,
 even if I PREFER_PKGSRC=yes) - but I think, that you have already a thing to
 think of... I'll cover bsddb185.so issue in some time

 --liOOAslEiF7prFVr
 Content-Type: text/plain; charset=iso-8859-2
 Content-Disposition: attachment; filename=patch-al

 --- configure.orig	Tue Nov 18 20:59:36 2003
 +++ configure	Sun Feb 29 17:15:31 2004
 @@ -1318,7 +1318,7 @@
  mv confdefs.h.new confdefs.h


 -VERSION=2.3
 +VERSION=2p3


  SOVERSION=1.0
 @@ -1440,6 +1440,8 @@
    # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
    OpenBSD/2.* | OpenBSD/3.[01234])
      define_xopen_source=no;;
 +  NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
 +    define_xopen_source=no;;
    # On Solaris 2.6, sys/wait.h is inconsistent in the usage
    # of union __?sigval. Reported by Stuart Bishop.
    SunOS/5.6)
 @@ -3602,10 +3604,10 @@
  	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
  	  INSTSONAME="$LDLIBRARY".$SOVERSION
            ;;
 -    Linux*|GNU*|NetBSD*)
 +    Linux*|GNU*|NetBSD*|FreeBSD*)
  	  LDLIBRARY='libpython$(VERSION).so'
  	  BLDLIBRARY='-L. -lpython$(VERSION)'
 -	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
 +	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}:$libdir:/usr/lib:/lib
  	  INSTSONAME="$LDLIBRARY".$SOVERSION
  	  ;;
      hp*|HP*)
 @@ -13854,6 +13856,7 @@
  /* end confdefs.h.  */

  #include "confdefs.h"
 +#include <sys/types.h>
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>

 --liOOAslEiF7prFVr--

From: Michal Pasternak <michal@pasternak.w.lub.pl>
To: Michal Pasternak <michal@pasternak.w.lub.pl>
Cc: dotz@irc.pl, gnats-bugs@gnats.NetBSD.org
Subject: Re: pkg/24599: lang/python23 doesn't build libpython.so on FreeBSD
Date: Sun, 29 Feb 2004 18:39:31 +0100

 Michal Pasternak [Sun, Feb 29, 2004 at 05:38:25PM +0100]:
 > Another thing is, that bsddb185.so is not built (and system db2 is used,
 > even if I PREFER_PKGSRC=yes)

 Untrue. Buildling works, using the included patch.

From: Marc Recht <recht@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/24599 CVS commit: pkgsrc/lang
Date: Mon,  1 Mar 2004 00:16:35 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	recht
 Date:		Mon Mar  1 00:16:35 UTC 2004

 Modified Files:
 	pkgsrc/lang/python23: distinfo
 	pkgsrc/lang/python23-pth: distinfo
 	pkgsrc/lang/python23-pth/patches: patch-al
 	pkgsrc/lang/python23/patches: patch-al

 Log Message:
 Apply first part (creation of libpython.so) of the patch provided by
 Michal Pasternak in PR 24599.
 Leave the RUNSHARED part for now until it's proven that it's really needed
 and a cleaner has been found.


 To generate a diff of this commit:
 cvs rdiff -r1.10 -r1.11 pkgsrc/lang/python23/distinfo
 cvs rdiff -r1.10 -r1.11 pkgsrc/lang/python23-pth/distinfo
 cvs rdiff -r1.5 -r1.6 pkgsrc/lang/python23-pth/patches/patch-al
 cvs rdiff -r1.5 -r1.6 pkgsrc/lang/python23/patches/patch-al

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback 
State-Changed-By: recht 
State-Changed-When: Mon Mar 1 00:17:13 UTC 2004 
State-Changed-Why:  
Please test the recent pkgsrc version. 

From: Michal Pasternak <michal@pasternak.w.lub.pl>
To: gnats-bugs@gnats.netbsd.org
Cc: dotz@irc.pl, recht@netbsd.org, pkg-manager@netbsd.org
Subject: Re: pkg/24599
Date: Mon, 1 Mar 2004 14:54:17 +0100

 recht@netbsd.org [Mon, Mar 01, 2004 at 12:21:21AM -0000]:
 > Synopsis: lang/python23 doesn't build libpython.so on FreeBSD
 [...]
 > Please test the recent pkgsrc version.

 Hmm, libpython*.so builds okay, thank you, we can mark this as solved...

 But:

 * If I don't use PREFER_PKGSRC, bsddb185.so and _ssl.so also build okay.

 * If I use PREFER_PKGSRC=yes :

   - without LD_LIBRARY_PATH both bsddb185.so and _ssl.so are not built

   - with LD_LIBRARY_PATH /usr/pkg/lib, both bsddb185.so and _ssl.so are
     built

 The fix? Well.

 	# ldconfig -elf /usr/pkg/lib
 	# bmake build

 Works.

 FreeBSD 4.9 ld-elf.so must be *explictly* taught about /usr/pkg/lib path.

 What now?

  * for example, pkgsrc could pass LD_LIBRARY_PATH to CONFIGURE_ENV and
    MAKE_ENV on FreeBSD

  * README.FreeBSD could include some information like:

  	"Add line: ldconfig -elf /usr/pkg/lib to your /etc/rc.local"

  * something else?

 I'll gladly accept any assistance in this area. 

From: Michal Pasternak <michal@pasternak.w.lub.pl>
To: Michal Pasternak <michal@pasternak.w.lub.pl>
Cc: gnats-bugs@gnats.netbsd.org, dotz@irc.pl, recht@netbsd.org,
  pkg-manager@netbsd.org
Subject: Re: pkg/24599
Date: Mon, 1 Mar 2004 15:17:38 +0100

 > 	# ldconfig -elf /usr/pkg/lib

 I've written this in a little unclear way. This will work in this case, but
 in general ldconfig must be given all directories on the command line (eg.
 ldconfig -elf /usr/pkg/lib /usr/X11R6/lib /usr/lib ) to work.
Responsible-Changed-From-To: pkg-manager->freebsd-pkg-people 
Responsible-Changed-By: wiz 
Responsible-Changed-When: Thu Apr 1 18:31:31 UTC 2004 
Responsible-Changed-Why:  
FreeBSD-specific problem. 
State-Changed-From-To: feedback->closed
State-Changed-By: xtraeme@netbsd.org
State-Changed-When: Thu, 21 Apr 2005 19:03:02 +0000
State-Changed-Why:
feedback timeout, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.