Giter Site home page Giter Site logo

cpy3's Introduction

go-python

Build Status

Naive go bindings towards the C-API of CPython-2.

this package provides a go package named "python" under which most of the PyXYZ functions and macros of the public C-API of CPython have been exposed.

theoretically, you should be able to just look at:

http://docs.python.org/c-api/index.html

and know what to type in your go program.

this package also provides an executable "go-python" which just loads "python" and then call python.Py_Main(os.Args). the rational being that under such an executable, go based extensions for C-Python would be easier to implement (as this usually means calling into go from C through some rather convoluted functions hops)

Install

With Go 1 and the go tool, cgo packages can't pass anymore additional CGO_CFLAGS from external programs (except pkg-config) to the "fake" #cgo preprocessor directive.

go-python now uses pkg-config to get the correct location of headers and libraries. Unfortunately, the naming convention for the pkg-config package is not standardised across distributions and OSes, so you may have to edit the cgoflags.go file accordingly.

 $ go get github.com/sbinet/go-python

If go get + pkg-config failed:

 $ cd go-python
 $ edit cgoflags.go
 $ make VERBOSE=1

Note: you'll need the proper header and python development environment. On Debian, you'll need to install the python-all-dev package

Documentation

Is available on godoc:

http://godoc.org/github.com/sbinet/go-python

Example:

package main

import "fmt"
import "github.com/sbinet/go-python"

func init() {
   err := python.Initialize()
   if err != nil {
          panic(err.Error())
   } 
}

func main() {
 	 gostr := "foo" 
	 pystr := python.PyString_FromString(gostr)
	 str := python.PyString_AsString(pystr)
	 fmt.Println("hello [", str, "]")
}
$ go run ./main.go
hello [ foo ]

TODO:

  • fix handling of integers (I did a poor job at making sure everything was ok)

  • add CPython unit-tests

  • do not expose C.FILE pointer and replace it with os.File in "go-python" API

  • provide an easy way to extend go-python with go based extensions

  • think about the need (or not) to translate CPython exceptions into go panic/recover mechanism

  • use SWIG to automatically wrap the whole CPython api ?

cpy3's People

Contributors

abemedia avatar christian-korneck avatar hush-hush avatar ivoanjo avatar m-quadra avatar olivielpeau avatar remicalixte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpy3's Issues

Pass arguments to a python script

Currently PyRun_AnyFile method is taking filename as the only argument. In case the someone wants to pass arguments to the script , can you put some thoughts how to achieve this

installation problem

Describe what happened:
When trying to install the package by: go get github.com/go-python/cpy3
It failed and complain like this:
../../../../go/pkg/mod/github.com/go-python/[email protected]/thread.go:53:2: could not determine kind of name for C.PyEval_ReInitThreads

Describe what you expected:
I am expected to install it locally just simple like other packages.

Steps to reproduce the issue:
Only one step by run command line: go get github.com/go-python/cpy3

Memory Leaks while running Concurrent Go Routines with a Python File.

Describe what happened:
Hi Team,

I ran a simple go program, with a python file which only contains a simple hello world program, when I run the program without go routines, there are no memory leaks, but when I use go routines I see random spikes in memory, I will add the logs which I use to track the memory below.

Describe what you expected:
Logs without GoRoutine:
First Run
Second Run
Third Run
The above logs are produced by the same program, and the memory is consistent across all of them.

Logs with GoRoutine
First Run
Second Run
Third Run

The above logs are produced by the same program, for some reason the memory leak is random.

Steps to reproduce the issue:
Go ENV:

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/u1/shijaisw/.cache/go-build"
GOENV="/u1/shijaisw/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/u1/shijaisw/go/pkg/mod"
GOPATH="/u1/shijaisw/go"
GOROOT="/u1/tags/dev/devtools/golang/1.16.15"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/u1/tags/dev/devtools/golang/1.16.15/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.15"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/u1/shijaisw/DQE/memolk/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1853794904=/tmp/go-build -gno-record-gcc-switches"

Python and Go Code that is Used to reproduce the memory leak

Put all the files in the same directory for simplicity

main.go
foo.py
bar.py

Commands used

  1. go mod tidy

If this doesnot get you the packages then
go get <github_repo>@master
example: go get github.com/go-python/cpy3@master

  1. go build
  2. Run the binary and see the logs

Please let me know why is such random memory leak happening at the first place, and how can that be resolved.

Convert go struct to dict

It would be great to have a helper function that converts a go struct or map to a Python dict.

As a matter of fact it would also be really useful to be able to convert other types, for example a function like ToPyObject which takes an interface and using reflection builds the relevant Python type.

A FromPyObject doing the reverse would be ideal too.

This would massively simplify interaction between Python and Go.

fedora and python 3.11.1: cannot compile

Describe what happened:

Hi!
I'm unable to run example code because of a few things:

  • build errors caused by deprecated python API
  • strange linker/CGO panic (after commenting out deprecated functions)
linker panic# github.com/go-python/cpy3 cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_PySys_SetArgv’: cgo-gcc-prolog:63:2: warning: ‘PySys_SetArgv’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/python3.11/Python.h:96, from ../../lifecycle.go:11: /usr/include/python3.11/sysmodule.h:13:38: note: declared here 13 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **); | ^~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_PySys_SetArgvEx’: cgo-gcc-prolog:79:2: warning: ‘PySys_SetArgvEx’ is deprecated [-Wdeprecated-declarations] /usr/include/python3.11/sysmodule.h:14:38: note: declared here 14 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int); | ^~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_Py_SetPath’: cgo-gcc-prolog:370:2: warning: ‘Py_SetPath’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/python3.11/Python.h:94: /usr/include/python3.11/pylifecycle.h:48:38: note: declared here 48 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPath(const wchar_t *); | ^~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_Py_SetProgramName’: cgo-gcc-prolog:382:2: warning: ‘Py_SetProgramName’ is deprecated [-Wdeprecated-declarations] /usr/include/python3.11/pylifecycle.h:37:38: note: declared here 37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); | ^~~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_Py_SetPythonHome’: cgo-gcc-prolog:394:2: warning: ‘Py_SetPythonHome’ is deprecated [-Wdeprecated-declarations] /usr/include/python3.11/pylifecycle.h:40:38: note: declared here 40 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *); | ^~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_Py_SetStandardStreamEncoding’: cgo-gcc-prolog:411:2: warning: ‘Py_SetStandardStreamEncoding’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/python3.11/pylifecycle.h:71: /usr/include/python3.11/cpython/pylifecycle.h:12:37: note: declared here 12 | Py_DEPRECATED(3.11) PyAPI_FUNC(int) Py_SetStandardStreamEncoding( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ # github.com/go-python/cpy3 cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_PySys_AddWarnOption’: cgo-gcc-prolog:49:2: warning: ‘PySys_AddWarnOption’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/python3.11/Python.h:96, from ../../sys.go:11: /usr/include/python3.11/sysmodule.h:25:38: note: declared here 25 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddWarnOption(const wchar_t *); | ^~~~~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_PySys_AddXOption’: cgo-gcc-prolog:61:2: warning: ‘PySys_AddXOption’ is deprecated [-Wdeprecated-declarations] /usr/include/python3.11/sysmodule.h:29:38: note: declared here 29 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddXOption(const wchar_t *); | ^~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_PySys_SetPath’: cgo-gcc-prolog:140:2: warning: ‘PySys_SetPath’ is deprecated [-Wdeprecated-declarations] /usr/include/python3.11/sysmodule.h:15:38: note: declared here 15 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); | ^~~~~~~~~~~~~ # github.com/go-python/cpy3 cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_PyEval_InitThreads’: cgo-gcc-prolog:49:2: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/python3.11/Python.h:95, from ../../thread.go:11: /usr/include/python3.11/ceval.h:132:37: note: declared here 132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void); | ^~~~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_a23b65008ead_Cfunc_PyEval_ThreadsInitialized’: cgo-gcc-prolog:93:2: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations] /usr/include/python3.11/ceval.h:131:36: note: declared here 131 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ # github.com/go-python/cpy3/examples/python3 /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x40): undefined reference to `PyBool_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x48): undefined reference to `PyByteArray_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x50): undefined reference to `PyBytes_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x58): undefined reference to `PyComplex_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x60): undefined reference to `PyDict_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x68): undefined reference to `PyExc_ArithmeticError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x70): undefined reference to `PyExc_AssertionError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x78): undefined reference to `PyExc_AttributeError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x80): undefined reference to `PyExc_BaseException' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x88): undefined reference to `PyExc_BlockingIOError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x90): undefined reference to `PyExc_BrokenPipeError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x98): undefined reference to `PyExc_BufferError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xa0): undefined reference to `PyExc_BytesWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xa8): undefined reference to `PyExc_ChildProcessError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xb0): undefined reference to `PyExc_ConnectionAbortedError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xb8): undefined reference to `PyExc_ConnectionError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xc0): undefined reference to `PyExc_ConnectionRefusedError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xc8): undefined reference to `PyExc_ConnectionResetError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xd0): undefined reference to `PyExc_DeprecationWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xd8): undefined reference to `PyExc_EOFError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xe0): undefined reference to `PyExc_Exception' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xe8): undefined reference to `PyExc_FileExistsError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xf0): undefined reference to `PyExc_FileNotFoundError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0xf8): undefined reference to `PyExc_FloatingPointError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x100): undefined reference to `PyExc_FutureWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x108): undefined reference to `PyExc_GeneratorExit' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x110): undefined reference to `PyExc_ImportError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x118): undefined reference to `PyExc_ImportWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x120): undefined reference to `PyExc_IndentationError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x128): undefined reference to `PyExc_IndexError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x130): undefined reference to `PyExc_InterruptedError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x138): undefined reference to `PyExc_IsADirectoryError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x140): undefined reference to `PyExc_KeyError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x148): undefined reference to `PyExc_KeyboardInterrupt' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x150): undefined reference to `PyExc_LookupError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x158): undefined reference to `PyExc_MemoryError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x160): undefined reference to `PyExc_ModuleNotFoundError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x168): undefined reference to `PyExc_NameError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x170): undefined reference to `PyExc_NotADirectoryError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x178): undefined reference to `PyExc_NotImplementedError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x180): undefined reference to `PyExc_OSError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x188): undefined reference to `PyExc_OverflowError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x190): undefined reference to `PyExc_PendingDeprecationWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x198): undefined reference to `PyExc_PermissionError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1a0): undefined reference to `PyExc_ProcessLookupError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1a8): undefined reference to `PyExc_RecursionError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1b0): undefined reference to `PyExc_ReferenceError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1b8): undefined reference to `PyExc_ResourceWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1c0): undefined reference to `PyExc_RuntimeError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1c8): undefined reference to `PyExc_RuntimeWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1d0): undefined reference to `PyExc_StopAsyncIteration' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1d8): undefined reference to `PyExc_StopIteration' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1e0): undefined reference to `PyExc_SyntaxError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1e8): undefined reference to `PyExc_SyntaxWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1f0): undefined reference to `PyExc_SystemError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x1f8): undefined reference to `PyExc_SystemExit' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x200): undefined reference to `PyExc_TabError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x208): undefined reference to `PyExc_TimeoutError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x210): undefined reference to `PyExc_TypeError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x218): undefined reference to `PyExc_UnboundLocalError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x220): undefined reference to `PyExc_UnicodeDecodeError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x228): undefined reference to `PyExc_UnicodeEncodeError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x230): undefined reference to `PyExc_UnicodeError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x238): undefined reference to `PyExc_UnicodeTranslateError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x240): undefined reference to `PyExc_UnicodeWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x248): undefined reference to `PyExc_UserWarning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x250): undefined reference to `PyExc_ValueError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x258): undefined reference to `PyExc_Warning' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x260): undefined reference to `PyExc_ZeroDivisionError' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x268): undefined reference to `PyFloat_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x270): undefined reference to `PyList_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x278): undefined reference to `PyLong_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x280): undefined reference to `PyModule_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x288): undefined reference to `PyTuple_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x290): undefined reference to `PyType_Type' /usr/bin/ld: /tmp/go-link-3436543177/go.o:(.data+0x298): undefined reference to `PyUnicode_Type' /usr/bin/ld: /tmp/go-link-3436543177/000027.o: in function `_go_PyObject_CallFunctionObjArgs': /home/me/git/cpy3/variadic.c:53: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:51: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:49: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:47: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:45: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /tmp/go-link-3436543177/000027.o:/home/me/git/cpy3/variadic.c:43: more undefined references to `PyObject_CallFunctionObjArgs' follow /usr/bin/ld: /tmp/go-link-3436543177/000027.o: in function `_go_PyObject_CallMethodObjArgs': /home/me/git/cpy3/variadic.c:102: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:100: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:98: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:96: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:94: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /tmp/go-link-3436543177/000027.o:/home/me/git/cpy3/variadic.c:92: more undefined references to `PyObject_CallMethodObjArgs' follow /usr/bin/ld: /tmp/go-link-3436543177/000027.o: in function `_go_PyObject_CallFunctionObjArgs': /home/me/git/cpy3/variadic.c:23: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:21: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:19: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:17: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:15: undefined reference to `PyObject_CallFunctionObjArgs' /usr/bin/ld: /tmp/go-link-3436543177/000027.o: in function `_go_PyObject_CallMethodObjArgs': /home/me/git/cpy3/variadic.c:70: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:68: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:66: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /home/me/git/cpy3/variadic.c:64: undefined reference to `PyObject_CallMethodObjArgs' /usr/bin/ld: /tmp/go-link-3436543177/000001.o: in function `_cgo_a23b65008ead_Cfunc_PyBool_FromLong': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyBool_FromLong' /usr/bin/ld: /tmp/go-link-3436543177/000001.o: in function `_cgo_a23b65008ead_Cmacro_Py_False': /tmp/go-build/cgo-gcc-prolog:72: undefined reference to `_Py_FalseStruct' /usr/bin/ld: /tmp/go-link-3436543177/000001.o: in function `_cgo_a23b65008ead_Cmacro_Py_True': /tmp/go-build/cgo-gcc-prolog:89: undefined reference to `_Py_TrueStruct' /usr/bin/ld: /tmp/go-link-3436543177/000002.o: in function `_cgo_a23b65008ead_Cfunc_PyByteArray_AsString': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyByteArray_AsString' /usr/bin/ld: /tmp/go-link-3436543177/000002.o: in function `_cgo_a23b65008ead_Cfunc_PyByteArray_Concat': /tmp/go-build/cgo-gcc-prolog:71: undefined reference to `PyByteArray_Concat' /usr/bin/ld: /tmp/go-link-3436543177/000002.o: in function `_cgo_a23b65008ead_Cfunc_PyByteArray_FromObject': /tmp/go-build/cgo-gcc-prolog:89: undefined reference to `PyByteArray_FromObject' /usr/bin/ld: /tmp/go-link-3436543177/000002.o: in function `_cgo_a23b65008ead_Cfunc_PyByteArray_FromStringAndSize': /tmp/go-build/cgo-gcc-prolog:108: undefined reference to `PyByteArray_FromStringAndSize' /usr/bin/ld: /tmp/go-link-3436543177/000002.o: in function `_cgo_a23b65008ead_Cfunc_PyByteArray_Resize': /tmp/go-build/cgo-gcc-prolog:128: undefined reference to `PyByteArray_Resize' /usr/bin/ld: /tmp/go-link-3436543177/000002.o: in function `_cgo_a23b65008ead_Cfunc_PyByteArray_Size': /tmp/go-build/cgo-gcc-prolog:146: undefined reference to `PyByteArray_Size' /usr/bin/ld: /tmp/go-link-3436543177/000003.o: in function `_cgo_a23b65008ead_Cfunc_PyBytes_AsString': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyBytes_AsString' /usr/bin/ld: /tmp/go-link-3436543177/000003.o: in function `_cgo_a23b65008ead_Cfunc_PyBytes_FromObject': /tmp/go-build/cgo-gcc-prolog:96: undefined reference to `PyBytes_FromObject' /usr/bin/ld: /tmp/go-link-3436543177/000003.o: in function `_cgo_a23b65008ead_Cfunc_PyBytes_FromString': /tmp/go-build/cgo-gcc-prolog:114: undefined reference to `PyBytes_FromString' /usr/bin/ld: /tmp/go-link-3436543177/000003.o: in function `_cgo_a23b65008ead_Cfunc_PyBytes_Size': /tmp/go-build/cgo-gcc-prolog:132: undefined reference to `PyBytes_Size' /usr/bin/ld: /tmp/go-link-3436543177/000003.o: in function `_cgo_a23b65008ead_Cfunc_PyBytes_Concat': /tmp/go-build/cgo-gcc-prolog:68: undefined reference to `PyBytes_Concat' /usr/bin/ld: /tmp/go-link-3436543177/000003.o: in function `_cgo_a23b65008ead_Cfunc_PyBytes_ConcatAndDel': /tmp/go-build/cgo-gcc-prolog:81: undefined reference to `PyBytes_ConcatAndDel' /usr/bin/ld: /tmp/go-link-3436543177/000004.o: in function `_cgo_a23b65008ead_Cfunc_PyComplex_FromDoubles': /tmp/go-build/cgo-gcc-prolog:53: undefined reference to `PyComplex_FromDoubles' /usr/bin/ld: /tmp/go-link-3436543177/000004.o: in function `_cgo_a23b65008ead_Cfunc_PyComplex_ImagAsDouble': /tmp/go-build/cgo-gcc-prolog:71: undefined reference to `PyComplex_ImagAsDouble' /usr/bin/ld: /tmp/go-link-3436543177/000004.o: in function `_cgo_a23b65008ead_Cfunc_PyComplex_RealAsDouble': /tmp/go-build/cgo-gcc-prolog:89: undefined reference to `PyComplex_RealAsDouble' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDictProxy_New': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyDictProxy_New' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_Contains': /tmp/go-build/cgo-gcc-prolog:84: undefined reference to `PyDict_Contains' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_Copy': /tmp/go-build/cgo-gcc-prolog:102: undefined reference to `PyDict_Copy' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_DelItem': /tmp/go-build/cgo-gcc-prolog:122: undefined reference to `PyDict_DelItem' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_DelItemString': /tmp/go-build/cgo-gcc-prolog:142: undefined reference to `PyDict_DelItemString' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_GetItem': /tmp/go-build/cgo-gcc-prolog:161: undefined reference to `PyDict_GetItem' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_GetItemString': /tmp/go-build/cgo-gcc-prolog:180: undefined reference to `PyDict_GetItemString' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_GetItemWithError': /tmp/go-build/cgo-gcc-prolog:199: undefined reference to `PyDict_GetItemWithError' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_Items': /tmp/go-build/cgo-gcc-prolog:217: undefined reference to `PyDict_Items' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_Keys': /tmp/go-build/cgo-gcc-prolog:235: undefined reference to `PyDict_Keys' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_New': /tmp/go-build/cgo-gcc-prolog:252: undefined reference to `PyDict_New' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_Next': /tmp/go-build/cgo-gcc-prolog:274: undefined reference to `PyDict_Next' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_SetDefault': /tmp/go-build/cgo-gcc-prolog:294: undefined reference to `PyDict_SetDefault' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_SetItem': /tmp/go-build/cgo-gcc-prolog:315: undefined reference to `PyDict_SetItem' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_SetItemString': /tmp/go-build/cgo-gcc-prolog:336: undefined reference to `PyDict_SetItemString' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_Size': /tmp/go-build/cgo-gcc-prolog:354: undefined reference to `PyDict_Size' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_Values': /tmp/go-build/cgo-gcc-prolog:372: undefined reference to `PyDict_Values' /usr/bin/ld: /tmp/go-link-3436543177/000005.o: in function `_cgo_a23b65008ead_Cfunc_PyDict_Clear': /tmp/go-build/cgo-gcc-prolog:67: undefined reference to `PyDict_Clear' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_BadArgument': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyErr_BadArgument' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_CheckSignals': /tmp/go-build/cgo-gcc-prolog:82: undefined reference to `PyErr_CheckSignals' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_ExceptionMatches': /tmp/go-build/cgo-gcc-prolog:113: undefined reference to `PyErr_ExceptionMatches' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_GivenExceptionMatches': /tmp/go-build/cgo-gcc-prolog:161: undefined reference to `PyErr_GivenExceptionMatches' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_NoMemory': /tmp/go-build/cgo-gcc-prolog:178: undefined reference to `PyErr_NoMemory' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_Occurred': /tmp/go-build/cgo-gcc-prolog:209: undefined reference to `PyErr_Occurred' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SetImportError': /tmp/go-build/cgo-gcc-prolog:270: undefined reference to `PyErr_SetImportError' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SetImportErrorSubclass': /tmp/go-build/cgo-gcc-prolog:291: undefined reference to `PyErr_SetImportErrorSubclass' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_BadInternalCall': /tmp/go-build/cgo-gcc-prolog:67: undefined reference to `_PyErr_BadInternalCall' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_Clear': /tmp/go-build/cgo-gcc-prolog:97: undefined reference to `PyErr_Clear' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_Fetch': /tmp/go-build/cgo-gcc-prolog:130: undefined reference to `PyErr_Fetch' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_GetExcInfo': /tmp/go-build/cgo-gcc-prolog:144: undefined reference to `PyErr_GetExcInfo' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_NormalizeException': /tmp/go-build/cgo-gcc-prolog:195: undefined reference to `PyErr_NormalizeException' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_PrintEx': /tmp/go-build/cgo-gcc-prolog:225: undefined reference to `PyErr_PrintEx' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_Restore': /tmp/go-build/cgo-gcc-prolog:239: undefined reference to `PyErr_Restore' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SetExcInfo': /tmp/go-build/cgo-gcc-prolog:253: undefined reference to `PyErr_SetExcInfo' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SetInterrupt': /tmp/go-build/cgo-gcc-prolog:306: undefined reference to `PyErr_SetInterrupt' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SetNone': /tmp/go-build/cgo-gcc-prolog:318: undefined reference to `PyErr_SetNone' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SetObject': /tmp/go-build/cgo-gcc-prolog:331: undefined reference to `PyErr_SetObject' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SetString': /tmp/go-build/cgo-gcc-prolog:344: undefined reference to `PyErr_SetString' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SyntaxLocation': /tmp/go-build/cgo-gcc-prolog:358: undefined reference to `PyErr_SyntaxLocation' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SyntaxLocationEx': /tmp/go-build/cgo-gcc-prolog:372: undefined reference to `PyErr_SyntaxLocationEx' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_SyntaxLocationObject': /tmp/go-build/cgo-gcc-prolog:386: undefined reference to `PyErr_SyntaxLocationObject' /usr/bin/ld: /tmp/go-link-3436543177/000006.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_WriteUnraisable': /tmp/go-build/cgo-gcc-prolog:398: undefined reference to `PyErr_WriteUnraisable' /usr/bin/ld: /tmp/go-link-3436543177/000007.o: in function `_cgo_a23b65008ead_Cfunc_PySignal_SetWakeupFd': /tmp/go-build/cgo-gcc-prolog:54: undefined reference to `PySignal_SetWakeupFd' /usr/bin/ld: /tmp/go-link-3436543177/000008.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_NewException': /tmp/go-build/cgo-gcc-prolog:54: undefined reference to `PyErr_NewException' /usr/bin/ld: /tmp/go-link-3436543177/000008.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_NewExceptionWithDoc': /tmp/go-build/cgo-gcc-prolog:75: undefined reference to `PyErr_NewExceptionWithDoc' /usr/bin/ld: /tmp/go-link-3436543177/000008.o: in function `_cgo_a23b65008ead_Cfunc_PyException_GetCause': /tmp/go-build/cgo-gcc-prolog:93: undefined reference to `PyException_GetCause' /usr/bin/ld: /tmp/go-link-3436543177/000008.o: in function `_cgo_a23b65008ead_Cfunc_PyException_GetContext': /tmp/go-build/cgo-gcc-prolog:111: undefined reference to `PyException_GetContext' /usr/bin/ld: /tmp/go-link-3436543177/000008.o: in function `_cgo_a23b65008ead_Cfunc_PyException_GetTraceback': /tmp/go-build/cgo-gcc-prolog:129: undefined reference to `PyException_GetTraceback' /usr/bin/ld: /tmp/go-link-3436543177/000008.o: in function `_cgo_a23b65008ead_Cfunc_PyException_SetTraceback': /tmp/go-build/cgo-gcc-prolog:175: undefined reference to `PyException_SetTraceback' /usr/bin/ld: /tmp/go-link-3436543177/000008.o: in function `_cgo_a23b65008ead_Cfunc_PyException_SetCause': /tmp/go-build/cgo-gcc-prolog:145: undefined reference to `PyException_SetCause' /usr/bin/ld: /tmp/go-link-3436543177/000008.o: in function `_cgo_a23b65008ead_Cfunc_PyException_SetContext': /tmp/go-build/cgo-gcc-prolog:158: undefined reference to `PyException_SetContext' /usr/bin/ld: /tmp/go-link-3436543177/000009.o: in function `_cgo_a23b65008ead_Cfunc_PyFloat_AsDouble': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyFloat_AsDouble' /usr/bin/ld: /tmp/go-link-3436543177/000009.o: in function `_cgo_a23b65008ead_Cfunc_PyFloat_FromDouble': /tmp/go-build/cgo-gcc-prolog:70: undefined reference to `PyFloat_FromDouble' /usr/bin/ld: /tmp/go-link-3436543177/000009.o: in function `_cgo_a23b65008ead_Cfunc_PyFloat_FromString': /tmp/go-build/cgo-gcc-prolog:88: undefined reference to `PyFloat_FromString' /usr/bin/ld: /tmp/go-link-3436543177/000009.o: in function `_cgo_a23b65008ead_Cfunc_PyFloat_GetInfo': /tmp/go-build/cgo-gcc-prolog:105: undefined reference to `PyFloat_GetInfo' /usr/bin/ld: /tmp/go-link-3436543177/000009.o: in function `_cgo_a23b65008ead_Cfunc_PyFloat_GetMax': /tmp/go-build/cgo-gcc-prolog:122: undefined reference to `PyFloat_GetMax' /usr/bin/ld: /tmp/go-link-3436543177/000009.o: in function `_cgo_a23b65008ead_Cfunc_PyFloat_GetMin': /tmp/go-build/cgo-gcc-prolog:139: undefined reference to `PyFloat_GetMin' /usr/bin/ld: /tmp/go-link-3436543177/000011.o: in function `_cgo_a23b65008ead_Cfunc_PyRun_AnyFileFlags': /tmp/go-build/cgo-gcc-prolog:90: undefined reference to `PyRun_AnyFileExFlags' /usr/bin/ld: /tmp/go-link-3436543177/000011.o: in function `_cgo_a23b65008ead_Cfunc_PyRun_SimpleStringFlags': /tmp/go-build/cgo-gcc-prolog:110: undefined reference to `PyRun_SimpleStringFlags' /usr/bin/ld: /tmp/go-link-3436543177/000011.o: in function `_cgo_a23b65008ead_Cfunc_Py_DecodeLocale': /tmp/go-build/cgo-gcc-prolog:129: undefined reference to `Py_DecodeLocale' /usr/bin/ld: /tmp/go-link-3436543177/000011.o: in function `_cgo_a23b65008ead_Cfunc_Py_Main': /tmp/go-build/cgo-gcc-prolog:150: undefined reference to `Py_Main' /usr/bin/ld: /tmp/go-link-3436543177/000011.o: in function `_cgo_a23b65008ead_Cfunc_PyMem_RawFree': /tmp/go-build/cgo-gcc-prolog:72: undefined reference to `PyMem_RawFree' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_AddModule': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyImport_AddModule' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_AddModuleObject': /tmp/go-build/cgo-gcc-prolog:70: undefined reference to `PyImport_AddModuleObject' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ExecCodeModule': /tmp/go-build/cgo-gcc-prolog:89: undefined reference to `PyImport_ExecCodeModule' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ExecCodeModuleEx': /tmp/go-build/cgo-gcc-prolog:109: undefined reference to `PyImport_ExecCodeModuleEx' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ExecCodeModuleObject': /tmp/go-build/cgo-gcc-prolog:130: undefined reference to `PyImport_ExecCodeModuleObject' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ExecCodeModuleWithPathnames': /tmp/go-build/cgo-gcc-prolog:151: undefined reference to `PyImport_ExecCodeModuleWithPathnames' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_GetImporter': /tmp/go-build/cgo-gcc-prolog:169: undefined reference to `PyImport_GetImporter' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_GetMagicNumber': /tmp/go-build/cgo-gcc-prolog:186: undefined reference to `PyImport_GetMagicNumber' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_GetMagicTag': /tmp/go-build/cgo-gcc-prolog:203: undefined reference to `PyImport_GetMagicTag' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_GetModule': /tmp/go-build/cgo-gcc-prolog:221: undefined reference to `PyImport_GetModule' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_GetModuleDict': /tmp/go-build/cgo-gcc-prolog:238: undefined reference to `PyImport_GetModuleDict' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_Import': /tmp/go-build/cgo-gcc-prolog:256: undefined reference to `PyImport_Import' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ImportFrozenModule': /tmp/go-build/cgo-gcc-prolog:275: undefined reference to `PyImport_ImportFrozenModule' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ImportFrozenModuleObject': /tmp/go-build/cgo-gcc-prolog:294: undefined reference to `PyImport_ImportFrozenModuleObject' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ImportModule': /tmp/go-build/cgo-gcc-prolog:312: undefined reference to `PyImport_ImportModule' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ImportModuleLevel': /tmp/go-build/cgo-gcc-prolog:335: undefined reference to `PyImport_ImportModuleLevel' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ImportModuleLevelObject': /tmp/go-build/cgo-gcc-prolog:358: undefined reference to `PyImport_ImportModuleLevelObject' /usr/bin/ld: /tmp/go-link-3436543177/000012.o: in function `_cgo_a23b65008ead_Cfunc_PyImport_ReloadModule': /tmp/go-build/cgo-gcc-prolog:376: undefined reference to `PyImport_ReloadModule' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsDouble': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyLong_AsDouble' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsLong': /tmp/go-build/cgo-gcc-prolog:70: undefined reference to `PyLong_AsLong' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsLongAndOverflow': /tmp/go-build/cgo-gcc-prolog:89: undefined reference to `PyLong_AsLongAndOverflow' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsLongLong': /tmp/go-build/cgo-gcc-prolog:107: undefined reference to `PyLong_AsLongLong' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsLongLongAndOverflow': /tmp/go-build/cgo-gcc-prolog:126: undefined reference to `PyLong_AsLongLongAndOverflow' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsUnsignedLong': /tmp/go-build/cgo-gcc-prolog:144: undefined reference to `PyLong_AsUnsignedLong' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsUnsignedLongLong': /tmp/go-build/cgo-gcc-prolog:162: undefined reference to `PyLong_AsUnsignedLongLong' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsUnsignedLongLongMask': /tmp/go-build/cgo-gcc-prolog:180: undefined reference to `PyLong_AsUnsignedLongLongMask' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_AsUnsignedLongMask': /tmp/go-build/cgo-gcc-prolog:198: undefined reference to `PyLong_AsUnsignedLongMask' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_FromDouble': /tmp/go-build/cgo-gcc-prolog:216: undefined reference to `PyLong_FromDouble' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_FromLong': /tmp/go-build/cgo-gcc-prolog:234: undefined reference to `PyLong_FromLong' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_FromLongLong': /tmp/go-build/cgo-gcc-prolog:252: undefined reference to `PyLong_FromLongLong' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_FromString': /tmp/go-build/cgo-gcc-prolog:273: undefined reference to `PyLong_FromString' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_FromUnicodeObject': /tmp/go-build/cgo-gcc-prolog:293: undefined reference to `PyLong_FromUnicodeObject' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_FromUnsignedLong': /tmp/go-build/cgo-gcc-prolog:311: undefined reference to `PyLong_FromUnsignedLong' /usr/bin/ld: /tmp/go-link-3436543177/000013.o: in function `_cgo_a23b65008ead_Cfunc_PyLong_FromUnsignedLongLong': /tmp/go-build/cgo-gcc-prolog:329: undefined reference to `PyLong_FromUnsignedLongLong' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_EncodeLocale': /tmp/go-build/cgo-gcc-prolog:95: undefined reference to `Py_EncodeLocale' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_FinalizeEx': /tmp/go-build/cgo-gcc-prolog:125: undefined reference to `Py_FinalizeEx' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetBuildInfo': /tmp/go-build/cgo-gcc-prolog:142: undefined reference to `Py_GetBuildInfo' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetCompiler': /tmp/go-build/cgo-gcc-prolog:159: undefined reference to `Py_GetCompiler' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetCopyright': /tmp/go-build/cgo-gcc-prolog:176: undefined reference to `Py_GetCopyright' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetExecPrefix': /tmp/go-build/cgo-gcc-prolog:193: undefined reference to `Py_GetExecPrefix' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetPath': /tmp/go-build/cgo-gcc-prolog:210: undefined reference to `Py_GetPath' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetPlatform': /tmp/go-build/cgo-gcc-prolog:227: undefined reference to `Py_GetPlatform' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetPrefix': /tmp/go-build/cgo-gcc-prolog:244: undefined reference to `Py_GetPrefix' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetProgramFullPath': /tmp/go-build/cgo-gcc-prolog:261: undefined reference to `Py_GetProgramFullPath' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetProgramName': /tmp/go-build/cgo-gcc-prolog:278: undefined reference to `Py_GetProgramName' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetPythonHome': /tmp/go-build/cgo-gcc-prolog:295: undefined reference to `Py_GetPythonHome' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_GetVersion': /tmp/go-build/cgo-gcc-prolog:312: undefined reference to `Py_GetVersion' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_IsInitialized': /tmp/go-build/cgo-gcc-prolog:355: undefined reference to `Py_IsInitialized' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_SetStandardStreamEncoding': /tmp/go-build/cgo-gcc-prolog:411: undefined reference to `Py_SetStandardStreamEncoding' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_PyMem_Free': /tmp/go-build/cgo-gcc-prolog:49: undefined reference to `PyMem_Free' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_PySys_SetArgv': /tmp/go-build/cgo-gcc-prolog:63: undefined reference to `PySys_SetArgv' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_PySys_SetArgvEx': /tmp/go-build/cgo-gcc-prolog:79: undefined reference to `PySys_SetArgvEx' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_Finalize': /tmp/go-build/cgo-gcc-prolog:110: undefined reference to `Py_Finalize' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_Initialize': /tmp/go-build/cgo-gcc-prolog:327: undefined reference to `Py_Initialize' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_InitializeEx': /tmp/go-build/cgo-gcc-prolog:340: undefined reference to `Py_InitializeEx' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_SetPath': /tmp/go-build/cgo-gcc-prolog:370: undefined reference to `Py_SetPath' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_SetProgramName': /tmp/go-build/cgo-gcc-prolog:382: undefined reference to `Py_SetProgramName' /usr/bin/ld: /tmp/go-link-3436543177/000014.o: in function `_cgo_a23b65008ead_Cfunc_Py_SetPythonHome': /tmp/go-build/cgo-gcc-prolog:394: undefined reference to `Py_SetPythonHome' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_Append': /tmp/go-build/cgo-gcc-prolog:54: undefined reference to `PyList_Append' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_AsTuple': /tmp/go-build/cgo-gcc-prolog:72: undefined reference to `PyList_AsTuple' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_GetItem': /tmp/go-build/cgo-gcc-prolog:91: undefined reference to `PyList_GetItem' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_GetSlice': /tmp/go-build/cgo-gcc-prolog:111: undefined reference to `PyList_GetSlice' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_Insert': /tmp/go-build/cgo-gcc-prolog:132: undefined reference to `PyList_Insert' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_New': /tmp/go-build/cgo-gcc-prolog:150: undefined reference to `PyList_New' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_Reverse': /tmp/go-build/cgo-gcc-prolog:169: undefined reference to `PyList_Reverse' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_SetItem': /tmp/go-build/cgo-gcc-prolog:190: undefined reference to `PyList_SetItem' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_SetSlice': /tmp/go-build/cgo-gcc-prolog:212: undefined reference to `PyList_SetSlice' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_Size': /tmp/go-build/cgo-gcc-prolog:230: undefined reference to `PyList_Size' /usr/bin/ld: /tmp/go-link-3436543177/000015.o: in function `_cgo_a23b65008ead_Cfunc_PyList_Sort': /tmp/go-build/cgo-gcc-prolog:249: undefined reference to `PyList_Sort' /usr/bin/ld: /tmp/go-link-3436543177/000016.o: in function `_cgo_a23b65008ead_Cfunc_PyModule_GetDict': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyModule_GetDict' /usr/bin/ld: /tmp/go-link-3436543177/000016.o: in function `_cgo_a23b65008ead_Cfunc_PyModule_GetFilenameObject': /tmp/go-build/cgo-gcc-prolog:70: undefined reference to `PyModule_GetFilenameObject' /usr/bin/ld: /tmp/go-link-3436543177/000016.o: in function `_cgo_a23b65008ead_Cfunc_PyModule_GetName': /tmp/go-build/cgo-gcc-prolog:88: undefined reference to `PyModule_GetName' /usr/bin/ld: /tmp/go-link-3436543177/000016.o: in function `_cgo_a23b65008ead_Cfunc_PyModule_GetNameObject': /tmp/go-build/cgo-gcc-prolog:106: undefined reference to `PyModule_GetNameObject' /usr/bin/ld: /tmp/go-link-3436543177/000016.o: in function `_cgo_a23b65008ead_Cfunc_PyModule_GetState': /tmp/go-build/cgo-gcc-prolog:124: undefined reference to `PyModule_GetState' /usr/bin/ld: /tmp/go-link-3436543177/000016.o: in function `_cgo_a23b65008ead_Cfunc_PyModule_New': /tmp/go-build/cgo-gcc-prolog:142: undefined reference to `PyModule_New' /usr/bin/ld: /tmp/go-link-3436543177/000016.o: in function `_cgo_a23b65008ead_Cfunc_PyModule_NewObject': /tmp/go-build/cgo-gcc-prolog:160: undefined reference to `PyModule_NewObject' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyCallable_Check': /tmp/go-build/cgo-gcc-prolog:53: undefined reference to `PyCallable_Check' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_ASCII': /tmp/go-build/cgo-gcc-prolog:71: undefined reference to `PyObject_ASCII' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Bytes': /tmp/go-build/cgo-gcc-prolog:89: undefined reference to `PyObject_Bytes' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Call': /tmp/go-build/cgo-gcc-prolog:109: undefined reference to `PyObject_Call' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_CallObject': /tmp/go-build/cgo-gcc-prolog:128: undefined reference to `PyObject_CallObject' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_DelItem': /tmp/go-build/cgo-gcc-prolog:148: undefined reference to `PyObject_DelItem' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Dir': /tmp/go-build/cgo-gcc-prolog:166: undefined reference to `PyObject_Dir' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_GetAttr': /tmp/go-build/cgo-gcc-prolog:185: undefined reference to `PyObject_GetAttr' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_GetAttrString': /tmp/go-build/cgo-gcc-prolog:204: undefined reference to `PyObject_GetAttrString' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_GetItem': /tmp/go-build/cgo-gcc-prolog:223: undefined reference to `PyObject_GetItem' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_GetIter': /tmp/go-build/cgo-gcc-prolog:241: undefined reference to `PyObject_GetIter' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_HasAttr': /tmp/go-build/cgo-gcc-prolog:261: undefined reference to `PyObject_HasAttr' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_HasAttrString': /tmp/go-build/cgo-gcc-prolog:281: undefined reference to `PyObject_HasAttrString' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Hash': /tmp/go-build/cgo-gcc-prolog:299: undefined reference to `PyObject_Hash' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_HashNotImplemented': /tmp/go-build/cgo-gcc-prolog:317: undefined reference to `PyObject_HashNotImplemented' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_IsInstance': /tmp/go-build/cgo-gcc-prolog:337: undefined reference to `PyObject_IsInstance' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_IsSubclass': /tmp/go-build/cgo-gcc-prolog:357: undefined reference to `PyObject_IsSubclass' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_IsTrue': /tmp/go-build/cgo-gcc-prolog:376: undefined reference to `PyObject_IsTrue' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Length': /tmp/go-build/cgo-gcc-prolog:394: undefined reference to `PyObject_Size' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_LengthHint': /tmp/go-build/cgo-gcc-prolog:413: undefined reference to `PyObject_LengthHint' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Not': /tmp/go-build/cgo-gcc-prolog:432: undefined reference to `PyObject_Not' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Repr': /tmp/go-build/cgo-gcc-prolog:450: undefined reference to `PyObject_Repr' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_RichCompare': /tmp/go-build/cgo-gcc-prolog:471: undefined reference to `PyObject_RichCompare' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_RichCompareBool': /tmp/go-build/cgo-gcc-prolog:493: undefined reference to `PyObject_RichCompareBool' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_SetAttr': /tmp/go-build/cgo-gcc-prolog:514: undefined reference to `PyObject_SetAttr' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_SetAttrString': /tmp/go-build/cgo-gcc-prolog:535: undefined reference to `PyObject_SetAttrString' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_SetItem': /tmp/go-build/cgo-gcc-prolog:556: undefined reference to `PyObject_SetItem' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Str': /tmp/go-build/cgo-gcc-prolog:574: undefined reference to `PyObject_Str' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_PyObject_Type': /tmp/go-build/cgo-gcc-prolog:592: undefined reference to `PyObject_Type' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cmacro_Py_None': /tmp/go-build/cgo-gcc-prolog:636: undefined reference to `_Py_NoneStruct' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_Py_ReprEnter': /tmp/go-build/cgo-gcc-prolog:652: undefined reference to `Py_ReprEnter' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_Py_DecRef': /tmp/go-build/cgo-gcc-prolog:607: undefined reference to `Py_DecRef' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_Py_IncRef': /tmp/go-build/cgo-gcc-prolog:619: undefined reference to `Py_IncRef' /usr/bin/ld: /tmp/go-link-3436543177/000017.o: in function `_cgo_a23b65008ead_Cfunc_Py_ReprLeave': /tmp/go-build/cgo-gcc-prolog:667: undefined reference to `Py_ReprLeave' /usr/bin/ld: /tmp/go-link-3436543177/000019.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_GetBuiltins': /tmp/go-build/cgo-gcc-prolog:51: undefined reference to `PyEval_GetBuiltins' /usr/bin/ld: /tmp/go-link-3436543177/000019.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_GetFuncDesc': /tmp/go-build/cgo-gcc-prolog:69: undefined reference to `PyEval_GetFuncDesc' /usr/bin/ld: /tmp/go-link-3436543177/000019.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_GetFuncName': /tmp/go-build/cgo-gcc-prolog:87: undefined reference to `PyEval_GetFuncName' /usr/bin/ld: /tmp/go-link-3436543177/000019.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_GetGlobals': /tmp/go-build/cgo-gcc-prolog:104: undefined reference to `PyEval_GetGlobals' /usr/bin/ld: /tmp/go-link-3436543177/000019.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_GetLocals': /tmp/go-build/cgo-gcc-prolog:121: undefined reference to `PyEval_GetLocals' /usr/bin/ld: /tmp/go-link-3436543177/000020.o: in function `_cgo_a23b65008ead_Cfunc_PySys_GetObject': /tmp/go-build/cgo-gcc-prolog:76: undefined reference to `PySys_GetObject' /usr/bin/ld: /tmp/go-link-3436543177/000020.o: in function `_cgo_a23b65008ead_Cfunc_PySys_GetXOptions': /tmp/go-build/cgo-gcc-prolog:93: undefined reference to `PySys_GetXOptions' /usr/bin/ld: /tmp/go-link-3436543177/000020.o: in function `_cgo_a23b65008ead_Cfunc_PySys_SetObject': /tmp/go-build/cgo-gcc-prolog:125: undefined reference to `PySys_SetObject' /usr/bin/ld: /tmp/go-link-3436543177/000020.o: in function `_cgo_a23b65008ead_Cfunc_PySys_AddWarnOption': /tmp/go-build/cgo-gcc-prolog:49: undefined reference to `PySys_AddWarnOption' /usr/bin/ld: /tmp/go-link-3436543177/000020.o: in function `_cgo_a23b65008ead_Cfunc_PySys_AddXOption': /tmp/go-build/cgo-gcc-prolog:61: undefined reference to `PySys_AddXOption' /usr/bin/ld: /tmp/go-link-3436543177/000020.o: in function `_cgo_a23b65008ead_Cfunc_PySys_ResetWarnOptions': /tmp/go-build/cgo-gcc-prolog:108: undefined reference to `PySys_ResetWarnOptions' /usr/bin/ld: /tmp/go-link-3436543177/000020.o: in function `_cgo_a23b65008ead_Cfunc_PySys_SetPath': /tmp/go-build/cgo-gcc-prolog:140: undefined reference to `PySys_SetPath' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_SaveThread': /tmp/go-build/cgo-gcc-prolog:75: undefined reference to `PyEval_SaveThread' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_ThreadsInitialized': /tmp/go-build/cgo-gcc-prolog:93: undefined reference to `PyEval_ThreadsInitialized' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyGILState_Check': /tmp/go-build/cgo-gcc-prolog:111: undefined reference to `PyGILState_Check' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyGILState_Ensure': /tmp/go-build/cgo-gcc-prolog:129: undefined reference to `PyGILState_Ensure' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyGILState_GetThisThreadState': /tmp/go-build/cgo-gcc-prolog:146: undefined reference to `PyGILState_GetThisThreadState' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyThreadState_Get': /tmp/go-build/cgo-gcc-prolog:176: undefined reference to `PyThreadState_Get' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyThreadState_Swap': /tmp/go-build/cgo-gcc-prolog:194: undefined reference to `PyThreadState_Swap' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_InitThreads': /tmp/go-build/cgo-gcc-prolog:49: undefined reference to `PyEval_InitThreads' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyEval_RestoreThread': /tmp/go-build/cgo-gcc-prolog:61: undefined reference to `PyEval_RestoreThread' /usr/bin/ld: /tmp/go-link-3436543177/000021.o: in function `_cgo_a23b65008ead_Cfunc_PyGILState_Release': /tmp/go-build/cgo-gcc-prolog:162: undefined reference to `PyGILState_Release' /usr/bin/ld: /tmp/go-link-3436543177/000022.o: in function `_cgo_a23b65008ead_Cfunc_PyTuple_GetItem': /tmp/go-build/cgo-gcc-prolog:53: undefined reference to `PyTuple_GetItem' /usr/bin/ld: /tmp/go-link-3436543177/000022.o: in function `_cgo_a23b65008ead_Cfunc_PyTuple_GetSlice': /tmp/go-build/cgo-gcc-prolog:73: undefined reference to `PyTuple_GetSlice' /usr/bin/ld: /tmp/go-link-3436543177/000022.o: in function `_cgo_a23b65008ead_Cfunc_PyTuple_New': /tmp/go-build/cgo-gcc-prolog:91: undefined reference to `PyTuple_New' /usr/bin/ld: /tmp/go-link-3436543177/000022.o: in function `_cgo_a23b65008ead_Cfunc_PyTuple_SetItem': /tmp/go-build/cgo-gcc-prolog:112: undefined reference to `PyTuple_SetItem' /usr/bin/ld: /tmp/go-link-3436543177/000022.o: in function `_cgo_a23b65008ead_Cfunc_PyTuple_Size': /tmp/go-build/cgo-gcc-prolog:130: undefined reference to `PyTuple_Size' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_AsUTF8': /tmp/go-build/cgo-gcc-prolog:52: undefined reference to `PyUnicode_AsUTF8' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_CopyCharacters': /tmp/go-build/cgo-gcc-prolog:74: undefined reference to `PyUnicode_CopyCharacters' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_Fill': /tmp/go-build/cgo-gcc-prolog:96: undefined reference to `PyUnicode_Fill' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_FromEncodedObject': /tmp/go-build/cgo-gcc-prolog:116: undefined reference to `PyUnicode_FromEncodedObject' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_FromString': /tmp/go-build/cgo-gcc-prolog:134: undefined reference to `PyUnicode_FromString' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_GetLength': /tmp/go-build/cgo-gcc-prolog:152: undefined reference to `PyUnicode_GetLength' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_New': /tmp/go-build/cgo-gcc-prolog:172: undefined reference to `PyUnicode_New' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_ReadChar': /tmp/go-build/cgo-gcc-prolog:192: undefined reference to `PyUnicode_ReadChar' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_Substring': /tmp/go-build/cgo-gcc-prolog:212: undefined reference to `PyUnicode_Substring' /usr/bin/ld: /tmp/go-link-3436543177/000024.o: in function `_cgo_a23b65008ead_Cfunc_PyUnicode_WriteChar': /tmp/go-build/cgo-gcc-prolog:234: undefined reference to `PyUnicode_WriteChar' /usr/bin/ld: /tmp/go-link-3436543177/000025.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_WarnEx': /tmp/go-build/cgo-gcc-prolog:55: undefined reference to `PyErr_WarnEx' /usr/bin/ld: /tmp/go-link-3436543177/000025.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_WarnExplicit': /tmp/go-build/cgo-gcc-prolog:80: undefined reference to `PyErr_WarnExplicit' /usr/bin/ld: /tmp/go-link-3436543177/000025.o: in function `_cgo_a23b65008ead_Cfunc_PyErr_WarnExplicitObject': /tmp/go-build/cgo-gcc-prolog:105: undefined reference to `PyErr_WarnExplicitObject' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `Py_IS_TYPE': /usr/include/python3.11/object.h:150: undefined reference to `PyType_Type' /usr/bin/ld: /usr/include/python3.11/object.h:150: undefined reference to `PyLong_Type' /usr/bin/ld: /usr/include/python3.11/object.h:150: undefined reference to `PyBool_Type' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `PyObject_TypeCheck': /usr/include/python3.11/object.h:263: undefined reference to `PyFloat_Type' /usr/bin/ld: /usr/include/python3.11/object.h:263: undefined reference to `PyType_IsSubtype' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `Py_IS_TYPE': /usr/include/python3.11/object.h:150: undefined reference to `PyFloat_Type' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `PyObject_TypeCheck': /usr/include/python3.11/object.h:263: undefined reference to `PyComplex_Type' /usr/bin/ld: /usr/include/python3.11/object.h:263: undefined reference to `PyType_IsSubtype' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `Py_IS_TYPE': /usr/include/python3.11/object.h:150: undefined reference to `PyComplex_Type' /usr/bin/ld: /usr/include/python3.11/object.h:150: undefined reference to `PyBytes_Type' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `PyObject_TypeCheck': /usr/include/python3.11/object.h:263: undefined reference to `PyByteArray_Type' /usr/bin/ld: /usr/include/python3.11/object.h:263: undefined reference to `PyType_IsSubtype' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `Py_IS_TYPE': /usr/include/python3.11/object.h:150: undefined reference to `PyByteArray_Type' /usr/bin/ld: /usr/include/python3.11/object.h:150: undefined reference to `PyUnicode_Type' /usr/bin/ld: /usr/include/python3.11/object.h:150: undefined reference to `PyTuple_Type' /usr/bin/ld: /usr/include/python3.11/object.h:150: undefined reference to `PyList_Type' /usr/bin/ld: /usr/include/python3.11/object.h:150: undefined reference to `PyDict_Type' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `PyObject_TypeCheck': /usr/include/python3.11/object.h:263: undefined reference to `PyModule_Type' /usr/bin/ld: /usr/include/python3.11/object.h:263: undefined reference to `PyType_IsSubtype' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `Py_IS_TYPE': /usr/include/python3.11/object.h:150: undefined reference to `PyModule_Type' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `PyObject_TypeCheck': /usr/include/python3.11/object.h:263: undefined reference to `PyType_IsSubtype' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `_go_Py_EnterRecursiveCall': /home/me/git/cpy3/macro.c:11: undefined reference to `Py_EnterRecursiveCall' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `_go_Py_LeaveRecursiveCall': /home/me/git/cpy3/macro.c:15: undefined reference to `Py_LeaveRecursiveCall' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `_go_PyObject_DelAttr': /home/me/git/cpy3/macro.c:104: undefined reference to `PyObject_SetAttr' /usr/bin/ld: /tmp/go-link-3436543177/000026.o: in function `_go_PyObject_DelAttrString': /home/me/git/cpy3/macro.c:107: undefined reference to `PyObject_SetAttrString' collect2: error: ld returned 1 exit status

