Ollivier Robert created PROTON-1058:
---------------------------------------

             Summary: 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
            Reporter: Ollivier Robert
            Assignee: Alan Conway
            Priority: Blocker


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:

{{# qpid.apache.org/amqp
could not determine kind of name for C.PN_INVALID
}}


Here is the complete build messages:
{{
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
}}

Messages are nearly identical when trying on FreeBSD.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to