Logs:
https://gist.github.com/951815254618455a97b33beda505ca4d
Error:
==> Upgrading go
==> Downloading https://linuxbrew.bintray.com/bottles/go-1.8.3.x86_64_linux.bottle.tar.gz
Already downloaded: /home/linuxbrew/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz
==> Pouring go-1.8.3.x86_64_linux.bottle.tar.gz
Error: Failure while executing: [#<Pathname:/home/linuxbrew/.linuxbrew/opt/glibc/bin/ldd>, "/home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf"]
Warning: Bottle installation failed: building from source.
==> Downloading https://storage.googleapis.com/golang/go1.8.3.src.tar.gz
Already downloaded: /home/linuxbrew/.cache/Homebrew/go-1.8.3.tar.gz
==> Downloading https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
Already downloaded: /home/linuxbrew/.cache/Homebrew/go--gobootstrap-1.7.tar.gz
==> ./make.bash --no-clean
==> /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/bin/go install -race std
==> Cloning https://go.googlesource.com/tools.git
Updating /home/linuxbrew/.cache/Homebrew/go--gotools--git
==> Checking out branch release-branch.go1.8
==> go build
Error: Failure while executing: [#<Pathname:/home/linuxbrew/.linuxbrew/opt/glibc/bin/ldd>, "/home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf"]
Can you please report
/home/linuxbrew/.linuxbrew/opt/glibc/bin/ldd /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
Sorry about that - i had intended to put this in the original post:
(the elf doesn't exist)
/home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf: No such file or directory
Sometimes you get that same error message if the ELF exists, but the interpreter doesn't.
ls -l /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
patchelf --print-interpreter /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
That file exists in the bottle:
❯❯❯ tar tf /home/linuxbrew/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
Try brew reinstall go
The file does exist during installation but at some point it disappears!
While brew reinstall go is running in the early stages it is there:
ls -l /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
-rw-r--r--. 1 linuxbrew linuxbrew 10271 May 25 04:15 /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
But not at the later stage:
==> Checking out branch release-branch.go1.8
==> go build
Error: Failure while executing: [#<Pathname:/home/linuxbrew/.linuxbrew/opt/glibc/bin/ldd>, "/home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf"]
+1
@tseemann go is bottled for Linuxbrew, and your installation prefix is /home/linuxbrew/.linuxbrew, so it should be pouring the bottle rather than building from source. Please report brew fetch go
It was failing when installing the binary, and reverts to source in the original post / gist.
Here's the new attempt:
brew fetch go
==> Downloading https://linuxbrew.bintray.com/bottles/go-1.8.3.x86_64_linux.bottle.tar.gz
Already downloaded: /home/linuxbrew/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz
SHA256: b037c1a29ce68ff3e8b66f3ab396f9df6aeeb7051805c52c6d4feb953a4073fb
brew install go
Updating Homebrew...
Error: go 1.8.1 is already installed
To upgrade to 1.8.3, run `brew upgrade go`
brew upgrade go
==> Upgrading 1 outdated package, with result:
go 1.8.3
==> Upgrading go
==> Downloading https://linuxbrew.bintray.com/bottles/go-1.8.3.x86_64_linux.bottle.tar.gz
Already downloaded: /home/linuxbrew/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz
==> Pouring go-1.8.3.x86_64_linux.bottle.tar.gz
Error: Failure while executing: [#<Pathname:/home/linuxbrew/.linuxbrew/opt/glibc/bin/ldd>, "/home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf"]
Warning: Bottle installation failed: building from source.
==> Downloading https://storage.googleapis.com/golang/go1.8.3.src.tar.gz
Already downloaded: /home/linuxbrew/.cache/Homebrew/go-1.8.3.tar.gz
==> Downloading https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
Already downloaded: /home/linuxbrew/.cache/Homebrew/go--gobootstrap-1.7.tar.gz
==> ./make.bash --no-clean
cd /tmp
tar zxf /home/linuxbrew/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz
go/1.8.3/bin/go
Segmentation fault (core dumped)
ls go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf -lsa
16 -rw-r--r--. 1 linuxbrew linuxbrew 14367 May 25 04:15 go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
I tried removing all go and go related packages, and still same error.
@tseemann I've just released brew 1.2.1. I don't believe it addresses this issue, but try brew update all the same.
For troubleshooting, try…
ls -l /lib64/ld-linux-x86-64.so.2
/lib64/ld-linux-x86-64.so.2 2>&1 | head -n1
brew fetch go
cd /tmp
tar xf ~/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
chmod +x go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
~/.linuxbrew/lib/ld.so go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
which -a ldd
/bin/ldd go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
~/.linuxbrew/bin/ldd go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
ldd go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
LD_TRACE_LOADED_OBJECTS=1 ~/.linuxbrew/lib/ld.so go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
The problem still occurs with brew 1.2.2.
````
$ brew install go
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
llvm
==> Downloading https://storage.googleapis.com/golang/go1.8.3.src.tar.gz
Already downloaded: /home/$USERNAME/.cache/Homebrew/go-1.8.3.tar.gz
==> Downloading https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
Already downloaded: /home/$USERNAME/.cache/Homebrew/go--gobootstrap-1.7.tar.gz
==> ./make.bash --no-clean
Last 15 lines from /home/minerva3/.cache/Homebrew/Logs/go/01.make.bash:
cmd/internal/obj/arm
cmd/internal/obj/arm64
cmd/internal/obj/mips
cmd/internal/obj/ppc64
cmd/internal/obj/s390x
cmd/internal/obj/x86
crypto/elliptic
crypto/dsa
encoding/asn1
crypto/rand
go/constant
crypto/rsa
crypto/x509/pkix
crypto/ecdsa
cmd/asm/internal/arch
READ THIS: https://github.com/Linuxbrew/brew/blob/master/docs/Troubleshooting.md#troubleshooting
Please do not report this issue to Homebrew/brew or Homebrew/core, which support macOS only.
These open issues may also help:
go failed to build on ArchLinux: internal PATH gets altered incorrectly https://github.com/Linuxbrew/homebrew-core/issues/3119
go 1.8.3 - failure with 'ldd' and 'line-clang.elf' https://github.com/Linuxbrew/homebrew-core/issues/2798
````
Please report the output of the troubleshooting commands in https://github.com/Linuxbrew/homebrew-core/issues/2798#issuecomment-308242032
````
[minerva2@philae ~]$ brew fetch go --force -bottle
==> Downloading https://storage.googleapis.com/golang/go1.8.3.src.tar.gz
Downloaded to: /home/minerva2/.cache/Homebrew/go-1.8.3.tar.gz
SHA256: 5f5dea2447e7dcfdc50fa6b94c512e58bfba5673c039259fd843f68829d99fa6
Resource: gotools
==> Cloning https://go.googlesource.com/tools.git
Cloning into '/home/minerva2/.cache/Homebrew/go--gotools--git'...
remote: Sending approximately 15.32 MiB ...
remote: Counting objects: 815, done
remote: Finding sources: 100% (15/15)
remote: Total 18626 (delta 12443), reused 18621 (delta 12443)
Receiving objects: 100% (18626/18626), 15.27 MiB | 11.80 MiB/s, done.
Resolving deltas: 100% (12443/12443), done.
==> Checking out branch release-branch.go1.8
Resource: gobootstrap
==> Downloading https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
Downloaded to: /home/minerva2/.cache/Homebrew/go--gobootstrap-1.7.tar.gz
SHA256: 702ad90f705365227e902b42d91dd1a40e48ca7f67a2f4b2fd052aaa4295cd95
[minerva2@philae ~]$ cd tmp/
[minerva2@philae tmp]$ tar xf ~/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
[minerva2@philae tmp]$ chmod +x go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
[minerva2@philae tmp]$ go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
hello
[minerva2@philae tmp]$ ~/.linuxbrew/lib/ld.so go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
hello
[minerva2@philae tmp]$ which -a ldd
~/.linuxbrew/bin/ldd
/usr/bin/ldd
[minerva2@philae tmp]$ /bin/ldd go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
linux-vdso.so.1 => (0x00007ffff46f7000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0b9cefa000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0b9d2c5000)
[minerva2@philae tmp]$ ~/.linuxbrew/bin/ldd go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
linux-vdso.so.1 => (0x00007ffcc99d4000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa4ca790000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa4cab51000)
[minerva2@philae tmp]$ ~/.linuxbrew/bin/ldd go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
linux-vdso.so.1 => (0x00007fff919cb000)
libc.so.6 => /lib64/libc.so.6 (0x00007f78ff059000)
/lib64/ld-linux-x86-64.so.2 (0x00007f78ff41a000)
[minerva2@philae tmp]$ ldd go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
linux-vdso.so.1 => (0x00007ffe123f3000)
libc.so.6 => /lib64/libc.so.6 (0x00007f5b546db000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5b54a9c000)
[minerva2@philae tmp]$ LD_TRACE_LOADED_OBJECTS=1 ~/.linuxbrew/lib/ld.so go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
linux-vdso.so.1 (0x00007ffc767a4000)
libc.so.6 => /home/minerva2/.linuxbrew/Cellar/glibc/2.19/lib/libc.so.6 (0x00007facf9672000)
/lib64/ld-linux-x86-64.so.2 => /home/minerva2/.linuxbrew/lib/ld.so (0x00007facf9a21000)
````
Thanks for the report, Hanzei. That all looks fine, and I'm running out of ideas to troubleshoot. I'm busy for the rest of this month with work. If you ping me again in August I can take a look at this issue again. Sorry that I couldn't be of more help.
Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like go.
Another possible workaround for you is brew install --force-bottle go, but no promises.
Hey @sjackman, thanks for you help! brew install --force-bottle go also fails:
==> Downloading https://linuxbrew.bintray.com/bottles/go-1.8.3.x86_64_linux.bottle.tar.gz
Already downloaded: /home/minerva3/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz
==> Pouring go-1.8.3.x86_64_linux.bottle.tar.gz
Error: Failure while executing: [#<Pathname:/home/minerva3/.linuxbrew/opt/glibc/bin/ldd>, "/home/minerva3/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf"]
Warning: Bottle installation failed: building from source.
==> Downloading https://storage.googleapis.com/golang/go1.8.3.src.tar.gz
Already downloaded: /home/minerva3/.cache/Homebrew/go-1.8.3.tar.gz
==> Downloading https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
Already downloaded: /home/minerva3/.cache/Homebrew/go--gobootstrap-1.7.tar.gz
==> ./make.bash --no-clean
Last 15 lines from /home/minerva3/.cache/Homebrew/Logs/go/01.make.bash:
compress/zlib
archive/zip
compress/gzip
image/png
index/suffixarray
internal/pprof/profile
cmd/pprof/internal/svg
debug/elf
debug/macho
debug/pe
runtime/pprof/internal/protopprof
cmd/pprof/internal/plugin
runtime/pprof
cmd/pprof/internal/symbolizer
testing/internal/testdeps
READ THIS: https://github.com/Linuxbrew/brew/blob/master/docs/Troubleshooting.md#troubleshooting
Please do not report this issue to Homebrew/brew or Homebrew/core, which support macOS only.
These open issues may also help:
go 1.8.3 - failure with 'ldd' and 'line-clang.elf' https://github.com/Linuxbrew/homebrew-core/issues/2798
Sigh. That's right. I knew that already. Sorry for pointing you in the wrong direction, Hanzei. I'd definitely appreciate if anyone has time to look into resolving this issue.
==> Verifying go-1.8.3.x86_64_linux.bottle.tar.gz checksum
==> Pouring go-1.8.3.x86_64_linux.bottle.tar.gz
tar xzf /home/linuxbrew/.cache/Homebrew/go-1.8.3.x86_64_linux.bottle.tar.gz
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/bin/go
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/bin/godoc
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/pkg/tool/linux_amd64/pprof
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/pkg/tool/linux_amd64/trace
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-gcc.elf
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/ranges.elf
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/split.elf
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/typedef.elf
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/elf/testdata/gcc-386-freebsd-exec
/home/linuxbrew/.linuxbrew/opt/patchelf/bin/patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib --set-interpreter /home/linuxbrew/.linuxbrew/lib/ld.so /home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/elf/testdata/gcc-amd64-linux-exec
Error: Failure while executing: [#<Pathname:/home/linuxbrew/.linuxbrew/opt/glibc/bin/ldd>, "/home/linuxbrew/.linuxbrew/Cellar/go/1.8.3/libexec/src/debug/dwarf/testdata/line-clang.elf"]
Warning: Bottle installation failed: building from source.
I think the patchelf stuff is new? But I could be wrong. Still failing on the bottle attempt.
As a hack workaround, try commenting out:
raise ErrorDuringExecution, command unless $CHILD_STATUS.success?
https://github.com/Linuxbrew/brew/blob/master/Library/Homebrew/os/linux/elf.rb#L58
go has now bottles; and is building for us, see #3996
I believe this issue is fixed :)
The issue is fixed for me. Thanks!
The bottle installed. Thank you.