William S Fulton
2016-05-28 13:44:08 UTC
an
examples and test-suite use -cgo now. The examples and test-suite
don't work with -cgo though for Go 1.1.2 with numerous linker errors,
such as:
~/swig/github/swig/Examples/go/class> make -s clean check
# example
/tmp/go-build090199946/example/_obj/example.cgo2.o: In function
`_cgo_1eccd28dce62_Cfunc__wrap_Circle_area_example_ce26c1f9f9997e3a':
./example.go:91: undefined reference to
`_wrap_Circle_area_example_ce26c1f9f9997e3a'
Is this easily fixed for Go 1.1 using the 'go build' approach used in
the go_cpp Examples/Makefile target? If not, it feels like we need to
modify configure to only test/support Go 1.2 and later. Or configure
should detect Go 1.1 and then test without -cgo.
I'd like to fix this for the pending 3.0.9 release, so please let me
know your thoughts asap.
Thanks
From the SWIG docs http://swig.org/Doc3.0/Go.html#Go_running_swig, it
appears -cgo requires Go 1.5 and later, so I presume this is why theexamples and test-suite use -cgo now. The examples and test-suite
don't work with -cgo though for Go 1.1.2 with numerous linker errors,
such as:
~/swig/github/swig/Examples/go/class> make -s clean check
# example
/tmp/go-build090199946/example/_obj/example.cgo2.o: In function
`_cgo_1eccd28dce62_Cfunc__wrap_Circle_area_example_ce26c1f9f9997e3a':
./example.go:91: undefined reference to
`_wrap_Circle_area_example_ce26c1f9f9997e3a'
Is this easily fixed for Go 1.1 using the 'go build' approach used in
the go_cpp Examples/Makefile target? If not, it feels like we need to
modify configure to only test/support Go 1.2 and later. Or configure
should detect Go 1.1 and then test without -cgo.
I'd like to fix this for the pending 3.0.9 release, so please let me
know your thoughts asap.
Thanks