Describe what you expected:
it should compile

Steps to reproduce the issue:

  • go run examples/python3

OS: Fedora 37
Python: Python 3.11.1
go version go1.19.3 linux/amd64
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)

Getting Error: "could not determine kind of name for C.PyEval_ReInitThreads"

I am trying to use the PyRun_SimpleString function for a print hello world however I am getting the error below:

../../go/pkg/mod/github.com/go-python/[email protected]/thread.go:53:2: could not determine kind of name for C.PyEval_ReInitThreads

This is the code that I am running.

package main

import "github.com/go-python/cpy3"

func main() {

defer python3.Py_Finalize()
python3.Py_Initialize()
python3.PyRun_SimpleString("print('hello world')")

}

I am using Python 3.7.15 and have a python3,pc file.

repo example codes failed to run


Note: If you have a usage question (i.e. how to achieve something specific using this library + the CPython C-API) consider posting it to this project's GitHub Discussions board instead of creating an issue. Any question is welcome!


Describe what happened:

your examples code failed to run:

github.com/go-python/cpy3

../../dict.go:141:13: could not determine kind of name for C.PyDict_ClearFreeList

github.com/go-python/cpy3

../../dict.go:141:13: could not determine kind of name for C.PyDict_ClearFreeList

Describe what you expected:

