thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siamak Haschemi <hasch...@informatik.hu-berlin.de>
Subject Use Thrift in the OpenWRT platform
Date Tue, 21 Oct 2008 10:19:14 GMT
Hello,

as you seen here (https://issues.apache.org/jira/browse/THRIFT-177), I
am trying to cross-compile Thrift for the OpenWRT platform
(http://openwrt.org/), which is a Linux distribution for embedded devices.

After a two-night-fight, my result are the following:

- I've created a OpenWRT package for thrift (see the attachment if you
are interested).
- I've successfully compiled the cpp-library (which results in
libthrift, libthriftz and libthriftnb)
- For now, I will not cross-compile the thrift-compiler since I will
compile the thrift definition files on my PC.

Coming to this point, I was very happy and I thought that the story
ends, but now I am faced with a problem I cannot solve myself:

For testing my cross-compilation result, I cross-compiled the cpp-part
of the thrift tutorial. I installed the cross-compiled libraries on the
target device and start the CppServer and the only reaction was
"Segmentation Fault" :-(


I tried to backtrack the problem and I came to the finding, that a
simple hello world program, which is linked to my cross-compiled
thrift-library, causes the "Segmentation Fault". Without linking the
thrift-library, everything is O.K.


=======================
------------
Hello.cpp
------------

#include <iostream>

using namespace std;

int main(int argc, char **argv) {
  printf("Hello World!\n");
  return 0;
}

1) First try

$ i386-linux-uclibc-g++ -L${LIB_DIR} -levent *-lthrift* -o Hello Hello.cpp

On the target device:

root@OpenWrt:~# ./Hello
Segmentation fault

2) Second try

$ i386-linux-uclibc-g++ -L${LIB_DIR} -levent -o Hello Hello.cpp

On the target device:

root@OpenWrt:~# ./Hello
Hello World!

======================

I will try to debug it with gdb, but I'm not an expert in this.


So, please, can someone help me?



Kind regards,

Siamak Haschemi






Mime
View raw message