You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.
I did a "go get" of the project but this failed to compile for all the reasons that are documented in the README.md. So having got the Git clone, I did the simple make install and that worked fine (albeit with a number of warnings): go-python.a appears in the appropriate place. However using:
I haven't tested building go-python with gccgo in a long time (obviously)
but it seems something's broken with gccgo.
with the following little project, I could reproduce your issue:
$ cd /tmp/go-tmp
$ export GOPATH=`pwd`
$ mkdir -p src/foo
$ cd src/foo
$ cat > foo.go <<EOFpackage fooimport "fmt"func Foo() { fmt.Printf("hello foo\n")}EOF
$ mkdir bar &&cd bar
$ cat > bar.go <<EOFpackage mainimport "foo"func main() { foo.Foo()}EOF
$ go get -compiler=gccgo -v .
foo
foo/bar
# foo/bar
./bar.go:3:11: error: import file ‘foo’ not found
import "foo"
^
./bar.go:6:2: error: reference to undefined name ‘foo’
foo.Foo()
^
zsh: exit 2 go get -compiler=gccgo -v .
do you have the same gccgo version than I do ?
$ gccgo --version
gccgo (GCC) 4.8.1 20130725 (prerelease)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the sourcefor copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
wrt Python-3: I don't plan to migrate just yet as my workplace has yet to move away from py-2... but I'd be happy to open a python-3 branch and pull requests there :}
|> gccgo --version
gccgo (Debian 4.8.1-8) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
wrt Python version, I would have thought your work would be champing at the bit to get to Python 3.3. What is the reason for staying with Python 2.7? I may well try and take a fork and feature branch for the C Python 3.3 API. I guess there is also PyPy to think about.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I did a "go get" of the project but this failed to compile for all the reasons that are documented in the README.md. So having got the Git clone, I did the simple make install and that worked fine (albeit with a number of warnings): go-python.a appears in the appropriate place. However using:
I get the
(cd cmd/go-python && CGO_LDFLAGS="-L/usr/lib/python2.7 -lpython2.7" CGO_CFLAGS="-I/usr/include/python2.7 -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security " go install -compiler=gccgo .)
github.com/sbinet/go-python/cmd/go-python
./main.go:5:29: error: import file ‘github.com/sbinet/go-python’ not found
"github.com/sbinet/go-python"
^
./main.go:10:9: error: reference to undefined name ‘python’
err := python.Initialize()
^
./main.go:17:8: error: reference to undefined name ‘python’
rc := python.Py_Main(os.Args)
^
make: *** [install] Error 2
Almost certainly user error, but…
Thanks.
PS any move to Python 3 planned, Python 2 is so last millenium ;-)
The text was updated successfully, but these errors were encountered: