thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Reiss <dre...@facebook.com>
Subject Re: trunk revision 753622 build error
Date Wed, 18 Mar 2009 22:09:18 GMT
This is pretty odd.  It looks like the line in cstdlib that
imports "malloc" into the std namespace is causing an error
because malloc has not been declared.  But malloc should
be declared in stdlib.h, which should be included by cstdlib.
Can you try compiling a file containing only...

#include <cstdlib>

with the command "g++ -c -Wall test.cc"?  If that doesn't work,
you definitely have something wronte with your libc or libstdc++
installation.  If it does, I'm not sure what the problem is.

--David



xu xiong wrote:
> After upgrading some packages
> (http://wiki.apache.org/thrift/ThriftInstallationWin32, I could not
> find out where the linux installation requirement is ), I finally came
> to the make stage, but there are still errors.
> 
> Please point out what I got wrong.
> 
> make[3]: Entering directory `/home/gsta/thrift/lib/cpp'
> /bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H
> -I. -I../..  -I/usr/local/include/boost-1_38 -I./src  -Wall -g -O2 -MT
> Thrift.lo -MD -MP -MF .deps/Thrift.Tpo -c -o Thrift.lo `test -f
> 'src/Thrift.cpp' || echo './'`src/Thrift.cpp
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../..
> -I/usr/local/include/boost-1_38 -I./src -Wall -g -O2 -MT Thrift.lo -MD
> -MP -MF .deps/Thrift.Tpo -c src/Thrift.cpp  -fPIC -DPIC -o
> .libs/Thrift.o
> In file included from
> /usr/local/include/boost-1_38/boost/config/platform/linux.hpp:14,
>                  from /usr/local/include/boost-1_38/boost/config.hpp:53,
>                  from /usr/local/include/boost-1_38/boost/lexical_cast.hpp:23,
>                  from src/Thrift.cpp:9:
> /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/../../../../include/c++/4.3.3/cstdlib:124:
> error: �:malloc�has not been declared
> /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/../../../../include/c++/4.3.3/cstdlib:132:
> error: �:realloc�has not been declared
> src/Thrift.cpp: In member function ‘void
> apache::thrift::TOutput::printf(const char*, ...)�
> src/Thrift.cpp:33: error: ‘malloc�was not declared in this scope
> make[3]: *** [Thrift.lo] Error 1
> make[3]: Leaving directory `/home/gsta/thrift/lib/cpp'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/gsta/thrift/lib'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/gsta/thrift'
> make: *** [all] Error 2
> 
> 2009/3/15 David Reiss <dreiss@facebook.com>:
>>> Am I missing something?
>> No, these aren't fatal errors.  You can upgrade to a newer version
>> of automake if you want them to go away.
>>
>>> BTW, is there win32 compiler binary?
>> No.
>>
>> --David
>>

Mime
View raw message