Comments (10)
Hi Markus,
Thanks for filing the bug!
Can you tell me a bit more about your setup?
Which OS exactly, which packages are installed, and how you installed them? I'd like to make sure I have a valid repro environment.
I think this could be a bad interaction with some work being done in llvm.org lldb to support Python 3.x for Windows. The code for Linux in that override readline Python module (the site of your error) looks to be no longer valid for Python 3.x. (It might be unrelated, but I've built on Linux quite a bit in the past with both python 2 and 3 installed and hadn't hit this back then. I think this has crept in somewhat recently).
I'd be inclined to try to prevent a Python 3.x from being chosen on Linux for now.
Thanks in advance for digging up and passing along the repro environment!
from llvm-project.
Trying to prevent Python 3.x from being chosen on Linux looks like the right fix.
I'm running Gentoo. The default Python version is 2.7.10. Python 3.4.3 is also installed.
I don't think that the specifics of the distro matter much for this issue.
Just running ":%s/python3.4/python2.7/g" on /var/tmp/build/Ninja-ReleaseAssert/lldb-linux-x86_64/build.ninja in vim fixed the issue for me...
from llvm-project.
The bug linked upstream is the place where this issue should be fixed. After resolving there, it can be cherry picked into swift.org swift-lldb.
from llvm-project.
Okay, thanks Markus. I had thought this was on an Ubuntu system, but thanks for clarifying it was Gentoo. Haven't been there for a while, but that's a nice and clean system! (I used to do Gentoo on PowerPC Macs back in early 2000s in addition to the x86 machines).
I'm glad you have a work-around. Let's keep this open until we have it really resolved for others, though. The llvm.org bug will track the real work, but that's discoverable from here now.
from llvm-project.
Comment by James Laver (JIRA)
Some new anecdata:
-
utils/build-script -R works on my machine
-
utils/build-script --preset=buildbot_linux_1510 does not work with this same error.
I'm running gentoo. Python 2.7 is selected by eselect. Curiously, if I export EPYTHON=python2.7 before building it doesn't cause this error. Don't know quite what's going on there.
from llvm-project.
Comment by Elvis Stansvik (JIRA)
I'm hitting this on Arch. I attached my quick fix to the LLDB bug report. Hopefully this will get sorted soon.
from llvm-project.
Comment by Tom Gall (JIRA)
This all boils down to a couple of issues:
1) lldb/scripts/Python/modules/readline/readline.cpp : It's just not python 3 ready. I module initialization at a glance looks like it needs to be rewritten.
2) The cmake infrastructure in lldb isn't doing proper python detection anyway. Python 2.7 seems to be a hard dep based on the code right now, yet cmake and friends will happily choose 3.4 over 2.7.
Backing up, why isn't -DLLDB_DISABLE_PYTHON:BOOL=ON reasonable? Does swift/lldb really need python support?
from llvm-project.
Comment by Ryan Lovelett (JIRA)
I had been using the patch in the "upstream llvm.org lldb bug" link; however as of 45b60689698b8d66e0de5517d9cfe2396a6093c4 the patch no longer applies.
45b60689698b8d66e0de5517d9cfe2396a6093c4 is the first bad commit
commit 45b60689698b8d66e0de5517d9cfe2396a6093c4
Author: Todd Fiala <todd.fiala@gmail.com>
Date: Sat Feb 20 17:26:07 2016 -0800
Revert "undo the llvm.org lldb svn trunk merge"
This change restores the merge from llvm.org from Friday, plus
fixes up all the test issues that failed to run and were not
caught by changes to the test infrastructure upstream.
This change enhances the lldb inline test mechanism to only
run debuginfo variants that make sense for the platform.
Previously it always ran all of them.
This change only addresses issues on OS X. A follow-up commit
will be made to address known-to-exist Linux issues. I want
to run this change by the OS X pull request testing on the
Swift LLDB CI first, though.
This reverts commit 0c0701210828a9280d4ded63b087efc9cc74003a.
I've attached an updated patch that does.
from llvm-project.
Is this resolved? If so, this should be closed.
from llvm-project.
Please reopen if this is still an issue.
from llvm-project.
Related Issues (20)
- Apple Clang: std::source_location returns a wrong result if called in a function parameter.
- xros and visionos compilation support? HOT 4
- Compiler crash while serializing `std::optional` HOT 1
- Module not found diagnostics are repeated multiply
- A request to Apple to open-source the Metal Shading Language compiler
- [CI] apple-llvm-project-PR-windows fails to checkout `release/5.10`
- Usage of RemoteCachingService?
- CAS Unittests broken on Windows HOT 1
- `-finstrument-functions` linking error on Apple clang
- [IR lower bug] Apple's clang generated code will not abort when empty std::string call pop_back(), while llvm/clang do
- Compiler crash on Windows with `-index-store-path` HOT 1
- Compilation fails on Amazon Linux 2023 aarch64 HOT 1
- Doc Comments Are Ignored for Macros HOT 3
- DAP support
- Apple fork clang++ regression in partial specialization templates for hasher
- [HELP]what's the exactly command to build Xcode toolchain from this apple repo? HOT 1
- LLDB never finishes importing Swift modules/setting up Swift reflection HOT 8
- Clang crash: Idx < Size && "access in bound" in AssignmentTrackingAnalysis HOT 5
- Add support for <bit>
- Clangd format bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvm-project.