[
https://issues.apache.org/jira/browse/THRIFT-2447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Simon South updated THRIFT-2447:
--------------------------------
Description:
I get this error while compiling:
{noformat}
undefined reference to `g_ptr_array_new_with_free_func'
{noformat}
Full error trace while compiling :
{noformat}
zipkin_core_types.c: In function ‘span_instance_init’:
zipkin_core_types.c:1105: warning: assignment makes pointer from integer
without a cast
zipkin_core_types.c:1107: warning: assignment makes pointer from integer
without a cast
/tmp/ccbPftLZ.o: In function `span_instance_init':
/etrade/home/asubram1/svn/call_tracing/SpanLoggerC/zipkin_core_types.c:1105:
undefined reference to `g_ptr_array_new_with_free_func'
/etrade/home/asubram1/svn/call_tracing/SpanLoggerC/zipkin_core_types.c:1107:
undefined reference to `g_ptr_array_new_with_free_func'
collect2: ld returned 1 exit status
{noformat}
compile command:
{noformat}
gcc -g -o main -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0/ -I
/usr/lib/glib/include/ -I/usr/local/include/thrift/
-I/usr/local/include/thrift/c_glib -I. -L/usr/local/lib/
-I/usr/lib/glib-2.0/include/ -lgobject-2.0 -lthrift main.c
zipkin_core_types.c SpanLoggerC.c -lthrift_c_glib -lglib
{noformat}
I used this thrift files:
https://github.com/twitter/zipkin/blob/master/zipkin-thrift/src/main/resources/thrift/zipkinCore.thrift
My SpanLogger.c file:
{noformat}
#include "zipkin_core_types.h"
#include "SpanLoggerC.h"
void genLogfile(Span span, char *filename) {
}
main.c file:
#include"SpanLoggerC.h"
void main() {
}
{noformat}
SpanLogger.h file:
{noformat}
#include "zipkin_core_types.h"
#include "stdio.h"
#include "stdlib.h"
#ifndef SPANLOGGERCH
#define SPANLOGGERCH
void genLogfile(Span span, char *filename);
#endif
{noformat}
glib and glibc packages:
{noformat}
> sudo yum install glib
Excluding Packages from BASE-centos5-x86_64
Finished
Setting up Install Process
Package 1:glib-1.2.10-20.el5.x86_64 already installed and latest version
Package 1:glib-1.2.10-20.el5.i386 already installed and latest version
Nothing to do
> sudo yum install glibc
Excluding Packages from BASE-centos5-x86_64
Finished
Setting up Install Process
Package glibc-2.5-107.el5_9.5.x86_64 already installed and latest version
Package glibc-2.5-107.el5_9.5.i686 already installed and latest version
Nothing to do
{noformat}
was:
I get this error while compiling:
undefined reference to `g_ptr_array_new_with_free_func'
Full error trace while compiling :
zipkin_core_types.c: In function ‘span_instance_init’:
zipkin_core_types.c:1105: warning: assignment makes pointer from integer
without a cast
zipkin_core_types.c:1107: warning: assignment makes pointer from integer
without a cast
/tmp/ccbPftLZ.o: In function `span_instance_init':
/etrade/home/asubram1/svn/call_tracing/SpanLoggerC/zipkin_core_types.c:1105:
undefined reference to `g_ptr_array_new_with_free_func'
/etrade/home/asubram1/svn/call_tracing/SpanLoggerC/zipkin_core_types.c:1107:
undefined reference to `g_ptr_array_new_with_free_func'
collect2: ld returned 1 exit status
compile command:
gcc -g -o main -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0/ -I
/usr/lib/glib/include/ -I/usr/local/include/thrift/
-I/usr/local/include/thrift/c_glib -I. -L/usr/local/lib/
-I/usr/lib/glib-2.0/include/ -lgobject-2.0 -lthrift main.c
zipkin_core_types.c SpanLoggerC.c -lthrift_c_glib -lglib
I used this thrift files:
https://github.com/twitter/zipkin/blob/master/zipkin-thrift/src/main/resources/thrift/zipkinCore.thrift
My SpanLogger.c file:
#include "zipkin_core_types.h"
#include "SpanLoggerC.h"
void genLogfile(Span span, char *filename) {
}
main.c file:
#include"SpanLoggerC.h"
void main() {
}
SpanLogger.h file:
#include "zipkin_core_types.h"
#include "stdio.h"
#include "stdlib.h"
#ifndef SPANLOGGERCH
#define SPANLOGGERCH
void genLogfile(Span span, char *filename);
#endif
glib and glibc packages:
> sudo yum install glib
Excluding Packages from BASE-centos5-x86_64
Finished
Setting up Install Process
Package 1:glib-1.2.10-20.el5.x86_64 already installed and latest version
Package 1:glib-1.2.10-20.el5.i386 already installed and latest version
Nothing to do
> sudo yum install glibc
Excluding Packages from BASE-centos5-x86_64
Finished
Setting up Install Process
Package glibc-2.5-107.el5_9.5.x86_64 already installed and latest version
Package glibc-2.5-107.el5_9.5.i686 already installed and latest version
Nothing to do
> Unable to compile thrift files - C Glib
> ---------------------------------------
>
> Key: THRIFT-2447
> URL: https://issues.apache.org/jira/browse/THRIFT-2447
> Project: Thrift
> Issue Type: Bug
> Environment: centos
> Reporter: Arun
> Attachments: install-centos.txt
>
>
> I get this error while compiling:
> {noformat}
> undefined reference to `g_ptr_array_new_with_free_func'
> {noformat}
> Full error trace while compiling :
> {noformat}
> zipkin_core_types.c: In function ‘span_instance_init’:
> zipkin_core_types.c:1105: warning: assignment makes pointer from integer
> without a cast
> zipkin_core_types.c:1107: warning: assignment makes pointer from integer
> without a cast
> /tmp/ccbPftLZ.o: In function `span_instance_init':
> /etrade/home/asubram1/svn/call_tracing/SpanLoggerC/zipkin_core_types.c:1105:
> undefined reference to `g_ptr_array_new_with_free_func'
> /etrade/home/asubram1/svn/call_tracing/SpanLoggerC/zipkin_core_types.c:1107:
> undefined reference to `g_ptr_array_new_with_free_func'
> collect2: ld returned 1 exit status
> {noformat}
> compile command:
> {noformat}
> gcc -g -o main -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0/ -I
> /usr/lib/glib/include/ -I/usr/local/include/thrift/
> -I/usr/local/include/thrift/c_glib -I. -L/usr/local/lib/
> -I/usr/lib/glib-2.0/include/ -lgobject-2.0 -lthrift main.c
> zipkin_core_types.c SpanLoggerC.c -lthrift_c_glib -lglib
> {noformat}
> I used this thrift files:
> https://github.com/twitter/zipkin/blob/master/zipkin-thrift/src/main/resources/thrift/zipkinCore.thrift
> My SpanLogger.c file:
> {noformat}
> #include "zipkin_core_types.h"
> #include "SpanLoggerC.h"
> void genLogfile(Span span, char *filename) {
> }
> main.c file:
> #include"SpanLoggerC.h"
> void main() {
> }
> {noformat}
> SpanLogger.h file:
> {noformat}
> #include "zipkin_core_types.h"
> #include "stdio.h"
> #include "stdlib.h"
> #ifndef SPANLOGGERCH
> #define SPANLOGGERCH
> void genLogfile(Span span, char *filename);
> #endif
> {noformat}
> glib and glibc packages:
> {noformat}
> > sudo yum install glib
> Excluding Packages from BASE-centos5-x86_64
> Finished
> Setting up Install Process
> Package 1:glib-1.2.10-20.el5.x86_64 already installed and latest version
> Package 1:glib-1.2.10-20.el5.i386 already installed and latest version
> Nothing to do
> > sudo yum install glibc
> Excluding Packages from BASE-centos5-x86_64
> Finished
> Setting up Install Process
> Package glibc-2.5-107.el5_9.5.x86_64 already installed and latest version
> Package glibc-2.5-107.el5_9.5.i686 already installed and latest version
> Nothing to do
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)