Re: [go-nuts] golang call c++ api by swig

2017-06-22 Thread Lee Rick
I had try it, but it didn't work with "Go bindings for OpenCV / 2.x API",


macbookpro:gocv fredlee$ go build -x

WORK=/var/folders/34/z2z_vp1573g5014m8k7wys10gn/T/go-build392930293

mkdir -p $WORK/github.com/lazywei/go-opencv/gocv/_obj/

mkdir -p $WORK/github.com/lazywei/go-opencv/

cd 
/Users/fredlee/Documents/开发/go/workspace/src/github.com/lazywei/go-opencv/gocv

pkg-config --cflags opencv opencv

pkg-config --libs opencv opencv

swig -version

cd $WORK

/usr/local/go/pkg/tool/darwin_amd64/compile -o 
./github.com/lazywei/go-opencv/gocv/_obj/_go_.o -trimpath . -p main 
-complete -buildid 8fa91816c0fa30da71edefbe5680e07f9132cbc4 -D _$WORK 
./swig_intsize.go

cd 
/Users/fredlee/Documents/开发/go/workspace/src/github.com/lazywei/go-opencv/gocv

swig -go -cgo -intgosize 64 -module gocv -o 
$WORK/github.com/lazywei/go-opencv/gocv/_obj/gocv_wrap.cxx -outdir 
$WORK/github.com/lazywei/go-opencv/gocv/_obj/ 
-I/usr/local/Cellar/opencv/2.4.13.2/include/opencv 
-I/usr/local/Cellar/opencv/2.4.13.2/include -c++ gocv.swigcxx

# github.com/lazywei/go-opencv/gocv

gocv_core.i:121: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:129: Warning 503: Can't wrap 'operator CvSize' unless renamed 
to a valid identifier.

gocv_core.i:130: Warning 503: Can't wrap 'operator CvSize2D32f' unless 
renamed to a valid identifier.

gocv_core.i:121: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:129: Warning 503: Can't wrap 'operator CvSize' unless renamed 
to a valid identifier.

gocv_core.i:130: Warning 503: Can't wrap 'operator CvSize2D32f' unless 
renamed to a valid identifier.

gocv_core.i:121: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:129: Warning 503: Can't wrap 'operator CvSize' unless renamed 
to a valid identifier.

gocv_core.i:130: Warning 503: Can't wrap 'operator CvSize2D32f' unless 
renamed to a valid identifier.

gocv_core.i:156: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:170: Warning 503: Can't wrap 'operator CvRect' unless renamed 
to a valid identifier.

gocv_core.i:40: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:45: Warning 503: Can't wrap 'operator CvPoint' unless renamed 
to a valid identifier.

gocv_core.i:46: Warning 503: Can't wrap 'operator CvPoint2D32f' unless 
renamed to a valid identifier.

gocv_core.i:47: Warning 503: Can't wrap 'operator Vec' unless 
renamed to a valid identifier.

gocv_core.i:40: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:45: Warning 503: Can't wrap 'operator CvPoint' unless renamed 
to a valid identifier.

gocv_core.i:46: Warning 503: Can't wrap 'operator CvPoint2D32f' unless 
renamed to a valid identifier.

gocv_core.i:47: Warning 503: Can't wrap 'operator Vec' unless 
renamed to a valid identifier.

gocv_core.i:40: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:45: Warning 503: Can't wrap 'operator CvPoint' unless renamed 
to a valid identifier.

gocv_core.i:46: Warning 503: Can't wrap 'operator CvPoint2D32f' unless 
renamed to a valid identifier.

gocv_core.i:47: Warning 503: Can't wrap 'operator Vec' unless 
renamed to a valid identifier.

gocv_core.i:82: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:86: Warning 503: Can't wrap 'operator CvPoint3D32f' unless 
renamed to a valid identifier.

gocv_core.i:88: Warning 503: Can't wrap 'operator Vec' unless 
renamed to a valid identifier.

gocv_core.i:82: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:86: Warning 503: Can't wrap 'operator CvPoint3D32f' unless 
renamed to a valid identifier.

gocv_core.i:88: Warning 503: Can't wrap 'operator Vec' unless 
renamed to a valid identifier.

gocv_core.i:82: Warning 503: Can't wrap 'operator =' unless renamed to a 
valid identifier.

