Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2011 20:21:49 GMT
From:      David Naylor <naylor.b.david@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/157300: [patch] archivers/py-liblzma: fix build with python2.7
Message-ID:  <201105242021.p4OKLnBf019872@red.freebsd.org>
Resent-Message-ID: <201105242030.p4OKUCXI021018@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         157300
>Category:       ports
>Synopsis:       [patch] archivers/py-liblzma: fix build with python2.7
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 24 20:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     David Naylor
>Release:        FreeBSD
>Organization:
Private
>Environment:
FreeBSD dragon.dg 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sat May 21 22:12:29 SAST 2011     root@dragon.dg:/tmp/home/freebsd9/src/sys/DRAGON  amd64
>Description:
Link with -lpythonX.Y otherwise one gets:
ImportError: /usr/local/lib/python2.7/site-packages/lzma.so: Undefined symbol "PyOS_mystricmp"

See for details: https://bugs.launchpad.net/pyliblzma/+bug/594919
>How-To-Repeat:
python -c "import lzma"
>Fix:
See attached for patch

Patch attached with submission follows:

diff -ru /usr/ports/archivers/py-liblzma/files/patch-setup.py py-liblzma/files/patch-setup.py
--- /usr/ports/archivers/py-liblzma/files/patch-setup.py	2009-02-15 22:09:41.000000000 +0200
+++ py-liblzma/files/patch-setup.py	2011-05-24 22:16:53.000000000 +0200
@@ -9,7 +9,16 @@
  
  descr = "Python bindings for liblzma"
  long_descr = """PylibLZMA provides a python interface for the liblzma library
-@@ -74,7 +74,6 @@
+@@ -54,6 +54,8 @@
+ pc_libs = subprocess.Popen("pkg-config --libs liblzma", shell=True, stdout=subprocess.PIPE, close_fds=True).stdout.readline().strip()
+ if(pc_libs):
+ 	link_args.extend(pc_libs.split(' '))
++link_args.append('-L%s/lib' % os.environ["LOCALBASE"])
++link_args.append('-lpython%i.%i' % sys.version_info[:2])
+ 
+ extens=[Extension('lzma', c_files, extra_compile_args=compile_args, extra_link_args=link_args, define_macros=version_define)]
+ 
+@@ -74,7 +76,6 @@
      ],
      py_modules = modules,
      ext_modules = extens,


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105242021.p4OKLnBf019872>