[ 
https://issues.apache.org/jira/browse/PROTON-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15022495#comment-15022495
 ] 

Ollivier Robert commented on PROTON-1058:
-----------------------------------------

Thanks!  Build succeded on FreeBSD but is failing differently on OS X, maybe 
because different clang 3.3 vs 3.6 on OS X:

{code}
CGO_LDFLAGS="-L/usr/local/lib64" "-lqpid-proton" "-lqpid-proton" 
/usr/local/go/pkg/tool/darwin_amd64/cgo -objdir 
$WORK/qpid.apache.org/proton/_obj/ -importpath qpid.apache.org/proton -- -I 
$WORK/qpid.apache.org/proton/_obj/ -I/usr/local/include doc.go engine.go 
error.go handlers.go message.go wrappers.go wrappers_gen.go
# qpid.apache.org/proton
could not determine kind of name for C.PN_TRANSPORT_AUTHENTICATED
could not determine kind of name for C.pn_connection_get_user
could not determine kind of name for C.pn_connection_set_password
could not determine kind of name for C.pn_connection_set_user
could not determine kind of name for C.pn_delivery_current
could not determine kind of name for C.pn_session_get_outgoing_window
could not determine kind of name for C.pn_session_set_outgoing_window
could not determine kind of name for C.pn_transport_get_user
could not determine kind of name for C.pn_transport_is_authenticated
could not determine kind of name for C.pn_transport_is_encrypted
could not determine kind of name for C.pn_transport_require_auth
could not determine kind of name for C.pn_transport_require_encryption

clang errors for preamble:
In file included from ../proton/wrappers_gen.go:35:
/usr/local/include/proton/session.h:120:11: error: unknown type name 
'pn_error_t'
PN_EXTERN pn_error_t *pn_session_error(pn_session_t *session);
          ^
/usr/local/include/proton/session.h:138:11: error: unknown type name 
'pn_condition_t'; did you mean 'pn_connection_t'?
PN_EXTERN pn_condition_t *pn_session_condition(pn_session_t *session);
          ^
/usr/local/include/proton/types.h:113:32: note: 'pn_connection_t' declared here
typedef struct pn_connection_t pn_connection_t;
                               ^
In file included from ../proton/wrappers_gen.go:35:
/usr/local/include/proton/session.h:154:11: error: unknown type name 
'pn_condition_t'; did you mean 'pn_connection_t'?
PN_EXTERN pn_condition_t *pn_session_remote_condition(pn_session_t *session);
          ^
/usr/local/include/proton/types.h:113:32: note: 'pn_connection_t' declared here
typedef struct pn_connection_t pn_connection_t;
                               ^
3 errors generated.

731 [18:12] roberto@roberto-aw:qpid.apache.org/electron> cc -v
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
{code}


> 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)

Reply via email to