gocv_core.i:86: Warning 503: Can't wrap 'operator CvPoint3D32f' unless 
renamed to a valid identifier.

gocv_core.i:88: Warning 503: Can't wrap 'operator Vec' unless 
renamed to a valid identifier.

gocv_core.i:241: Warning 516: Overloaded method cv::Mat::diag(cv::Mat const 
&) ignored,

gocv_core.i:239: Warning 516: using cv::Mat::diag() const instead.

gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >() 
const ignored,

gocv_core.i:279: Warning 516: using cv::Mat::at< float >() instead.

gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(int) 
ignored,

gocv_core.i:279: Warning 516: using cv::Mat::at< float >(int) const instead.

gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(int 
const *) const ignored,

gocv_core.i:279: Warning 516: using cv::Mat::at< float >(int const *) 
instead.

gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(int) 
const 

Re: [go-nuts] golang call c++ api by swig

2017-06-22 Thread Justin Israel
What about referencing existing OpenCV bindings that are already using
swig?
https://github.com/lazywei/go-opencv/tree/master/gocv

On Thu, Jun 22, 2017, 9:49 PM Lee Rick  wrote:

> hi,guys
>I wanna wrap opencv2.4.x library to my project by swig, how to do
> it?
>anyone can give me a demo ?
>   hope to reply.
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Facing issues while performing clean.bash

2017-06-22 Thread Ashish Kashinath
Okay, thanks.


On Jun 22, 2017 15:43, "Dave Cheney"  wrote:

> Try without running clean.bash, I've never needed it.
>
> On Fri, 23 Jun 2017, 08:40 Ashish Kashinath  wrote:
>
>> Sorry for not mentioning that. Actually, I had rebuilt the go binaries
>> from source. (I had put some prints in the scheduler to trace the scheduler
>> codeflow )
>> So I wanted to do something like a make clean to ensure the intermediary
>> files generated during  compilation.  This would then help me push just the
>> required files to my remote repo.
>>
>> On Jun 22, 2017 15:35, "Dave Cheney"  wrote:
>>
>>> What is the problem you are trying to solve? What problem does running
>>> clean.bash solve for you?
>>
>>
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "golang-nuts" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/golang-nuts/qZxg-cCpljE/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> golang-nuts+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Facing issues while performing clean.bash

2017-06-22 Thread Dave Cheney
Try without running clean.bash, I've never needed it.

On Fri, 23 Jun 2017, 08:40 Ashish Kashinath  wrote:

> Sorry for not mentioning that. Actually, I had rebuilt the go binaries
> from source. (I had put some prints in the scheduler to trace the scheduler
> codeflow )
> So I wanted to do something like a make clean to ensure the intermediary
> files generated during  compilation.  This would then help me push just the
> required files to my remote repo.
>
> On Jun 22, 2017 15:35, "Dave Cheney"  wrote:
>
>> What is the problem you are trying to solve? What problem does running
>> clean.bash solve for you?
>
>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "golang-nuts" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/golang-nuts/qZxg-cCpljE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> golang-nuts+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Facing issues while performing clean.bash

2017-06-22 Thread Ashish Kashinath
* intermediary files generated during compilation are cleaned. This
would then help me push just the required files to my remote repo.

Thanks,

On Jun 22, 2017 15:40, "Ashish Kashinath"  wrote:

Sorry for not mentioning that. Actually, I had rebuilt the go binaries from
source. (I had put some prints in the scheduler to trace the scheduler
codeflow )
So I wanted to do something like a make clean to ensure the intermediary
files generated during  compilation.  This would then help me push just the
required files to my remote repo.

On Jun 22, 2017 15:35, "Dave Cheney"  wrote:

> What is the problem you are trying to solve? What problem does running
> clean.bash solve for you?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/golang-nuts/qZxg-cCpljE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Facing issues while performing clean.bash

2017-06-22 Thread Ashish Kashinath
Sorry for not mentioning that. Actually, I had rebuilt the go binaries from
source. (I had put some prints in the scheduler to trace the scheduler
codeflow )
So I wanted to do something like a make clean to ensure the intermediary
files generated during  compilation.  This would then help me push just the
required files to my remote repo.

On Jun 22, 2017 15:35, "Dave Cheney"  wrote:

> What is the problem you are trying to solve? What problem does running
> clean.bash solve for you?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/golang-nuts/qZxg-cCpljE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Facing issues while performing clean.bash

