[go-nuts] Re: Build management mechanism for go lang

2020-05-26 Thread Chashika Weerathunga
go mod, go build fine. Also I want to pack(zip) a executable and other few directories into a folder. And also need to manage project version. In maven we can do tasks like this. So I want to manage all the things in flexible way. On Wednesday, May 27, 2020 at 10:30:21 AM UTC+5:30, Chashika

Re: [go-nuts] Build management mechanism for go lang

2020-05-26 Thread Jan Mercl
On Wed, May 27, 2020 at 7:00 AM wrote: > Instead of creating a bash file, is there any build management tool like > maven for go lang ? I want to do the version, dependency management and also > create build files etc. Please share what requirements are you missing in the standard tools `go

[go-nuts] Build management mechanism for go lang

2020-05-26 Thread chashikajw007
Instead of creating a bash file, is there any build management tool like maven for go lang ? I want to do the version, dependency management and also create build files etc. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-26 Thread Robert Engels
You want the gls package referenced earlier. Go doesn’t have it built in because the designers don’t like it or feel it is necessary. You can find and read the GitHub issue that covers thread/go local storage. > On May 26, 2020, at 8:04 PM, Jon Perryman wrote: > >  > > On Sun, May 24,

[go-nuts] Re: Failed to build gollvm in a docker container

2020-05-26 Thread eric fang
I have been building Gollvm in a container, I can build it successfully no matter on amd64 and arm64. But the ld.gold error message really exists on both platforms. 在 2020年5月26日星期二 UTC+8上午10:14:43,Yuan Ting写道: > > I tried to build gollvm in a docker container (the image is based on > ubuntu

Re: [go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-26 Thread Jon Perryman
On Sun, May 24, 2020 at 11:05 PM wrote: > Yeah this works, but you can say this as workaround, what i really want is, does native go support? if not why? >> On Monday, May 25, 2020 at 7:57:17 AM UTC+5:30, tokers wrote: >> You may try to inspect this go package: https://github.com/jtolio/gls Each

Re: [go-nuts] Build fails when using gollvm toolchain instead of go

2020-05-26 Thread Ian Lance Taylor
On Tue, May 26, 2020 at 12:41 AM Martins Eglitis wrote: > > Thank you for the kind answer. I can not see the asm tool in the gollvm > toolchain. Or should I use something else? There is no asm tool in the GoLLVM toolchain. When building for GoLLVM the go tool will build assembly code using

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-26 Thread 'Than McIntosh' via golang-nuts
This looks exactly like the bug in https://github.com/golang/go/issues/38728. The prolog of the function contains 0: f3 0f 1e fa endbr64 which is confusing the gold linker. This instruction doesn't get added unless the host compiler has "-fcf-protection=branch" turned on. I would

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-26 Thread Yuan Ting
OK, as follows ./tools/gollvm/libgo/CMakeFiles/libgo_c_piclib.dir/__/gofrontend/libgo/go/syscall/errno.c.o: file format elf64-x86-64 Disassembly of section .text.syscall.GetErrno: : 0: f3 0f 1e fa endbr64 4: 64 48 3b 24 25 70 00 cmp%fs:0x70,%rsp b:

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-26 Thread 'Than McIntosh' via golang-nuts
OK. Just to confirm, what do you see from objdump -dr ./tools/gollvm/libgo/CMakeFiles/libgo_c_piclib.dir/__/gofrontend/libgo/go/syscall/errno.c.o for the prolog of syscall.Geterrno. Should be something like Disassembly of section .text.syscall.GetErrno: : 0: 64 48 3b 24

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-26 Thread Yuan Ting
Fine, that is [1/3] /usr/bin/cc -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gollvm/libgo -I/root/llvm-project/llvm/tools/gollvm/libgo -Iinclude -I/root/llvm-project/llvm/include

Re: [go-nuts] Nondeterministic Behavior of for Loop Ranging Over a map

2020-05-26 Thread Kaveh Shahbazian
Thank you, I didn't know about this attack (of-course I need to spend some time to understand it). -- 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

Re: [go-nuts] Re: Need help with go modules

2020-05-26 Thread Henry
You are right. Thanks for the correction. Import path is the correct Go term. On Monday, May 25, 2020 at 12:04:16 PM UTC+7, Jan Mercl wrote: > > On Sun, May 24, 2020 at 6:58 AM Henry > > wrote: > > To create a Go Module, step inside your project folder, and type go mod > init where is the

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-26 Thread 'Than McIntosh' via golang-nuts
OK. I'm wondering if for some reason the fix I put in is not effective. Could you please try this in your build area: rm ./tools/gollvm/libgo/CMakeFiles/libgo_c_piclib.dir/__/gofrontend/libgo/go/syscall/errno.c.o ninja -v libgo_all and post the compile line for errno.c? Thanks, Than On

[go-nuts] Re: time.Ticker's behavior

2020-05-26 Thread Kai Zhang
Hello, It really help,I scan the go source and I can see the ticker.C is 1-element channel.maybe I should just treate it as a normal channel.but the value in channel is Time.Now I am seek how the later ticker be dropped.because the source code said // NewTicker returns a new Ticker

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-26 Thread 'Than McIntosh' via golang-nuts
Hello, The ld.gold error message looks a lot like one reported in a previous bug, https://github.com/golang/go/issues/38728. Can you please check to make sure that your client is sync'd past the CLs that fix this issue, e.g. 0edc44a02852dd0d56cac35163a45634b497d6cd. Thanks, Than On Mon, May

Re: [go-nuts] Build fails when using gollvm toolchain instead of go

2020-05-26 Thread 'Martins Eglitis' via golang-nuts
Hi, Thank you for the kind answer. I can not see the asm tool in the gollvm toolchain. Or should I use something else? This is the go snippet: package asm // RteCompilerRmb is lfence func RteCompilerRmb() // RteCompilerWmb is sfence func RteCompilerWmb() // Prefetcht0 is prefetch func

Re: [go-nuts] Nondeterministic Behavior of for Loop Ranging Over a map

2020-05-26 Thread 'Dan Kortschak' via golang-nuts
On Tue, 2020-05-26 at 16:26 +1000, Jesse McNelis wrote: > On Tue, May 26, 2020 at 3:37 PM Paul Jolly wrote: > > > Why the output of this code is nondeterministic? > > > > See https://golang.org/ref/spec#For_statements, specifically the > > "For > > statements with range clause" subheading,

Re: [go-nuts] Nondeterministic Behavior of for Loop Ranging Over a map

2020-05-26 Thread Kaveh Shahbazian
I was already familiar with the behavior of ordering. The part that was new for me, was the missing map entries. Which of-course was documented - provided by Paul. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

Re: [go-nuts] Nondeterministic Behavior of for Loop Ranging Over a map

2020-05-26 Thread Jesse McNelis
On Tue, May 26, 2020 at 3:37 PM Paul Jolly wrote: > > Why the output of this code is nondeterministic? > > See https://golang.org/ref/spec#For_statements, specifically the "For > statements with range clause" subheading, specifically this bullet: > > > 3. The iteration order over maps is not