c++ rest sdk ninja 빌드 실패 질문
글쓴이: choijuo / 작성시간: 화, 2021/01/05 - 1:39오후
https://github.com/microsoft/cpprestsdk/wiki/How-to-build-for-Linux
우분투 18.04 에서 위 링크 설명을 통해서 c++ rest sdk 를 설치하고
링크의 4번항목의
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug
ninja 이 명령을 수행하는데 에러가나네요..
ninja 딱 입력 하면 해당 에러가 뜨는데 이게 도대체 뭐때문에 나는건지 모르겠어여 ㅠ
[3/160] Building CXX object Release/src/CMakeFiles/cpprest.dir/http/common/http_compression.cpp.o FAILED: Release/src/CMakeFiles/cpprest.dir/http/common/http_compression.cpp.o /usr/bin/g++-4.8 -DCPPREST_EXCLUDE_BROTLI=1 -DCPPREST_FORCE_HTTP_CLIENT_ASIO -DCPPREST_FORCE_HTTP_LISTENER_ASIO -DCPPREST_NO_SSL_LEAK_SUPPRESS -Dcpprest_EXPORTS -I../Release/include -I../Release/src/pch -std=c++11 -fno-strict-aliasing -fPIC -Werror -pedantic -Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code -MD -MT Release/src/CMakeFiles/cpprest.dir/http/common/http_compression.cpp.o -MF Release/src/CMakeFiles/cpprest.dir/http/common/http_compression.cpp.o.d -o Release/src/CMakeFiles/cpprest.dir/http/common/http_compression.cpp.o -c ../Release/src/http/common/http_compression.cpp ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::next_in’ [-Werror=missing-field-initializers] z_stream m_stream {}; ^ ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::avail_in’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::total_in’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::next_out’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::avail_out’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::total_out’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::msg’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::state’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::zalloc’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::zfree’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::opaque’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::data_type’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::adler’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:149:24: error: missing initializer for member ‘z_stream_s::reserved’ [-Werror=missing-field-initializers] ../Release/src/http/common/http_compression.cpp:251:24: error: missing initializer for member ‘z_stream_s::next_in’ [-Werror=missing-field-initializers] z_stream m_stream {};
참고로 ninja 입력전에
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_C_COMPILER=gcc-4.8
입력하니까 다음과 같이 떠서 된걸로 보였는데 애초에 여기서 문제가 있는건가요?
-- The C compiler identification is GNU 4.8.5 -- The CXX compiler identification is GNU 4.8.5 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/gcc-4.8 - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++-4.8 - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Looking for include file xlocale.h -- Looking for include file xlocale.h - not found -- Setting gcc options -- Found websocketpp version 0.7.0 on system -- Found Boost: /usr/include (found version "1.65.1") found components: random system thread filesystem chrono atomic date_time regex -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Checking for one of the modules 'openssl' -- Performing Test _SSL_LEAK_SUPPRESS_AVAILABLE -- Performing Test _SSL_LEAK_SUPPRESS_AVAILABLE - Failed -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") -- Added test library httpclient_test -- Added test library httplistener_test -- Added test library json_test -- Added test library pplx_test -- Added test library streams_test -- Added test library uri_test -- Added test library utils_test -- Added test library websocketsclient_test -- Configuring done -- Generating done -- Build files have been written to: /home/agent/casablanca/build.debug
Forums:
컴파일 옵션에서 -Werror를 없애고 다시 빌드해
컴파일 옵션에서 -Werror를 없애고 다시 빌드해 보세요.
답글을 보기전에 그렇게 시도했었는데 해결되더라구용
답글을 보기전에 그렇게 시도했었는데 해결되더라구용
감사합니다
댓글 달기