2017-06-22 Thread Dave Cheney
What is the problem you are trying to solve? What problem does running 
clean.bash solve for you?

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] go build for mips

2017-06-22 Thread ktye78
This can be related to issue #18162
If you compile a normal go program for mips32 with the current compiler and 
run it on hardware without FPU, this is the error message you see.
The preferred solution is for the compiler to emmit soft float code. It has 
been implemented but did not make it into go-1.9.
As a work around, if you can recompile the kernel, you can add floating 
point emulation to the kernel.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Facing issues while performing clean.bash

2017-06-22 Thread akashina
Hi folks. I am trying to execute clean.bash but it is giving me an error 
like 

go: open /home/ak7/go1.8/src/runtime/internal/sys/zversion.go: no such file 
or directory

I am on a Linux-ubuntu desktop 16.04 with bash shell running go1.8.0.; 
On the other hand, make.bash does complete successfully and install go 
binaries into my GOROOT 

Could you suggest what is it that I am missing here? 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] go build for mips

2017-06-22 Thread Ian Lance Taylor
On Thu, Jun 22, 2017 at 9:19 AM,   wrote:
> I try to build a simple hello world with
> cgo_enabled=1 goarch=mips goos=linux go build hello.go| Result: illegal
> instruction
>
> file information: ELF 32-bit MSB executable, MIPS, MIPS32 version 1 (SYSV),
> statically linked, not stripped
>
> Also, tried to build with another compile (CC=/path/to/Compiler) instead the
> one go uses. Also illegal instruction
> on my router tp-linkwdr3500.

Please show us precisely what you did.  Don't transcribe--that just
leads to confusion like the use of lower case when you meant upper
case.  Cut and paste from the terminal.

Please show us precisely what happened.  What was the exact and
complete output of running the program on the MIPS board?

Try running the program on the MIPS board using a debugger to find out
exactly what the illegal instruction was.

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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: go get golang.org/x/tools asks for a go.googlesource.com password on osx??

2017-06-22 Thread Jason E. Aten
Nailed it:

It turns out there was a ~/.gitcookies file, referenced from ~/.gitconfig, 
that was messing up git.

The ~/.gitcookies file had a .googlesource.com cookie in it. I renamed the 
~/.gitcookies file, effectively deleting it, and now things work as 
expected.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: go get golang.org/x/tools asks for a go.googlesource.com password on osx??

2017-06-22 Thread Jason E. Aten
It does work fine on linux, and on a different OSX 10.11.6 laptop with git 
2.8.4 (Apple Git-73), so it is definitely a configuration on the OSX 
10.12.5/git 2.11.0 (Apple Git-81) thing.

I'd heard osx Sierra 10.12.5 was bad but I had no idea it was this bad... 
can anyone reproduce (or not) on Sierra 10.12.5?

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] go get golang.org/x/tools asks for a go.googlesource.com password on osx??

2017-06-22 Thread Jason E. Aten
 

go version go1.8.3 darwin/amd64

osx 10.12.5


$ *go get -t -u -v  golang.org/x/tools*

Fetching https://golang.org/x/tools?go-get=1

Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)

get "golang.org/x/tools": found meta tag 
main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", 
RepoRoot:"https://go.googlesource.com/tools"} 
at https://golang.org/x/tools?go-get=1

golang.org/x/tools (download)

# cd .; git clone https://go.googlesource.com/tools 
/Users/me/go/src/golang.org/x/tools

Cloning into '/Users/me/go/src/golang.org/x/tools'...

fatal: remote error: 



Invalid authentication credentials.


Please generate a new identifier:

  https://go.googlesource.com/new-password



package golang.org/x/tools: exit status 128

$


$ *git version*

git version 2.11.0 (Apple Git-81)


This would seem to break alot of software installs... so I am assuming 
there is just something misconfigured with my git on osx. But I can't seem 
to find it.


$ *git config -l*

user.name=Jason 

user.email=***notshown***

http.cookiefile=/Users/me/.gitcookies

alias.change=codereview change

alias.gofmt=codereview gofmt

alias.mail=codereview mail

alias.pending=codereview pending

alias.submit=codereview submit

alias.sync=codereview sync

$ 


Any suggestions for getting 'go get' of golang.org/x/tools working again?

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] go build for mips

