chendan created THRIFT-5614: ------------------------------- Summary: invalid conversion from ‘char*’ to ‘int’ in TOutput.cpp Key: THRIFT-5614 URL: https://issues.apache.org/jira/browse/THRIFT-5614 Project: Thrift Issue Type: Bug Components: C++ - Compiler Affects Versions: 0.16.0 Reporter: chendan
I want to cross compile thrift 0.16.0 for arm. After running bootstrap and configure with proper parameters, I run make. An error occured: Making all in cpp make[3]: Entering directory `/root/build/thrift-0.16.0/lib/cpp' Making all in . 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 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 -o src/thrift/TApplicationException.o >/dev/null 2>&1 depbase=`echo src/thrift/TOutput.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/TOutput.lo -MD -MP -MF $depbase.Tpo -c -o src/thrift/TOutput.lo src/thrift/TOutput.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/TOutput.lo -MD -MP -MF src/thrift/.deps/TOutput.Tpo -c src/thrift/TOutput.cpp -fPIC -DPIC -o src/thrift/.libs/TOutput.o src/thrift/TOutput.cpp: In static member function ‘static std::__cxx11::string apache::thrift::TOutput::strerror_s(int)’: src/thrift/TOutput.cpp:115:22: error: invalid conversion from ‘char*’ to ‘int’ [-fpermissive] int rv = strerror_r(errno_copy, b_errbuf, sizeof(b_errbuf)); ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[4]: *** [src/thrift/TOutput.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? -- This message was sent by Atlassian Jira (v8.20.10#820010)