I expect your examples work

Steps to reproduce the issue:

git clone https://github.com/go-python/cpy3.git

cd cpy3/examples/list/

go run main.go

cd ../python3/

go run main.go

move CI to github actions

the circleci config used on the original DD repo hasn't been setup for this fork's repo yet. I suggest to remove it and set up github actions.

go get for go-python3 on mac M1 is not working.

I am having a new Mac with an M1 processor installed.

I installed a Golang version with an arm version for Mac M1 from the official site: https://go.dev/dl/
I downloaded Python3 for M1.
After that, I tried to run: go get github.com/DataDog/go-python3
and got an error message attached to the file.
I tried also to run: go get github.com/go-python/cpy3
and I got the same error.
Untitled.txt

On the other hand, I downloaded and installed the Golang for the x86 processor, it works fine.
but, I have to work with the right version on my Mac (Golang version for M1, arm version).

Go module

This project currently isn't a Go module. We should make it a module, unless this would lead to a breaking change (I believe it won't, but would appreciate any comments on that).

add support for multiple Python3 versions (not just 3.7)

Currently only Python 3.7 is supported. This is because the Python3 C API slightly changes between versions. For example Python 3.8 removed the PyEval_ReInitThreads function, so binding it fails. (Also sometimes new functions get added).

We should add support for multiple Python versions. This should happen in a way that we don't just delete the functions that aren't supported in newer Python versions anymore (as this would be a breaking change for users of older Python versions).

If breaking changes are unavoidable, this should lead to a new major version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.