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

Roy commented on THRIFT-1326:
-----------------------------

I faced this issue when doing a very standard install and wasted a lot of time 
trying to resolve. Steps to reproduce:

Download Ubuntu Server 10.04 LTS 64 bit
http://www.ubuntu.com/start-download?distro=server&bits=64&release=lts
Load in VM...

sudo apt-get upgrade
sudo apt-get install build-essential automake libtool pkg-config g++ 
sudo apt-get install php5 php5-cli php5-dev python python-dev ant openjdk-6-jdk 
bjam
sudo apt-get install libboost-all-dev libevent-dev flex bison git-core

git clone git://git.apache.org/thrift.git
cd thrift 

./bootstrap.sh
./configure
make
sudo make install

cd contrib/fb303
./bootstrap.sh
./configure
make


The above resulted in the following errors (adding for search index to help 
others find this ticket):
TTransport.h error expected constructor, destructor, or type conversion before 
readAll
TProtocol.h error âuint32_tâ does not name a type <--not sure whats up with the 
charset issue
TProtocol.h error uint32_t does not name a type
FacebookService.cpp uint32_t was not declared in this scope


SOLUTION:
sudo nano /usr/local/include/thrift/Thrift.h
Added the following at the bottom of the includes:
#include <inttypes.h>
#include <netinet/in.h>

I see the two #ifdef conditions which should be loading these but there seems 
to be some sort of issue apparently.

                
> on some platforms, #include <stdint.h> is necessary to be included in Thrift.h
> ------------------------------------------------------------------------------
>
>                 Key: THRIFT-1326
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1326
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.7
>         Environment: Mac OSX 10.6.8 / x86_64 / GCC 4.6.1 for building thrift 
> and server code generated by thrift
>            Reporter: Philippe STRAUSS
>            Assignee: Jake Farrell
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> building server code generated by thrift, I needed to add #include <stdint.h> 
> in main Thrift.h to prevent an "error: uint32_t does not define a type" 
> error. Maybe it does not show on linux, or with earlier GCC.
> Maybe there is a better place than the main Thrift.h for thins #include 
> <stdint.h>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to