[lldb-dev] [Bug 25446] New: lldb Python extension module is linked to libpython

via lldb-dev lldb-dev at lists.llvm.org
Sat Nov 7 22:52:17 PST 2015


            Bug ID: 25446
           Summary: lldb Python extension module is linked to libpython
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: llvm at tim-smith.us
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Hi; I'm a maintainer of Homebrew, a package manager for OS X. We package and
distribute LLVM. LLDB builds an import-able Python module which lands in
lib/python2.7/site-packages/lldb/_lldb.so. When LLVM and LLDB are built using
the cmake build (and possibly otherwise), this module is explicitly linked
against a Python framework, and it should not be, because that prevents the
module from being imported by a compatible interpreter located somewhere else
on the system. An attempt to do so will result in segfaults. This is
unnecessary and makes the module harder to distribute. The module should be
built with -undefined dynamic_lookup instead of -lpython.

Please see this blog post for more background:

Running otool -L against the module shows that it has an explicit link to a
Python framework:

tim at rocketman:~$ otool -L
(compatibility version 2.7.0, current version 2.7.10)

Extension modules should not show this linkage.

This Homebrew bug is related: https://github.com/Homebrew/homebrew/pull/45787

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151108/2a715371/attachment.html>

More information about the lldb-dev mailing list