[ https://issues.apache.org/jira/browse/PROTON-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15022468#comment-15022468 ]
Alan Conway commented on PROTON-1058: ------------------------------------- Updated the go get repo and fixed an issue with 0.10, try again. I tested with 0.11 and 0.10 proton C installed in /usr/local If proton is installed elsewhere you will need to fiddle compile flags, I'll add that to the README. NOTE: the go get version of the API works with 0.10 and 0.11 C libraries now, but it is ahead of the examples in both releases so you should look at the examples on master, see https://github.com/apache/qpid-proton/blob/master/examples/go/README.md. The API is close to stable, but I am very interested in any feedback you have on making it easier to use or missing features, raise a JIRA or mail the users@qpid list with Go: in the subject. > Trying to "go get qpid.apache.org/electron" leads to invalid type PN_INVALID > ---------------------------------------------------------------------------- > > Key: PROTON-1058 > URL: https://issues.apache.org/jira/browse/PROTON-1058 > Project: Qpid Proton > Issue Type: Bug > Components: go-binding > Affects Versions: 0.10 > Environment: OS X 10.11 & FreeBSD 9.2, both with Go 1.5.1 > Reporter: Ollivier Robert > Assignee: Alan Conway > Priority: Blocker > Labels: build > > I'm trying to use the Go bindings in my project. I run {{go get > qpid.apache.org/electron}} after installing the 0.10 library. I had to > fiddle with the {{CFLAGS/LDFLAGS}} variables to go paste the preprocessor > phase and now I'm getting this error saying that one of the constants/types > is invalid: > {code} > # qpid.apache.org/amqp > could not determine kind of name for C.PN_INVALID > {code} > Here is the complete build messages: > {code} > 712 [14:55] roberto@roberto-aw:qpid.apache.org/electron> env > CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib64" go build > -v -x > WORK=/var/folders/dn/bm683tn922z5g_pkyf2_zz4c0000gn/T/go-build961484794 > qpid.apache.org/internal > mkdir -p $WORK/qpid.apache.org/internal/_obj/ > mkdir -p $WORK/qpid.apache.org/ > cd /Users/roberto/Src/Go/src/qpid.apache.org/internal > CGO_LDFLAGS="-L/usr/local/lib64" "-lqpid-proton" > /usr/local/go/pkg/tool/darwin_amd64/cgo -objdir > $WORK/qpid.apache.org/internal/_obj/ -importpath qpid.apache.org/internal -- > -I $WORK/qpid.apache.org/internal/_obj/ -I/usr/local/include error.go > clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments > -fmessage-length=0 -fno-common -print-libgcc-file-name > clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments > -fmessage-length=0 -fno-common -I $WORK/qpid.apache.org/internal/_obj/ > -I/usr/local/include -o $WORK/qpid.apache.org/internal/_obj/_cgo_main.o -c > $WORK/qpid.apache.org/internal/_obj/_cgo_main.c > clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments > -fmessage-length=0 -fno-common -I $WORK/qpid.apache.org/internal/_obj/ > -I/usr/local/include -o $WORK/qpid.apache.org/internal/_obj/_cgo_export.o -c > $WORK/qpid.apache.org/internal/_obj/_cgo_export.c > clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments > -fmessage-length=0 -fno-common -I $WORK/qpid.apache.org/internal/_obj/ > -I/usr/local/include -o $WORK/qpid.apache.org/internal/_obj/error.cgo2.o -c > $WORK/qpid.apache.org/internal/_obj/error.cgo2.c > clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments > -fmessage-length=0 -fno-common -o $WORK/qpid.apache.org/internal/_obj/_cgo_.o > $WORK/qpid.apache.org/internal/_obj/_cgo_main.o > $WORK/qpid.apache.org/internal/_obj/_cgo_export.o > $WORK/qpid.apache.org/internal/_obj/error.cgo2.o -L/usr/local/lib64 > -lqpid-proton > /usr/local/go/pkg/tool/darwin_amd64/cgo -objdir > $WORK/qpid.apache.org/internal/_obj/ -dynpackage internal -dynimport > $WORK/qpid.apache.org/internal/_obj/_cgo_.o -dynout > $WORK/qpid.apache.org/internal/_obj/_cgo_import.go > clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments > -fmessage-length=0 -fno-common -o $WORK/qpid.apache.org/internal/_obj/_all.o > $WORK/qpid.apache.org/internal/_obj/_cgo_export.o > $WORK/qpid.apache.org/internal/_obj/error.cgo2.o -L/usr/local/lib64 -Wl,-r > -nostdlib > /usr/local/go/pkg/tool/darwin_amd64/compile -o > $WORK/qpid.apache.org/internal.a -trimpath $WORK -p qpid.apache.org/internal > -buildid 3f8e9edb015b220e7f6ffa78aed6961d023b9276 -D > _/Users/roberto/Src/Go/src/qpid.apache.org/internal -I $WORK -pack > ./flexchannel.go ./safemap.go ./uuid.go > $WORK/qpid.apache.org/internal/_obj/_cgo_gotypes.go > $WORK/qpid.apache.org/internal/_obj/error.cgo1.go > $WORK/qpid.apache.org/internal/_obj/_cgo_import.go > pack r $WORK/qpid.apache.org/internal.a > $WORK/qpid.apache.org/internal/_obj/_all.o # internal > qpid.apache.org/amqp > mkdir -p $WORK/qpid.apache.org/amqp/_obj/ > cd /Users/roberto/Src/Go/src/qpid.apache.org/amqp > CGO_LDFLAGS="-L/usr/local/lib64" "-lqpid-proton" > /usr/local/go/pkg/tool/darwin_amd64/cgo -objdir > $WORK/qpid.apache.org/amqp/_obj/ -importpath qpid.apache.org/amqp -- -I > $WORK/qpid.apache.org/amqp/_obj/ -I/usr/local/include doc.go marshal.go > message.go types.go unmarshal.go url.go > # qpid.apache.org/amqp > could not determine kind of name for C.PN_INVALID > {code} > Messages are nearly identical when trying on FreeBSD. -- This message was sent by Atlassian JIRA (v6.3.4#6332)