Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac, iOS, and Ubuntu no longer can build #887

Closed
mobileben opened this issue Oct 7, 2018 · 4 comments
Closed

Mac, iOS, and Ubuntu no longer can build #887

mobileben opened this issue Oct 7, 2018 · 4 comments

Comments

@mobileben
Copy link
Contributor

I'm sorting through this right now. But there are a slew of errors now on compiling either iOS or Mac using Xcode 10.

Here are a few examples before the compiler gives up.

Release/include/cpprest/http_headers.h:222:25: error: no member named 'bind_impl' in namespace 'web::details'
        return details::bind_impl(iter->second, value) || iter->second.empty();

Release/include/cpprest/http_compression.h:99:13: error: 'const' type qualifier on return type has no effect
      [-Werror,-Wignored-qualifiers]
    virtual const uint16_t weight() const = 0;

Release/include/cpprest/http_compression.h:120:45: error: ISO C++11 does not allow conversion from string literal to
      'utility::char_t *const' (aka 'char *const') [-Werror,-Wwritable-strings]
constexpr utility::char_t *GZIP = _XPLATSTR("gzip");

Release/include/cpprest/http_compression.h:121:48: error: ISO C++11 does not allow conversion from string literal to
      'utility::char_t *const' (aka 'char *const') [-Werror,-Wwritable-strings]
constexpr utility::char_t *DEFLATE = _XPLATSTR("deflate");

Release/include/cpprest/http_compression.h:122:47: error: ISO C++11 does not allow conversion from string literal to
      'utility::char_t *const' (aka 'char *const') [-Werror,-Wwritable-strings]
constexpr utility::char_t *BROTLI = _XPLATSTR("br");
@mobileben
Copy link
Contributor Author

mobileben commented Oct 7, 2018

Next set of errors

/Release/src/http/common/../common/internal_http_helpers.h:37:20: error: extra qualification on member
      'decompress_factory' [-Werror,-Wextra-qualification]
class compression::decompress_factory;

Release/src/http/common/../common/internal_http_helpers.h:37:7: error: forward declaration of class cannot have a nested
      name specifier
class compression::decompress_factory;

Release/src/http/common/http_compression.cpp:159:24: error: missing field 'avail_in' initializer
      [-Werror,-Wmissing-field-initializers]
    z_stream m_stream{0};

Release/src/http/common/http_compression.cpp:266:24: error: missing field 'avail_in' initializer
      [-Werror,-Wmissing-field-initializers]
    z_stream m_stream{0};

Release/src/http/common/http_compression.cpp:286:24: error: extra qualification on member 'gzip_decompressor'
    gzip_decompressor::gzip_decompressor() : zlib_decompressor_base(16) // gzip auto-detect

Release/src/http/common/http_compression.cpp:637:81: error: no template named 'make_unique' in namespace 'std'; did you
      mean 'utility::details::make_unique'?
           algorithm::GZIP, []() -> std::unique_ptr<compress_provider> { return std::make_unique<gzip_compressor>(); }),

Release/include/cpprest/asyncrt_utils.h:405:28: note: 'utility::details::make_unique' declared here
    std::unique_ptr<_Type> make_unique() {

Release/src/http/common/http_compression.cpp:640:64: error: no template named 'make_unique' in namespace 'std'; did you
      mean 'utility::details::make_unique'?
           []() -> std::unique_ptr<compress_provider> { return std::make_unique<deflate_compressor>(); }),

Release/src/http/common/http_compression.cpp:954:16: error: moving a local object in a return statement prevents copy
      elision [-Werror,-Wpessimizing-move]
        return std::move(compressor);

Release/src/http/common/http_compression.cpp:1087:9: error: expected '(' after 'for'
    for each (auto& factory in f)

Release/tests/functional/http/client/compression_tests.cpp:205:9: error: no type named 'task_group_status' in namespace
      'Concurrency'; did you mean 'pplx::task_group_status'?
        Concurrency::task_group_status result;

It looks like cdc2948 and 982793d are the commits that have resulted in these issues.

@mobileben
Copy link
Contributor Author

PR request for this is here #888

@mobileben mobileben changed the title Mac and iOS no longer can build Mac, iOS, and Ubuntu no longer can build Oct 7, 2018
@mobileben
Copy link
Contributor Author

mobileben commented Oct 7, 2018

I just tried to build on Ubuntu and it fails as well with the same errors using master. I'm currently rebuilding using my PR.

Ubuntu doesn't seem free in the clear either

Scanning dependencies of target cpprest
[  3%] Building CXX object src/CMakeFiles/cpprest.dir/http/client/http_client.cpp.o
In file included from /downloads/cpprestsdk/Release/include/cpprest/http_msg.h:29:0,
                 from /downloads/cpprestsdk/Release/src/pch/stdafx.h:117,
                 from /downloads/cpprestsdk/Release/src/http/client/http_client.cpp:16:
/downloads/cpprestsdk/Release/include/cpprest/http_compression.h:132:2: error: extra ‘;’ [-Werror=pedantic]
 };
  ^

/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:751:61: error: unused parameter ‘compressionLevel’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_gzip_compressor(int compressionLevel, int method, int strategy, int memLevel)

/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:751:83: error: unused parameter ‘method’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_gzip_compressor(int compressionLevel, int method, int strategy, int memLevel)
                                                                                   ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:751:95: error: unused parameter ‘strategy’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_gzip_compressor(int compressionLevel, int method, int strategy, int memLevel)
                                                                                               ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:751:109: error: unused parameter ‘memLevel’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_gzip_compressor(int compressionLevel, int method, int strategy, int memLevel)
                                                                                                             ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:760:64: error: unused parameter ‘compressionLevel’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_deflate_compressor(int compressionLevel, int method, int strategy, int memLevel)
                                                                ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:760:86: error: unused parameter ‘method’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_deflate_compressor(int compressionLevel, int method, int strategy, int memLevel)
                                                                                      ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:760:98: error: unused parameter ‘strategy’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_deflate_compressor(int compressionLevel, int method, int strategy, int memLevel)
                                                                                                  ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:760:112: error: unused parameter ‘memLevel’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_deflate_compressor(int compressionLevel, int method, int strategy, int memLevel)
                                                                                                                ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:769:68: error: unused parameter ‘window’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_brotli_compressor(uint32_t window, uint32_t quality, uint32_t mode)
                                                                    ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:769:85: error: unused parameter ‘quality’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_brotli_compressor(uint32_t window, uint32_t quality, uint32_t mode)
                                                                                     ^
/downloads/cpprestsdk/Release/src/http/common/http_compression.cpp:769:103: error: unused parameter ‘mode’ [-Werror=unused-parameter]
 std::unique_ptr<compress_provider> make_brotli_compressor(uint32_t window, uint32_t quality, uint32_t mode)

cc1plus: error: unrecognized command line option ‘-Wno-format-truncation’ [-Werror]
cc1plus: all warnings being treated as errors

@BillyONeal
Copy link
Member

Looks fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants