Skip to content
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

Compilation on Fedora 23 fails #491

Closed
Mebus opened this issue Apr 3, 2016 · 3 comments
Closed

Compilation on Fedora 23 fails #491

Mebus opened this issue Apr 3, 2016 · 3 comments

Comments

@Mebus
Copy link

Mebus commented Apr 3, 2016

Hallo,

I tried to compile restic on Fedora 23 but got the following error:

/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `golang_org_x_sys_unix.Syscall':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/gccgo.go:19: undefined reference to `gccgoRealSyscall'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `golang_org_x_sys_unix.Syscall6':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/gccgo.go:26: undefined reference to `gccgoRealSyscall'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `golang_org_x_sys_unix.Syscall9':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/gccgo.go:33: undefined reference to `gccgoRealSyscall'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `golang_org_x_sys_unix.RawSyscall':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/gccgo.go:39: undefined reference to `gccgoRealSyscall'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `golang_org_x_sys_unix.RawSyscall6':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/gccgo.go:44: undefined reference to `gccgoRealSyscall'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `golang_org_x_sys_unix.Linkat':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:29: undefined reference to `golang_org_x_sys_unix.use'
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:30: undefined reference to `golang_org_x_sys_unix.use'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `unix.openat':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:46: undefined reference to `golang_org_x_sys_unix.use'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `unix.readlinkat':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:69: undefined reference to `golang_org_x_sys_unix.use'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o): In function `unix.symlinkat':
/tmp/restic-build-253403830/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:91: undefined reference to `golang_org_x_sys_unix.use'
/tmp/go-build208216028/golang.org/x/sys/libunix.a(_go_.o):/tmp/restic-build-253403830/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go:92: more undefined references to `golang_org_x_sys_unix.use' follow
collect2: Fehler: ld gab 1 als Ende-Status zurück
build failed: exit status 2
exit status 1

My go version is:

go version go1.4.2 gccgo (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2) linux/amd64

Regards,

Mebus

@fd0
Copy link
Member

fd0 commented Apr 3, 2016

Building restic with gccgo is not supported, please use the Go compiler from golang.org. It is available in Fedora 23 as the package golang.

@fd0 fd0 closed this as completed Apr 3, 2016
@Mebus
Copy link
Author

Mebus commented Apr 4, 2016

One can use the "alternatives" command in Fedora to change from gcc-go to golang.

Display current alternatives:

root@hotbox ~ # alternatives --display go
go - status is auto.
 link currently points to /usr/bin/go.gcc
/usr/lib/golang/bin/go - priority 90
 slave gofmt: /usr/lib/golang/bin/gofmt
/usr/bin/go.gcc - priority 92
 slave gofmt: /usr/bin/gofmt.gcc
Current `best' version is /usr/bin/go.gcc.
root@hotbox ~ # 

Change it to golang:

alternatives --set go /usr/lib/golang/bin/go

Mebus

@fd0
Copy link
Member

fd0 commented Apr 4, 2016

Thanks for leaving the solution here for others to find :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants