[go-nuts] signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fcb5ae54390

2017-08-18 Thread Bhaskar Singhal
I am running into a seg fault. The code keeps crashing either due to unexpected signal or double free. Any pointers on what I am doing wrong here: Code Snippet: // Put puts the given key / value to the kvstore func (kvs *kvstore) Put(key []byte, value []byte) error { /* Encode key to avo

Re: [go-nuts] signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fcb5ae54390

2017-08-18 Thread Bhaskar Singhal
ri, Aug 18, 2017 at 7:57 PM, Ian Lance Taylor wrote: > On Fri, Aug 18, 2017 at 12:53 AM, Bhaskar Singhal > wrote: > > I am running into a seg fault. The code keeps crashing either due to > > unexpected signal or double free. > > > > Any pointers on what I am doing wron

[go-nuts] How to specify -gccgoflags using pseudo #cgo directive

2017-07-18 Thread bhaskar . singhal
Hi, I am trying to link a dynamic library to my go code. /* #cgo CFLAGS: -I/usr/local/include #cgo LDFLAGS: -L/usr/local/lib -ltemp #include #include #include */ When I run go build -x it fails due to missing symbols which are exported from libtemp.so but if do go build -x -gccgoflags '-L/us

Re: [go-nuts] How to specify -gccgoflags using pseudo #cgo directive

2017-07-18 Thread Bhaskar Singhal
root@xx-23:~# uname -a Linux xx-23 4.4.70-letstry #1 SMP Tue Jul 11 13:58:17 IST 2017 x86_64 x86_64 x86_64 GNU/Linux root@xx-23:/usr/lib/go/src/pkg# go version go version go1.2.1 linux/amd64 root@xx-23:~/temp-go/src# go build -x WORK=/tmp/go-build751660824 mkdir -p $WORK/_/root/te

Re: [go-nuts] How to specify -gccgoflags using pseudo #cgo directive

2017-07-18 Thread Bhaskar Singhal
-go/src/_obj/_all.o # internal cd . /usr/lib/go-1.8/pkg/tool/linux_amd64/link -o $WORK/_/root/temp-go/src/_obj/exe/a.out -L $WORK -extld=gcc -buildmode=exe -buildid=3d229efca1b0f33762cb3fc61fd1f12965192508 $WORK/_/root/temp-go/src.a mv $WORK/_/root/temp-go/src/_obj/exe/a.out src On Wed, Jul 19,

Re: [go-nuts] How to specify -gccgoflags using pseudo #cgo directive

2017-07-19 Thread Bhaskar Singhal
Thanks, Ian. Regards, Bhaskar On Wed, Jul 19, 2017 at 11:14 PM, Ian Lance Taylor wrote: > On Tue, Jul 18, 2017 at 10:49 PM, Bhaskar Singhal > wrote: > > Upgrading go to 1.8 resolved the issue. But I no longer see gccgo > > invocation. > > Looks like you started wit