Tôi muốn xây dựng các thư viện http của Proxygen C++ http trên github với Ubuntu 16.04. Dưới đây là môi trường để tôi thiết lập cùng với lệnh deps.sh để cài đặt phụ thuộc:Xây dựng Proxygen trong Ubuntu 16.04
gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
export CPPFLAGS="-std=c++14"
export CXXFLAGS="-std=c++14"
git clone [email protected]:facebook/proxygen.git
cd proxygen/proxygen && ./deps.sh
Đó đã cho tôi hầu hết các cách thông qua việc xây dựng phụ thuộc sự điên rồ của nó, nhưng tôi nhận được một lỗi loại không đầy đủ:
libtool: compile: g++ -DHAVE_CONFIG_H -I./.. -pthread -I/usr/include -std=c++14 -std=gnu++1y -std=c++14 -MT io/async/AsyncPipe.lo -MD -MP -MF io/async/.deps/AsyncPipe.Tpo -c io/async/AsyncPipe.cpp -fPIC -DPIC -o io/async/.libs/AsyncPipe.o
In file included from /usr/include/c++/5/bits/move.h:57:0,
from /usr/include/c++/5/bits/stl_pair.h:59,
from /usr/include/c++/5/utility:70,
from /usr/include/c++/5/algorithm:60,
from ./../folly/Conv.h:26,
from Conv.cpp:16:
/usr/include/c++/5/type_traits: In instantiation of ‘struct std::make_unsigned<__int128>’:
Conv.cpp:528:52: required from ‘folly::detail::ConversionResult<T> folly::detail::digits_to(const char*, const char*) [with Tgt = __int128]’
Conv.cpp:658:16: required from here
/usr/include/c++/5/type_traits:1757:62: error: invalid use of incomplete type ‘class std::__make_unsigned_selector<__int128, false, false>’
{ typedef typename __make_unsigned_selector<_Tp>::__type type; };
^
/usr/include/c++/5/type_traits:1721:11: note: declaration of ‘class std::__make_unsigned_selector<__int128, false, false>’
class __make_unsigned_selector;
^
/usr/include/c++/5/type_traits: In instantiation of ‘struct std::make_unsigned<__int128 unsigned>’:
Conv.cpp:528:52: required from ‘folly::detail::ConversionResult<T> folly::detail::digits_to(const char*, const char*) [with Tgt = __int128 unsigned]’
Conv.cpp:661:16: required from here
Có ai đã thử hoặc giải quyết vấn đề này không? Tôi chưa quen với cơ sở mã. Tia.
FYI phiên bản nâng cấp được đưa vào bởi Ubuntu 16.04 là 1.58.0. – moodboom
Tùy chọn trình biên dịch của bạn bây giờ trông giống như "-std = C++ 14 -std = gnu ++ 1y -std = C++ 14". Nếu bạn cố gắng để biên dịch mã như thế này: #include int main() { \t auto a = std :: make_unsigned <__int128>(); } bạn sẽ thất bại, vì tùy chọn biên dịch. Chỉ cần xóa CPPFLAGS, CXXFLAGS. –
vadikrobot
Cảm ơn @vadikrobot. Tôi không có [gnu ++ 1y], đó là lý do tại sao tôi đã thử C++ 14. – moodboom