Re: [go-nuts] swig example on go tip

364 views
Skip to first unread message

Ian Lance Taylor

unread,
Mar 11, 2013, 2:21:49 PM3/11/13
to kristian, golan...@googlegroups.com
On 3/10/13, kristian <mey...@gmail.com> wrote:
> Hi, I am trying out the swig tutorial example using the swig and go (tip)
> versions below:

I'm not sure, but the recent cgo work may have broken the SWIG support.

Ian

kristian

unread,
Mar 12, 2013, 8:27:32 AM3/12/13
to golang-nuts


On Mar 12, 4:21 am, Ian Lance Taylor <i...@google.com> wrote:
> On 3/10/13, kristian <meye...@gmail.com> wrote:
>
> > Hi, I am trying out the swig tutorial example using the swig and go (tip)
> > versions below:
>
> I'm not sure, but the recent cgo work may have broken the SWIG support.
>
> Ian

I have tried that example with go reverted to the version of the
repository that fixes the "swig -intgosize" problem (thread link
below), revision 3d1a771ddcc5 from 1st of March, but the same error
occurred. That commit is supposed to fix a swig problem so I expect
SWIG wasn't broken at that time, so perhaps there is something I am
missing? I tried a revision from earlier on the 1st of march and got
that "SWIG -go: -intgosize option required but not specified", so I
think I'm changing the revisions of go correctly.

http://groups.google.com/group/golang-nuts/browse_thread/thread/53ed4887ef9320a7

Thanks

Ian Lance Taylor

unread,
Mar 12, 2013, 9:00:02 PM3/12/13
to kristian, golang-nuts
You're right. It looks like a bug in the go command's support for
SWIG. It doesn't compile any .c files in the directory. It probably
should.

Something like https://codereview.appspot.com/7506044 is probably a
start, but it doesn't seem to be enough to fix your test case.

Please open an issue for this. Thanks.

Ian

Carlos Castillo

unread,
Mar 12, 2013, 10:01:09 PM3/12/13
to golan...@googlegroups.com, kristian
Otherwise, you could add an import "C" declaration in an existing, or new *.go file to force the go tool to treat it as a cgo package.

Carlos Castillo

unread,
Mar 12, 2013, 10:01:42 PM3/12/13
to golan...@googlegroups.com, kristian
While you wait, I mean.

kristian

unread,
Mar 13, 2013, 5:25:09 AM3/13/13
to golang-nuts


On Mar 13, 11:00 am, Ian Lance Taylor <i...@google.com> wrote:
> On 3/12/13, kristian <meye...@gmail.com> wrote:
>
> > On Mar 12, 4:21 am, Ian Lance Taylor <i...@google.com> wrote:
> >> On 3/10/13, kristian <meye...@gmail.com> wrote:
>
> >> > Hi, I am trying out the swig tutorial example using the swig and go
> >> > (tip)
> >> > versions below:
>
> >> I'm not sure, but the recent cgo work may have broken the SWIG support.
>
> >> Ian
>
> > I have tried that example with go reverted to the version of the
> > repository that fixes the "swig -intgosize" problem (thread link
> > below), revision 3d1a771ddcc5 from 1st of March, but the same error
> > occurred. That commit is supposed to fix a swig problem so I expect
> > SWIG wasn't broken at that time, so perhaps there is something I am
> > missing?  I tried a revision from earlier on the 1st of march and got
> > that "SWIG -go: -intgosize option required but not specified", so I
> > think I'm changing the revisions of go correctly.
>
> >http://groups.google.com/group/golang-nuts/browse_thread/thread/53ed4...
>
> You're right.  It looks like a bug in the go command's support for
> SWIG.  It doesn't compile any .c files in the directory.  It probably
> should.
>
> Something likehttps://codereview.appspot.com/7506044is probably a
> start, but it doesn't seem to be enough to fix your test case.
>
> Please open an issue for this.  Thanks.
>
> Ian

I have opened http://code.google.com/p/go/issues/detail?id=5041

Thanks
Reply all
Reply to author
Forward
0 new messages