2017-06-22 Thread lucasw
I'm building on linux amd64 system and want to execute the go binary on 
mips arch.

Go1.8

The binary is successfully compiled, but when I execute it on my specific 
architecture (mips), I got an illegal instruction.

The file information I provided is about the go binary compiled.

It's a hello world in go --> https://gobyexample.com/hello-world

I was able to run helloworld for mips but I had to build an image based on 
eglibc (glibc), instead of uClibc (based on this tutorial: 
http://akagi201.org/post/golang-on-openwrt/) 
I would like to be able to run without changing the base image.

Harmen, I build it with capitals like you said (only typed with lowercase 
here).

On Thursday, June 22, 2017 at 3:32:27 PM UTC-3, Nathan Kerr wrote:
>
> What system are you building on (OS and architecture)?
>
> What version of Go are you using?
>
> Is the result of running go build an illegal instruction?
>
> What file did you provide information for?
>
> What is in hello.go?
>
> On Thursday, June 22, 2017 at 6:19:47 PM UTC+2, luc...@kryptus.com wrote:
>>
>> I try to build a simple hello world with
>> cgo_enabled=1 goarch=mips goos=linux go build hello.go| Result: 
>> illegal instruction 
>>
>> file information: ELF 32-bit MSB executable, MIPS, MIPS32 version 1 
>> (SYSV), statically linked, not stripped
>>
>> Also, tried to build with another compile (CC=/path/to/Compiler) instead 
>> the one go uses. Also illegal instruction 
>> on my router tp-linkwdr3500.
>>
>> If anyone could give me a hint, I would be grateful.
>>
>> Thanks,
>> Lucas.
>>
>>
>> On Thursday, June 22, 2017 at 11:37:08 AM UTC-3, Ian Lance Taylor wrote:
>>>
>>> On Wed, Jun 21, 2017 at 7:48 PM, lucas.w...@gmail.com 
>>>  wrote: 
>>> > 
>>> > Since go1.8 added support for mips32, why can't build a simple hello 
>>> world 
>>> > for a mips architecture system? 
>>> > 
>>> > I successfully build programs for arm architecture, but could not do 
>>> the 
>>> > same for mips. 
>>>
>>> Tell us precisely what you did and precisely what happened. 
>>>
>>> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] go build for mips

2017-06-22 Thread Harmen
On Thu, Jun 22, 2017 at 11:32:27AM -0700, Nathan Kerr wrote:
> >
> > I try to build a simple hello world with
> > cgo_enabled=1 goarch=mips goos=linux go build hello.go| Result: 
> > illegal instruction 

They need to be captitals:

$ GOARCH=mips GOOS=linux go build


> >
> > file information: ELF 32-bit MSB executable, MIPS, MIPS32 version 1 
> > (SYSV), statically linked, not stripped
> >
> > Also, tried to build with another compile (CC=/path/to/Compiler) instead 
> > the one go uses. Also illegal instruction 
> > on my router tp-linkwdr3500.
> >
> > If anyone could give me a hint, I would be grateful.
> >
> > Thanks,
> > Lucas.
> >
> >
> > On Thursday, June 22, 2017 at 11:37:08 AM UTC-3, Ian Lance Taylor wrote:
> >>
> >> On Wed, Jun 21, 2017 at 7:48 PM, lucas.w...@gmail.com 
> >>  wrote: 
> >> > 
> >> > Since go1.8 added support for mips32, why can't build a simple hello 
> >> world 
> >> > for a mips architecture system? 
> >> > 
> >> > I successfully build programs for arm architecture, but could not do 
> >> the 
> >> > same for mips. 
> >>
> >> Tell us precisely what you did and precisely what happened. 
> >>
> >> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] go build for mips

2017-06-22 Thread Nathan Kerr
What system are you building on (OS and architecture)?

What version of Go are you using?

Is the result of running go build an illegal instruction?

What file did you provide information for?

What is in hello.go?

