Error Running Swift 5.0 REPL on Ubuntu 18.04.2

I've just updated my swift binary to version 5.0 (downloaded from https://swift.org/download/#releases).

I ran 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?

1 Like

There's a similar case for 4.2 as well
(https://bugs.swift.org/browse/SR-8690).

I'm getting the same error on ubuntu 18.04

sudo apt remove libc6-dbg
1 Like

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.

2 Likes

Installing 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 --installed to apt rdepends to only show installed dependant packages).

3 Likes
Terms of Service

Privacy Policy

Cookie Policy