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

Aurélien Revol commented on THRIFT-582:
---------------------------------------

Hi,

bq. compiles on Snow Leopard, CentOS 5 and MinGW in WinXP

Is the official thrift-0.6.1 version of the c_glib still compatible with MinGW?

Under WinXP, MSys 1.0 with MinGW (GCC 3.4.5) and GTK+ 2.16, I do get
{code}
./configure --with-java=no --with-ruby=no --with-python=no --with-php=no 
--with-perl=no --with-cpp=no --with-c_glib=yes
{code}
to work OK ( {{Building C (GLib) Library .... : yes}} ); however compilation 
fails. As I do:
{code}
cd lib/c_glib ; make
{code}
gcc returns the following errors:
{code}
 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -g -Wall -W -Werror -Isrc -mms-bitfields 
-Ic:/GTK_2.16/include/glib-2.0 -Ic:/GTK_2.16/lib/glib-2.0/include -MT 
libthrift_c_glib_la-thrift_transport_factory.lo -MD -MP -MF 
.deps/libthrift_c_glib_la-thrift_transport_factory.Tpo -c 
src/transport/thrift_transport_factory.c  -DDLL_EXPORT -DPIC -o 
.libs/libthrift_c_glib_la-thrift_transport_factory.o
src/transport/thrift_socket.c:21:19: netdb.h: No such file or directory
src/transport/thrift_socket.c: In function `thrift_socket_open':
src/transport/thrift_socket.c:56: error: storage size of 'pin' isn't known
src/transport/thrift_socket.c:62: warning: implicit declaration of function 
`gethostbyname'
src/transport/thrift_socket.c:62: warning: assignment makes pointer from 
integer without a cast
src/transport/thrift_socket.c:68: warning: implicit declaration of function 
`hstrerror'
src/transport/thrift_socket.c:68: error: `h_errno' undeclared (first use in 
this function)
src/transport/thrift_socket.c:68: error: (Each undeclared identifier is 
reported only once
src/transport/thrift_socket.c:68: error: for each function it appears in.)
src/transport/thrift_socket.c:68: warning: format argument is not a pointer 
(arg 7)
src/transport/thrift_socket.c:74: error: `AF_INET' undeclared (first use in 
this function)
src/transport/thrift_socket.c:75: error: dereferencing pointer to incomplete 
type
src/transport/thrift_socket.c:76: warning: implicit declaration of function 
`htons'
src/transport/thrift_socket.c:79: warning: implicit declaration of function 
`socket'
src/transport/thrift_socket.c:79: error: `SOCK_STREAM' undeclared (first use in 
this function)
src/transport/thrift_socket.c:89: warning: implicit declaration of function 
`connect'
src/transport/thrift_socket.c:56: warning: unused variable `pin'
src/transport/thrift_socket.c: In function `thrift_socket_read':
src/transport/thrift_socket.c:130: warning: implicit declaration of function 
`recv'
src/transport/thrift_socket.c: In function `thrift_socket_write':
src/transport/thrift_socket.c:168: warning: implicit declaration of function 
`send'
make[1]: *** [libthrift_c_glib_la-thrift_socket.lo] Error 1
{code}

Indeed I wonder how code looking for {{netdb.h}} could ever be compiled against 
the bare WIN32 platform (and for me Cygwin is not an option).

Thanks for any help.

> C implementation of Thrift
> --------------------------
>
>                 Key: THRIFT-582
>                 URL: https://issues.apache.org/jira/browse/THRIFT-582
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C glib - Compiler, C glib - Library
>            Reporter: David Reiss
>            Assignee: Anatol Pomozov
>            Priority: Minor
>             Fix For: 0.6
>
>         Attachments: c_glib_bindings.patch, t_c_generator.cc, 
> thrift_582_c_glib_bindings.patch, thrift_582_c_glib_bindings_20100927.patch, 
> thrift_582_c_glib_bindings_20101012.patch, 
> thrift_582_c_glib_bindings_20101026.patch
>
>
> Create a usable implementation of Thrift that uses only C at runtime, no C++. 
>  The code is at 
> http://svn.apache.org/repos/asf/incubator/thrift/branches/c-bindings/.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to