You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mario Emmenlauer (Jira)" <ji...@apache.org> on 2022/08/25 09:45:00 UTC

[jira] [Commented] (THRIFT-5613) ::realloc has not been declared

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

Mario Emmenlauer commented on THRIFT-5613:
------------------------------------------

Well the error seems to be in the headers of the compiler, which is at least a bit surprising. Without looking further, I would guess there is nothing simple that people could do to thrift to help here. A better source of help may be StackOverflow...

> ::realloc has not been declared
> -------------------------------
>
>                 Key: THRIFT-5613
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5613
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler
>    Affects Versions: 0.16.0
>            Reporter: chendan
>            Priority: Major
>
> I want to compile thrift for arm by my company's cross compiler.
> After running bootstrap and configure with proper parameters, then run make. An error occured:
> make[4]: Entering directory `/root/build/thrift-0.16.0/lib/cpp'
> depbase=`echo src/thrift/TApplicationException.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
> /bin/sh ../../libtool  --tag=CXX   --mode=compile aarch64-kedacom-linux-gnu-g++ -std=c++11 -DHAVE_CONFIG_H     -I./src -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -march=armv8-a -Wall -Wextra -pedantic -march=armv8-a -MT src/thrift/TApplicationException.lo -MD -MP -MF $depbase.Tpo -c -o src/thrift/TApplicationException.lo src/thrift/TApplicationException.cpp &&\
> mv -f $depbase.Tpo $depbase.Plo
> libtool: compile:  aarch64-kedacom-linux-gnu-g++ -std=c++11 -DHAVE_CONFIG_H -I./src -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -march=armv8-a -Wall -Wextra -pedantic -march=armv8-a -MT src/thrift/TApplicationException.lo -MD -MP -MF src/thrift/.deps/TApplicationException.Tpo -c src/thrift/TApplicationException.cpp  -fPIC -DPIC -o src/thrift/.libs/TApplicationException.o
> In file included from /opt/aarch64-kedacom-linux/aarch64-kedacom-linux-gnu/include/c++/8.3.0/ext/string_conversions.h:41,
>                  from /opt/aarch64-kedacom-linux/aarch64-kedacom-linux-gnu/include/c++/8.3.0/bits/basic_string.h:6400,
>                  from /opt/aarch64-kedacom-linux/aarch64-kedacom-linux-gnu/include/c++/8.3.0/string:52,
>                  from ./src/thrift/Thrift.h:37,
>                  from ./src/thrift/TApplicationException.h:23,
>                  from src/thrift/TApplicationException.cpp:20:
> /opt/aarch64-kedacom-linux/aarch64-kedacom-linux-gnu/include/c++/8.3.0/cstdlib:164:11: error: ‘::realloc’ has not been declared
>    using ::realloc;
>            ^~~~~~~
> make[4]: *** [src/thrift/TApplicationException.lo] Error 1
> make[4]: Leaving directory `/root/build/thrift-0.16.0/lib/cpp'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/root/build/thrift-0.16.0/lib/cpp'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/root/build/thrift-0.16.0/lib'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/root/build/thrift-0.16.0'
> make: *** [all] Error 2
>  
> How to solve it?
> Some people show the solution below. But that's for version 0.9.0. Not suitable for 0.16.0 as no such lines in config.h.
> To delete two lines in config.h:
> *#define {color:#3333ff}malloc {color}rpl_malloc*
> *#define realloc rpl_realloc*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)