Building Folly v35 with GCC 5.0.X toolchain

313 views
Skip to first unread message

Roland Hilkinger

unread,
Apr 17, 2015, 9:55:20 AM4/17/15
to faceboo...@googlegroups.com
Howdy, 

with:

$ rpm -q boost
boost-1.57.0-4.fc22.x86_64
$ rpm -q gcc-c++
gcc-c++-5.0.1-0.1.fc22.x86_64

a kinda bug report. I had to add the '-fpermissive'  flag  in order to build all the  'make check' targets. E.g.  below worked

./configure  CXXFLAGS='-O3 -march=native -fpermissive'  && make check

to prevent a bunch of errors as:

/bin/sh ../libtool  --tag=CXX   --mode=link g++  -std=gnu++0x -O3 -march=native -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread  -o benchmark_test BenchmarkTest.o libgtestmain.la ../libfollybenchmark.la ../libfolly.la -llzma -lz -liberty -ljemalloc -levent -ldouble-conversion -lssl -lgflags -lglog
libtool: link: g++ -std=gnu++0x -O3 -march=native -o .libs/benchmark_test BenchmarkTest.o  ./.libs/libgtestmain.a ../.libs/libfollybenchmark.so /usr/local/src/CPP/folly/folly/.libs/libfolly.so ../.libs/libfolly.so -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -llzma -lz -liberty -ljemalloc -levent -ldouble-conversion -lssl -lgflags -lglog -Wl,-rpath -Wl,/usr/local/lib
/usr/local/src/CPP/folly/folly/.libs/libfolly.so: undefined reference to `jump_fcontext'

The culprit is in the config.log and explains why libboost_context didn't get linked in:

configure:16834: checking whether the Boost::Context library is available
configure:16858: g++ -c -std=gnu++0x -O3 -march=native  -I/usr/include conftest.cpp >&5
conftest.cpp: In function 'int main()':
conftest.cpp:32:63: error: invalid conversion from 'boost::context::fcontext_t {aka void*}' to 'void**' [-fpermissive]
 boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);
                                                                                                 ^
configure:16858: $? = 1

Note: Above errors did not happen with the GCC 4.9.2 toolchain. Hope this helps to fix it.

-Roland

Nhật Tân Mai

unread,
May 11, 2015, 11:27:52 PM5/11/15
to faceboo...@googlegroups.com
I have same error? Somebody help me? Thanks 
Reply all
Reply to author
Forward
0 new messages