-
Notifications
You must be signed in to change notification settings - Fork 18k
go build error #31336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please mention what it is exactly that you did. We need the repro steps or a sample code that we can use to reproduce the issue ourselves. |
Given the
|
So then this is a duplicate of #31293 ? Your error seems to be slightly different than OP's though. In any case, I am unable to reproduce this in Ubuntu 18.04. |
@agnivade - Both the OP and my errors are from "el6" - ELPA packages for RHEL/CentOS 6. Maybe the slightly different output is caused by "2.20.51.0.2-5.42.el6 20100205" vs "2.20.51.0.2-5.48.el6_10.1 20100205" patches? The reported lineno and function are the same. Maybe the OP left out one line because it had nonascii characters? I cannot say if this is a complete duplicate of #31293. Feels connected, though. |
Here is a FROM centos:centos6.10
RUN yum -y install gcc
ENV GOLANG_VERSION 1.12.2
ENV GOLANG_DOWNLOAD_SHA256 f28c1fde8f293cc5c83ae8de76373cf76ae9306909564f54e0edcf140ce8fe3f
RUN curl -fsSL "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz
ENV PATH="$PATH:/usr/local/go/bin"
COPY hello.go hello.go
RUN go build hello.go It expects the following package main
// const int x = 42;
import "C"
import "fmt"
func main() {
fmt.Println(int(C.x))
} Given a directory containing this
|
I'm confident that this is a dup of #31293, so closing. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
no
What operating system and processor architecture are you using (
go env
)?go env
Outputuname
OutputWhat did you do?
go build
What did you expect to see?
build success
What did you see instead?
# hbg_go_houseapp
/opt/go/dl/go1.12.2/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: BFD version 2.20.51.0.2-5.42.el6 20100205 internal error, aborting at reloc.c line 443 in bfd_get_reloc_size
/usr/bin/ld: Please report this bug.
collect2: ld return 1
The text was updated successfully, but these errors were encountered: