Sorry for confusing, but I got something wrong: gollvm still does not work under root. It seems problems related with split-stack, but I do not know how to fix it yet.
在2022年7月17日星期日 UTC+8 22:59:14<hiter adole> 写道: > Hi khanh: > > I met that problem too, and I thought I somehow fix it. I located the > source code and found that when caller function is compiled with > "fsplit-stack" and callee function is compiled with "fno-split-stack", the > address of caller functions has to be relocated. However it remains me that > as a normal user, we are unable to change the code of go library, therefore > I tried to compile the go project with "sudo", everything works. > > yours > Zhou Qingyang > 在2021年3月16日星期二 UTC+8 08:09:59<tnkh...@gmail.com> 写道: > >> Hi Ian, >> This problem is somewhat resolved for me now. Gollvm works perfectly in >> my fresh installed Debian. >> Maybe Go and Gollvm has some conflicts in my previous build or Ubuntu got >> some problem. >> Thanks a lot for your help. >> >> Khanh >> >> On Tuesday, March 16, 2021 at 7:53:34 AM UTC+8 Ian Lance Taylor wrote: >> >>> On Sat, Mar 13, 2021 at 4:51 PM Khanh TN <tnkh...@gmail.com> wrote: >>> > >>> > Hi, Ian, >>> > It does look like importing golang.org/x/sys/unix causes the problem >>> > A simple go program like >>> > >>> > package main >>> > >>> > import ( >>> > "fmt" >>> > "golang.org/x/sys/unix" >>> > ) >>> > >>> > func main() { >>> > fmt.Println("Hello, World!") >>> > fmt.Println(unix.Getpagesize()) >>> > } >>> > >>> > does cause the same error as before. This file builds and runs fine >>> with my normal Go but gives that error with Gollvm. If I do not include >>> unix, Gollvm does work though. >>> > What do you suggest? >>> >>> This sounds like a bug somewhere between LLVM and gold. You should >>> probably file a bug report against gold (at >>> https://sourceware.org/bugzilla). I don't know why nobody else has >>> reported this. >>> >>> You may be able to make progress by using lld. I don't know; I've >>> never tried it myself. >>> >>> Ian >>> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/21099ce2-f89e-4c3e-a935-5afc5954b165n%40googlegroups.com.