[lldb-dev] [Bug 38974] New: lldb links with system Python library but runs Python from PATH

2018-09-17 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=38974

Bug ID: 38974
   Summary: lldb links with system Python library but runs Python
from PATH
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: MacOS X
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: tdh...@gmail.com
CC: llvm-b...@lists.llvm.org

See https://stackoverflow.com/q/47658596/265521 especially the comments to this
answer: https://stackoverflow.com/a/47658597/265521

Basically Python 2 on OSX is kind of a mess (like Python everywhere really).
OSX always comes with an installation of Python 2, but it is often an old
version, doesn't have pip, etc. For this reason a lot of people like to install
a copy of Python 2 from brew. Unfortunately that means you then have two copies
of Python 2.

LLVM always links with the system Python 2 framework, but when it runs the
Python 2 executable it finds it from PATH, which probably is the one from brew.
This causes an error:

ImportError: cannot import name _remove_dead_weakref

A crappy workaround is to hack PATH when you run lldb, or to uninstall brew's
Python 2.

A proper solution is either:

1. Hard-code LLDB to always run `/usr/bin/python` on OSX since that's the one
it linked with.

2. Get LLDB to load the framework based on where Python says it is (e.g. from
`sysconfig.get_config_var("LIBDIR")` - see
https://stackoverflow.com/questions/47423246/get-pythons-lib-path )

I think the former solution is much easier and possibly more correct - you
probably don't want to link against one Python framework at compile time and
then run it with another at runtime. Maybe OSX can handle versioning properly
in that case though, I don't know.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [7.0.0 Release] The final tag is in

2018-09-17 Thread Hans Wennborg via lldb-dev
Dear testers,

The final version of 7.0.0 has been tagged from the branch at r342370.
It is identical to rc3 modulo release notes and docs changes.

Please build the final binaries and upload to the sftp.

For those following along: this means 7.0.0 is done, but it will take
a few days to get all the tarballs ready and published on the web
page. I will send the announcement once everything is ready.

Thanks again everyone for your work!

Hans
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev