I've just updated my swift binary to version 5.0 (downloaded from https://swift.org/download/#releases).
swift (REPL) and this error pops up:
error: ld-2.27.so 0xffffffff0005c564: adding range [0x1464a-0x146ba) which has a base that is less than the function's low PC 0x14dc0. Please file a bug and attach the file at the start of this error message
error: ld-2.27.so 0xffffffff0005c564: adding range [0x146d0-0x146d6) which has a base that is less than the function's low PC 0x14dc0. Please file a bug and attach the file at the start of this error message
error: ld-2.27.so 0xffffffff0005c5c5: adding range [0x1464a-0x146ba) which has a base that is less than the function's low PC 0x14dc0. Please file a bug and attach the file at the start of this error message
error: ld-2.27.so 0xffffffff0005c5c5: adding range [0x146d0-0x146d6) which has a base that is less than the function's low PC 0x14dc0. Please file a bug and attach the file at the start of this error message
Welcome to Swift version 5.0 (swift-5.0-RELEASE).
The REPL continues just find otherwise.
Any idea what could have happened?
There's a similar case for 4.2 as well
I'm getting the same error on ubuntu 18.04
sudo apt remove libc6-dbg
Moderator note: I'm not sure whether this is a reasonable suggestion for fixing this problem, and I'm antsy about letting potentially dangerous advice stand; if somebody who's more of an expert could weigh in, I'd appreciate it.
libc6-dbg (in a fresh docker container with just swift and dependencies installed) reproduces the issue in the OP, and removing it again resolves it. The package contains libc debug symbols (or versions of libc containing debug symbols? I'm note quite sure: https://packages.ubuntu.com/bionic/amd64/libc6-dbg/filelist), and has some dependant packages, among them valgrind (
apt rdepends libc6-dbg), so I wouldn't blanket recommend just removing it without doing some checking (you can pass
apt rdepends to only show installed dependant packages).
This solves this error but I have to re-export the path each time I open the terminal to use the REPL. I there a way to solve this too?
Just installed 5.1.3 today and run into the exact same problem.
For what it worth, the libc-6-dbg are a list of libc symbol files. This allows you to step into libc's functions when you run gdb (lldb also - but I'm not sure).
For detail information, you can see the following discussion in stackoverflow:
I will leave my libc-6-dbg package as is for now (just in case I need it later). I'll let you know when I find out more.
I dont think this is a swift bug.
The errors are from LLDB parsing the DWARF debugging information in the debug version of
ld.so located at
/usr/lib/debug/lib/x86_64-linux-gnu/ld-2.27.so. It has a DWARF entry that is either incorrectly generated by the compiler or not understood by LLDB.
The debug version of
ld.so is provided by
libc6-dev. Uninstalling the package removes the error since there is no DWARF information in the non-debug version at
Update: I built the
master branch on Ubuntu19.10 which uses ld version 2.30 and this issue no longer occurs.
No entiendo mucho el inglés, así que te lo contestaré en español. abre una terminal distinta y escribe > "nano .bashrc" sin comillas
ve al final y escribe otra vez el comando para exportar el path "export PATH=/..." lo guardas y en otra terminal distinta escribes "source .bashrc" eso refrescará el bashrc
y ya puedes usarlo sin meterle el PATH cuando abras la terminal cada vez