NetBSD Problem Report #43923
From www@NetBSD.org Tue Sep 28 23:16:32 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id F157663B8E6
for <gnats-bugs@gnats.NetBSD.org>; Tue, 28 Sep 2010 23:16:31 +0000 (UTC)
Message-Id: <20100928231631.8BFFC63B8DB@www.NetBSD.org>
Date: Tue, 28 Sep 2010 23:16:31 +0000 (UTC)
From: djo@pasteur.fr
Reply-To: djo@pasteur.fr
To: gnats-bugs@NetBSD.org
Subject: [textproc/py-4Suite] build error on Linux (CentOS)
X-Send-Pr-Version: www-1.0
>Number: 43923
>Category: pkg
>Synopsis: [textproc/py-4Suite] build error on Linux (CentOS)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pettai
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 28 23:20:01 +0000 2010
>Last-Modified: Wed Sep 29 10:37:04 +0000 2010
>Originator: Youssef Ghorbal
>Release: CentOS 5
>Organization:
Institut Pasteur
>Environment:
Linux 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64 GNU/Linux
>Description:
The building of py-4Suite on Linux (CentOS 5) failes with this error message :
Fatal Python error: Interpreter not initialized (version mismatch?)
After some digging, it appears that le ld linker links the shared libraries (EscapeQuotesc.so... etc) against the static libpython that is in /opt/pkg/lib/python2.6/config.
The ld man page states that the linker will look for Libraires specified with -L in the order of their apperience in the command line. And in fact the -L /opt/pkg/lib/python2.6/config comes before -L /opt/pkg/lib (where the libpython2.6.so lies)
The -L opt/pkg/lib/python2.6/config is added in the buildlink3.mk file of the python2.6 package (line 16) : BUILDLINK_LIBDIRS.python26+= lib/python2.6/config
>How-To-Repeat:
build textproc/py-4Suite on a Linux (CentOS) box
>Fix:
Avoid static linking... knowing that :
- GCC and LD does not seem to provide any way to force linking Dynamically Vs Staticly (even -Bdynamic does not have any effect)
- Commenting line 16 in buildlink3.mk make things work but it's not a "real" solution. Some scenarios need to link against the static libpython and this trick disable this ability.
- Reorder the option line to make sure that -L opt/pkg/lib comes before -L opt/pkg/lib/python2.6/config. This works fine (tested "by hand") but there is no way to put it in the pkgsrc way (in the Makefile or in the mk.conf)
- Do some BUILDLINK_TRANSFORM magic in the Makefile of py-4Suite but this will be python version specific and does not seem to work (not taken into effect)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->pettai
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Wed, 29 Sep 2010 10:37:04 +0000
Responsible-Changed-Why:
Over to maintainer.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.