On Thursday, June 22, 2017 at 6:19:47 PM UTC+2, luc...@kryptus.com wrote:
>
> I try to build a simple hello world with
> cgo_enabled=1 goarch=mips goos=linux go build hello.go| Result: 
> illegal instruction 
>
> file information: ELF 32-bit MSB executable, MIPS, MIPS32 version 1 
> (SYSV), statically linked, not stripped
>
> Also, tried to build with another compile (CC=/path/to/Compiler) instead 
> the one go uses. Also illegal instruction 
> on my router tp-linkwdr3500.
>
> If anyone could give me a hint, I would be grateful.
>
> Thanks,
> Lucas.
>
>
> On Thursday, June 22, 2017 at 11:37:08 AM UTC-3, Ian Lance Taylor wrote:
>>
>> On Wed, Jun 21, 2017 at 7:48 PM, lucas.w...@gmail.com 
>>  wrote: 
>> > 
>> > Since go1.8 added support for mips32, why can't build a simple hello 
>> world 
>> > for a mips architecture system? 
>> > 
>> > I successfully build programs for arm architecture, but could not do 
>> the 
>> > same for mips. 
>>
>> Tell us precisely what you did and precisely what happened. 
>>
>> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] go build for mips

2017-06-22 Thread lucasw
I try to build a simple hello world with
cgo_enabled=1 goarch=mips goos=linux go build hello.go| Result: illegal 
instruction 

file information: ELF 32-bit MSB executable, MIPS, MIPS32 version 1 (SYSV), 
statically linked, not stripped

Also, tried to build with another compile (CC=/path/to/Compiler) instead 
the one go uses. Also illegal instruction 
on my router tp-linkwdr3500.

If anyone could give me a hint, I would be grateful.

Thanks,
Lucas.


On Thursday, June 22, 2017 at 11:37:08 AM UTC-3, Ian Lance Taylor wrote:
>
> On Wed, Jun 21, 2017 at 7:48 PM, lucas.w...@gmail.com  
>  wrote: 
> > 
> > Since go1.8 added support for mips32, why can't build a simple hello 
> world 
> > for a mips architecture system? 
> > 
> > I successfully build programs for arm architecture, but could not do the 
> > same for mips. 
>
> Tell us precisely what you did and precisely what happened. 
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go get function improvements

2017-06-22 Thread Jan Mercl
Copy paste error eated

jnml@mate1610-32:~$ go get -v github.com/kniren/gota/...

-- 

-j

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go get function improvements

2017-06-22 Thread Jan Mercl
On Thu, Jun 22, 2017 at 4:44 PM Vickey Rawat  wrote:

> GITHUB/GOTA

> Now when i use go get github/gota

github/gota does not look like a valid import path.

If you mean this:

jnml@mate1610-32:~$ echo $GOPATH
/home/jnml
jnml@mate1610-32:~$ rm -rf $GOPATH/src $GOPATH/pkg
jnml@mate1610-32:~$ go get -v github.com/kniren/gota
github.com/kniren/gota (download)
package github.com/kniren/gota: no buildable Go source files in
/home/jnml/src/github.com/kniren/gota
jnml@mate1610-32:~$

then the problem is that the import path does not refer to any package so
there are no transitive dependencies to download.

Try this:

github.com/gonum/matrix (download)
github.com/gonum/blas (download)
github.com/gonum/internal (download)
github.com/gonum/floats (download)
github.com/gonum/lapack (download)
github.com/gonum/blas
github.com/gonum/blas/native/internal/math32
github.com/gonum/internal/asm/f32
github.com/gonum/internal/asm/f64
github.com/kniren/gota/series
github.com/gonum/floats
github.com/gonum/blas/native
github.com/gonum/lapack
github.com/gonum/matrix
github.com/gonum/blas/blas64
github.com/gonum/lapack/native
github.com/gonum/lapack/lapack64
github.com/gonum/matrix/mat64
github.com/kniren/gota/dataframe
jnml@mate1610-32:~$


-- 

-j

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go get function improvements

2017-06-22 Thread Vickey Rawat
A very simple example is i downloaded a package from github say

GITHUB/GOTA

Now when i use go get github/gota

It installs the package in my src directory

But it doesn't download

Github/gonum

And github/gonum/plots

Too

On which gota package is depended...


That's what i expect it to do too...

On 22-Jun-2017 8:10 pm, "Ian Lance Taylor"  wrote:

On Wed, Jun 21, 2017 at 6:39 PM,   wrote:
>
> Go get function should import packages exponentially.
>
> Like the dependency of the package and the dependency of the dependent
package should all be downloaded at once when we download the package.
>
> It should check if the package exist if not download all of the stuff.
Its vry common in languages like R and python. Golang should have it too.
Because it then becomes hard to keep track of packages required.

