undefined: C in C.PCAP_NETMASK_UNKNOWN

99 visualizações
Pular para a primeira mensagem não lida

Mehrdad Arshad Rad

não lida,
21 de out. de 2016, 00:36:3021/10/2016
para golang-nuts
Hi,

Today I noticed the travis-ci fails once it tries to build myLG w/ latest Go version:devel +7ea5829 and shows below errors.

The command "eval go get -t -v ./..." failed. 

github.com/google/gopacket/pcap../../google/gopacket/pcap/pcap.go:594: undefined: C in C.PCAP_NETMASK_UNKNOWN 

any idea?

Thanks,
Mehrdad

Konstantin Khomoutov

não lida,
21 de out. de 2016, 08:02:3321/10/2016
para Mehrdad Arshad Rad, golang-nuts
On Thu, 20 Oct 2016 21:35:06 -0700 (PDT)
Mehrdad Arshad Rad <arsha...@gmail.com> wrote:

> Today I noticed the travis-ci fails once it tries to build myLG
> <https://github.com/mehrdadrad/mylg> w/ latest Go version:devel
> +7ea5829 and shows below errors.
>
> The command "eval go get -t -v ./..." failed.
>
> github.com/google/gopacket/pcap../../google/gopacket/pcap/pcap.go:594
> <http://github.com/google/gopacket/google/gopacket/pcap/pcap.go:594>:
> undefined: C in C.PCAP_NETMASK_UNKNOWN
>
> any idea?

(The correct URL is [1].)

The undefined symbols should be defined by cgo as it's in the "C"
"namespace" used by cgo (see line 93 in that file and the information
on how cgo works in general). Hence I would expect this symbol to be
defined through some header file of the libpcap library.
So I'd start digging from there.

Note that you can tell `go build` to leave its intermediate files
behind by running `go build -work` and then inspecting what was
generated by cgo there. That is, grep the generated stuff for
PCAP_NETMASK_UNKNOWN.

Well, in theory, it's possible that some weird cgo-related bug crept
into the cgo subsystem but I'd start from the other end.

1. https://github.com/google/gopacket/blob/master/pcap/pcap.go#L594

sergo...@gmail.com

não lida,
21 de out. de 2016, 09:00:0621/10/2016
para golang-nuts
+1, I have same error but with glfw, not gopacket. 
Have you found any solution yet?

Pietro Gagliardi

não lida,
21 de out. de 2016, 09:58:2521/10/2016
para sergo...@gmail.com, golang-nuts
Regression by Go commit a16954b8a7d66169760fb60dd7f3d4e400a5e98c. Not sure what a simpler reproduction is, but I have an idea...
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pietro Gagliardi

não lida,
21 de out. de 2016, 10:07:5921/10/2016
para golang-nuts

(Once again I hit Reply instead of Reply-All. Is there a way to make OS X Mail not be dumb about mailing lists?)
Begin forwarded message:

From: Pietro Gagliardi <and...@lostsig.net>
Subject: Re: [go-nuts] Re: undefined: C in C.PCAP_NETMASK_UNKNOWN
Date: October 21, 2016 at 10:06:55 AM EDT
To: Ian Lance Taylor <ia...@golang.org>

Just


will suffice.
On Oct 21, 2016, at 10:03 AM, Ian Lance Taylor <ia...@golang.org> wrote:

On Fri, Oct 21, 2016 at 6:57 AM, Pietro Gagliardi <and...@lostsig.net> wrote:
Regression by Go commit a16954b8a7d66169760fb60dd7f3d4e400a5e98c. Not sure
what a simpler reproduction is, but I have an idea...

Can you tell me how to reproduce the problem?  I don't need a simple
way to reproduce it, any reliable way to reproduce it starting from
scratch will do.  For example, is there a `go get` command I can run
to see the problem?

Ian

Ian Lance Taylor

não lida,
21 de out. de 2016, 10:12:2721/10/2016
para Pietro Gagliardi, sergo...@gmail.com, golang-nuts
On Fri, Oct 21, 2016 at 6:57 AM, Pietro Gagliardi <and...@lostsig.net> wrote:
> Regression by Go commit a16954b8a7d66169760fb60dd7f3d4e400a5e98c. Not sure
> what a simpler reproduction is, but I have an idea...

Can you tell me how to reproduce the problem? I don't need a simple
way to reproduce it, any reliable way to reproduce it starting from
scratch will do. For example, is there a `go get` command I can run
to see the problem?

Ian


Ian Lance Taylor

não lida,
21 de out. de 2016, 10:57:3421/10/2016
para Pietro Gagliardi, golang-nuts
On Fri, Oct 21, 2016 at 7:07 AM, Pietro Gagliardi <and...@lostsig.net> wrote:
>
> Just
>
> go get -u -v github.com/google/gopacket/pcap
>
> will suffice.

Thanks.

https://golang.org/cl/31672

Ian

Pietro Gagliardi

não lida,
21 de out. de 2016, 11:09:1521/10/2016
para Ian Lance Taylor, golang-nuts
So the trigger was that there is both a pointer and a C.xxx name in the same argument list?

Ian Lance Taylor

não lida,
21 de out. de 2016, 13:41:1221/10/2016
para Pietro Gagliardi, golang-nuts
On Fri, Oct 21, 2016 at 10:40 AM, Ian Lance Taylor <ia...@golang.org> wrote:
> On Fri, Oct 21, 2016 at 8:08 AM, Pietro Gagliardi <and...@lostsig.net> wrote:
>> So the trigger was that there is both a pointer and a C.xxx name in the same argument list?
>
> Yes.

Well, not just any pointer, but a pointer to a type that itself
contains a pointer.

Ian

Ian Lance Taylor

não lida,
21 de out. de 2016, 13:41:3321/10/2016
para Pietro Gagliardi, golang-nuts
On Fri, Oct 21, 2016 at 8:08 AM, Pietro Gagliardi <and...@lostsig.net> wrote:
> So the trigger was that there is both a pointer and a C.xxx name in the same argument list?

Yes.

Ian

Mehrdad Arshad Rad

não lida,
21 de out. de 2016, 17:34:5421/10/2016
para golang-nuts, and...@lostsig.net
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem