ivlovric / HFP

HEP Fidelity Proxy
15 stars 7 forks source link

Error message when run make on Centos 7 #11

Closed kYroL01 closed 1 year ago

kYroL01 commented 1 year ago

Hi everyone! I'm trying to deploy HFP on a Centos 7 machine to make some test, but when I run make I got the following error

go: downloading golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40
# runtime/internal/sys
/usr/local/go/src/runtime/internal/sys/consts.go:13:7: StackGuardMultiplier redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch.go:27:74: previous declaration
/usr/local/go/src/runtime/internal/sys/consts.go:16:7: DefaultPhysPageSize redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch.go:36:29: previous declaration
/usr/local/go/src/runtime/internal/sys/consts.go:20:7: PCQuantum redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch.go:40:19: previous declaration
/usr/local/go/src/runtime/internal/sys/consts.go:23:7: Int64Align redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch.go:43:20: previous declaration
/usr/local/go/src/runtime/internal/sys/consts.go:30:7: MinFrameSize redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch.go:50:22: previous declaration
/usr/local/go/src/runtime/internal/sys/consts.go:34:7: StackAlign redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch.go:54:20: previous declaration
make: *** [Makefile:2: all] Error 2

I'm using go version go1.17.5 linux/amd64

Thank you

ivlovric commented 1 year ago

Hi!

what exact command have you been using to compile? It sounds at first like GO issue

This is one we are using from Dockerfile - https://github.com/ivlovric/HFP/blob/main/Dockerfile#LL6C5-L6C42 You can also try without explicitly invoking linker "go build -o HFP *.go"

Take a look similar error here - https://stackoverflow.com/questions/62330084/fail-to-build-with-code-go-redeclared-in-this-block

Thanks, I

kYroL01 commented 1 year ago

Hi @ivlovric thanks for the answer.

I just clone the repo on a Centos 7 machine and run make as said in the Readme, nothing more.

I'm gonna check the link you sent me and let you know

Thank you!

ivlovric commented 1 year ago

Hi,

thanks for more details, running make directly should be enough which I just tested on Intel Mac and build was successful.

Thanks, I

kYroL01 commented 1 year ago

Hey @ivlovric I resolved the issue.

it seems that if you're root when you install go and run export GOPATH=$HOME/go, it place under root/go and then when I run make inside HFP it does not like the path. So, /root is definitely a bad place where to put this :)

Thanks for the reply. Michele