If I understand you correctly, that is how it works today.  So I
probably do not understand what you mean.  Can you give an example
showing what you do, what you expect to happen, and what happens
instead?  Thanks.

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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go get function improvements

2017-06-22 Thread Ian Lance Taylor
On Wed, Jun 21, 2017 at 6:39 PM,   wrote:
>
> Go get function should import packages exponentially.
>
> Like the dependency of the package and the dependency of the dependent 
> package should all be downloaded at once when we download the package.
>
> It should check if the package exist if not download all of the stuff. Its 
> vry common in languages like R and python. Golang should have it too. Because 
> it then becomes hard to keep track of packages required.

If I understand you correctly, that is how it works today.  So I
probably do not understand what you mean.  Can you give an example
showing what you do, what you expect to happen, and what happens
instead?  Thanks.

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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Goroutine error when running on load test.

2017-06-22 Thread Ian Lance Taylor
On Wed, Jun 21, 2017 at 10:49 PM,   wrote:
>
> I am getting the following error when my services are being load tested.
> I am new to goroutines and may be missing something in my implementation.
> My service on being hit is running 2 goroutines that call an http request.
> After both return , the response from both http requests is returned into a
> channel.
> What could be the possible reason of the following stack trace of error??

What caused the stack trace?  I would have expected to see something
at the start saying why it was generated, but I didn't.

At first glance it looks like you have a deadlock somewhere.  Is there
something reading from the channels?

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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] go build for mips

2017-06-22 Thread Ian Lance Taylor
On Wed, Jun 21, 2017 at 7:48 PM, lucas.wiechm...@gmail.com
 wrote:
>
> Since go1.8 added support for mips32, why can't build a simple hello world
> for a mips architecture system?
>
> I successfully build programs for arm architecture, but could not do the
> same for mips.

Tell us precisely what you did and precisely what happened.

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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Go get function improvements

2017-06-22 Thread vickey . coool
Go get function should import packages exponentially.

Like the dependency of the package and the dependency of the dependent package 
should all be downloaded at once when we download the package.

It should check if the package exist if not download all of the stuff. Its vry 
common in languages like R and python. Golang should have it too. Because it 
then becomes hard to keep track of packages required.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Goroutine error when running on load test.

2017-06-22 Thread nupur . bansal
I am getting the following error when my services are being load tested.
I am new to goroutines and may be missing something in my implementation.
My service on being hit is running 2 goroutines that call an http request. 
After both return , the response from both http requests is returned into a 
channel.
What could be the possible reason of the following stack trace of error??


goroutine 64597 [IO wait, 4 minutes]:
net.runtime_pollWait(0x7fb982a005c0, 0x72, 0xeab)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/runtime/netpoll.go:164
 
+0x59
net.(*pollDesc).wait(0xc430c4fa38, 0x72, 0xffbaa0, 0xff67e0)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/fd_poll_runtime.go:75
 
+0x38
net.(*pollDesc).waitRead(0xc430c4fa38, 0xc426a1af51, 0x1)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/fd_poll_runtime.go:80
 
+0x34
net.(*netFD).Read(0xc430c4f9d0, 0xc426a1af51, 0x1, 0x1, 0x0, 0xffbaa0, 
0xff67e0)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/fd_unix.go:250
 
+0x1b7
net.(*conn).Read(0xc42fd64840, 0xc426a1af51, 0x1, 0x1, 0x0, 0x0, 0x0)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/net.go:181
 
+0x70
net/http.(*connReader).backgroundRead(0xc426a1af40)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/http/server.go:656
 
+0x58
created by net/http.(*connReader).startBackgroundRead
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/http/server.go:652
 
+0xdf

goroutine 64554 [chan send, 4 minutes]:
wservce/models.getEnquiryDetails(0xc42c475680, 0xc42c4756e0, 0xc42f720a7a, 
0x6, 0x1003ee0, 0xc4312c0400)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/wservce/models/userDashboard.go:474
 
+0x77c
created by wservce/models.findSupplierOrBuyer
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/wservce/models/userDashboard.go:91
 
+0x244

goroutine 36920 [chan receive]:
wservce/models.buyerDetails(0xc421db1e2a, 0x6, 0xc421db1e1f, 0x2, 
0xc42033fe10, 0x10, 0xc42033ff30, 0xf, 0x1003ee0, 0xc426142400, ...)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/wservce/models/userDashboard.go:214
 
