build folly master on mac

1. build tutorial from github

You may also use folly/build/bootstrap-osx-homebrew.sh
to build against master:
cd folly 
./build/bootstrap-osx-homebrew.sh 
make 
make check

2. but it never worked out

I've met several errors when compile folly.
First, compile complain about not finding preadv and pwritev, here is the trick to bypass this error:
1) edit file config.h.in
2) find lines that #undef HAS_PREADV and #undef HAS_PWRITEV
3) comment both of them and add lines:
#define HAS_PREADV 0
#define HAS_PWRITEV 0
Second, I got compilation error as '#error "SSE4.2 instruction set not enabled"', this problem is solved by add -msse4.2 cppflags as

./configure CPPFLAGS="-msse4.2"

Finally, 'make' seems success, but 'make check' failed.
Anyway, the compilation is done.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容