+0x34a
wservce/models.(*UserDashboard).GetDashboardDetails(0xc42885fce0, 
0x1003ee0, 0xc426142400, 0xc42033ff30, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/wservce/models/userDashboard.go:69
 
+0x322
wservce/controllers.Request.Dashboard(0x1003ee0, 0xc426142400, 
0xc425a6f980, 0x14, 0xc4204c1305, 0x11, 0xc4204c1300, 0x4, 0xc42033ff30, 
0xf, ...)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/wservce/controllers/users.go:144
 
+0xe41
wservce/controllers.(*Request).Dashboard(0xc4294d1260, 0x0, 0x0)
:6 +0x69
reflect.Value.call(0xabac40, 0xc4294d1260, 0xa93, 0xadc9f5, 0x4, 
0xc425e71828, 0x0, 0x0, 0xc425f1b960, 0x13, ...)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/reflect/value.go:434
 
+0x91f
reflect.Value.Call(0xabac40, 0xc4294d1260, 0xa93, 0xc425e71828, 0x0, 0x0, 
0xc4294d1260, 0xa93, 0xf)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/reflect/value.go:302
 
+0xa4
main.callController(0x1003ee0, 0xc426142400, 0xc425a6f980, 0x14, 
0xc4204c1305, 0x11, 0xc4204c1300, 0x4, 0xc42033ff30, 0xf, ...)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/wservce/launch.go:86
 
+0x15b
main.handler(0x7fb990b955e0, 0xc426142400, 0xc428af7700)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/wservce/launch.go:68
 
+0x28c
net/http.HandlerFunc.ServeHTTP(0xb0b940, 0x7fb990b955e0, 0xc426142400, 
0xc428af7700)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/http/server.go:1942
 
+0x44
github.com/newrelic/go-agent.WrapHandle.func1(0x1000420 
, 
0xc42a05d420, 0xc428af7700)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/
github.com/newrelic/go-agent/instrumentation.go:30 +0x112
net/http.HandlerFunc.ServeHTTP(0xc420157c80, 0x1000420, 0xc42a05d420, 
0xc428af7700)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/http/server.go:1942
 
+0x44
github.com/newrelic/go-agent.WrapHandleFunc.func1(0x1000420 
, 
0xc42a05d420, 0xc428af7700)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/src/
github.com/newrelic/go-agent/instrumentation.go:38 +0x4d
net/http.HandlerFunc.ServeHTTP(0xc42017f9e0, 0x1000420, 0xc42a05d420, 
0xc428af7700)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/http/server.go:1942
 
+0x44
net/http.(*ServeMux).ServeHTTP(0x10274a0, 0x1000420, 0xc42a05d420, 
0xc428af7700)
/home3/indiamart/public_html/dev-mapi-indiamart-com/go-api/src/go/src/net/http/server.go:2238
 
+0x130
net/http.serverHandler.ServeHTTP(0xc42008edc0, 0x1000420, 

[go-nuts] go build for mips

2017-06-22 Thread lucas.wiechm...@gmail.com
Since go1.8 added support for mips32, why can't build a simple hello world 
for a mips architecture system?

I successfully build programs for arm architecture, but could not do the 
same for mips.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] golang call c++ api by swig

2017-06-22 Thread Lee Rick
hi,guys
   I wanna wrap opencv2.4.x library to my project by swig, how to do 
it? 
   anyone can give me a demo ?
  hope to reply.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] how can i build a golang system library of debug version

2017-06-22 Thread Dave Cheney
go {build,install} -gcflags="-l -N" $PKG

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] how can i build a golang system library of debug version

2017-06-22 Thread Wen Hailong
but default system library do optimization, sometime I can not check local 
variable

On Friday, February 17, 2017 at 1:40:27 AM UTC+8, Ian Lance Taylor wrote:
>
> On Wed, Feb 15, 2017 at 11:29 PM, Wen Hailong <723...@gmail.com 
> > wrote: 
> > i want to debug golang system library. can step code one by one 
>
> Go programs are built with debugging info by default.  You need to 
> take special action to avoid the debugging info. 
>
> But note https://golang.org/doc/gdb .  You may also want to try 
> https://github.com/derekparker/delve . 
>
> 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.
For more options, visit https://groups.google.com/d/optout.