microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
7.99k stars 1.65k forks source link

Latest master does not build for ubuntu #908

Closed yaira24 closed 5 years ago

yaira24 commented 6 years ago

alon@viki:~/repos/casablanca/Release/build.debug$ make Scanning dependencies of target cpprest [ 1%] Building CXX object src/CMakeFiles/cpprest.dir/http/client/http_client.cpp.o In file included from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/eventfd_select_interrupter.hpp:80:0, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/select_interrupter.hpp:25, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/epoll_reactor.hpp:29, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/reactor.hpp:21, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/task_io_service.ipp:24, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/task_io_service.hpp:198, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/impl/io_service.hpp:71, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/io_service.hpp:767, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl/context.hpp:26, from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl.hpp:19, from /home/alon/repos/casablanca/Release/include/cpprest/http_client.h:53, from /home/alon/repos/casablanca/Release/src/pch/stdafx.h:104, from /home/alon/repos/casablanca/Release/src/http/client/http_client.cpp:16: /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/eventfd_select_interrupter.ipp: In member function ‘void boost::asio::detail::eventfd_select_interrupter::interrupt()’: /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/eventfd_select_interrupter.ipp:122:23: error: conversion to ‘int’ from ‘ssize_t {aka long int}’ may alter its value [-Werror=conversion] int result = ::write(writedescriptor, &counter, sizeof(uint64_t));


/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/eventfd_select_interrupter.ipp: In member function ‘bool boost::asio::detail::eventfd_select_interrupter::reset()’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/eventfd_select_interrupter.ipp:135:30: error: conversion to ‘int’ from ‘ssize_t {aka long int}’ may alter its value [-Werror=conversion]
       int bytes_read = ::read(read_descriptor_, &counter, sizeof(uint64_t));
                        ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/eventfd_select_interrupter.ipp:148:30: error: conversion to ‘int’ from ‘ssize_t {aka long int}’ may alter its value [-Werror=conversion]
       int bytes_read = ::read(read_descriptor_, data, sizeof(data));
                        ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/eventfd_select_interrupter.ipp:153:28: error: conversion to ‘int’ from ‘ssize_t {aka long int}’ may alter its value [-Werror=conversion]
         bytes_read = ::read(read_descriptor_, data, sizeof(data));
                      ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/epoll_reactor.hpp:248:0,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/reactor.hpp:21,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/task_io_service.ipp:24,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/task_io_service.hpp:198,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/impl/io_service.hpp:71,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/io_service.hpp:767,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl/context.hpp:26,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl.hpp:19,
                 from /home/alon/repos/casablanca/Release/include/cpprest/http_client.h:53,
                 from /home/alon/repos/casablanca/Release/src/pch/stdafx.h:104,
                 from /home/alon/repos/casablanca/Release/src/http/client/http_client.cpp:16:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/epoll_reactor.ipp: In member function ‘int boost::asio::detail::epoll_reactor::get_timeout()’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/epoll_reactor.ipp:605:42: error: conversion to ‘int’ from ‘long int’ may alter its value [-Werror=conversion]
   return timer_queues_.wait_duration_msec(5 * 60 * 1000);
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl/context.hpp:786:0,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl.hpp:19,
                 from /home/alon/repos/casablanca/Release/include/cpprest/http_client.h:53,
                 from /home/alon/repos/casablanca/Release/src/pch/stdafx.h:104,
                 from /home/alon/repos/casablanca/Release/src/http/client/http_client.cpp:16:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl/impl/context.ipp: In member function ‘boost::system::error_code boost::asio::ssl::context::use_certificate_chain(const boost::asio::const_buffer&, boost::system::error_code&)’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl/impl/context.ipp:757:35: error: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Werror=conversion]
     result = ::ERR_peek_last_error();
              ~~~~~~~~~~~~~~~~~~~~~^~
In file included from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/socket_ops.hpp:333:0,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ip/impl/address_v4.ipp:22,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ip/address_v4.hpp:240,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ip/address.hpp:21,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl/impl/rfc2818_verification.ipp:23,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl/rfc2818_verification.hpp:99,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/ssl.hpp:23,
                 from /home/alon/repos/casablanca/Release/include/cpprest/http_client.h:53,
                 from /home/alon/repos/casablanca/Release/src/pch/stdafx.h:104,
                 from /home/alon/repos/casablanca/Release/src/http/client/http_client.cpp:16:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp: In function ‘int boost::asio::detail::socket_ops::close(boost::asio::detail::socket_type, boost::asio::detail::socket_ops::state_type&, bool, boost::system::error_code&)’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp:345:17: error: conversion to ‘boost::asio::detail::socket_ops::state_type {aka unsigned char}’ from ‘int’ may alter its value [-Werror=conversion]
       state &= ~non_blocking;
                 ^~~~~~~~~~~~
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp: In function ‘bool boost::asio::detail::socket_ops::set_user_non_blocking(boost::asio::detail::socket_type, boost::asio::detail::socket_ops::state_type&, bool, boost::system::error_code&)’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp:397:63: error: conversion to ‘boost::asio::detail::socket_ops::state_type {aka unsigned char}’ from ‘int’ may alter its value [-Werror=conversion]
       state &= ~(user_set_non_blocking | internal_non_blocking);
                                                               ^
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp: In function ‘bool boost::asio::detail::socket_ops::set_internal_non_blocking(boost::asio::detail::socket_type, boost::asio::detail::socket_ops::state_type&, bool, boost::system::error_code&)’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp:446:17: error: conversion to ‘boost::asio::detail::socket_ops::state_type {aka unsigned char}’ from ‘int’ may alter its value [-Werror=conversion]
       state &= ~internal_non_blocking;
                 ^~~~~~~~~~~~~~~~~~~~~
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp: In function ‘int boost::asio::detail::socket_ops::setsockopt(boost::asio::detail::socket_type, boost::asio::detail::socket_ops::state_type&, int, int, const void*, std::size_t, boost::system::error_code&)’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp:1458:17: error: conversion to ‘boost::asio::detail::socket_ops::state_type {aka unsigned char}’ from ‘int’ may alter its value [-Werror=conversion]
       state &= ~enable_connection_aborted;
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp: In function ‘int boost::asio::detail::socket_ops::ioctl(boost::asio::detail::socket_type, boost::asio::detail::socket_ops::state_type&, int, boost::asio::detail::ioctl_arg_type*, boost::system::error_code&)’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp:1739:65: error: conversion to ‘boost::asio::detail::socket_ops::state_type {aka unsigned char}’ from ‘int’ may alter its value [-Werror=conversion]
         state &= ~(user_set_non_blocking | internal_non_blocking);
                                                                 ^
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp: In function ‘boost::system::error_code boost::asio::detail::socket_ops::getnameinfo(const socket_addr_type*, std::size_t, char*, std::size_t, char*, std::size_t, int, boost::system::error_code&)’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp:3356:79: error: conversion to ‘socklen_t {aka unsigned int}’ from ‘std::size_t {aka long unsigned int}’ may alter its value [-Werror=conversion]
   int error = ::getnameinfo(addr, addrlen, host, hostlen, serv, servlen, flags);
                                                                               ^
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp:3356:79: error: conversion to ‘socklen_t {aka unsigned int}’ from ‘std::size_t {aka long unsigned int}’ may alter its value [-Werror=conversion]
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/asio/detail/impl/socket_ops.ipp:3356:79: error: conversion to ‘socklen_t {aka unsigned int}’ from ‘std::size_t {aka long unsigned int}’ may alter its value [-Werror=conversion]
In file included from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/thread_time.hpp:10:0,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/lock_types.hpp:18,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/pthread/mutex.hpp:16,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/mutex.hpp:16,
                 from /home/alon/repos/casablanca/Release/src/pch/stdafx.h:62,
                 from /home/alon/repos/casablanca/Release/src/http/client/http_client.cpp:16:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/microsec_time_clock.hpp: In instantiation of ‘static time_type boost::date_time::microsec_clock<time_type>::create_time(boost::date_time::microsec_clock<time_type>::time_converter) [with time_type = boost::posix_time::ptime; boost::date_time::microsec_clock<time_type>::time_converter = tm* (*)(const long int*, tm*); time_t = long int]’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/microsec_time_clock.hpp:76:25:   required from ‘static time_type boost::date_time::microsec_clock<time_type>::universal_time() [with time_type = boost::posix_time::ptime]’
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/thread_time.hpp:22:63:   required from here
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/microsec_time_clock.hpp:86:36: error: conversion to ‘uint32_t {aka unsigned int}’ from ‘__suseconds_t {aka long int}’ may alter its value [-Werror=conversion]
       boost::uint32_t sub_sec = tv.tv_usec;
                                 ~~~^~~~~~~
In file included from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/adjust_functors.hpp:13:0,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/gregorian/greg_duration_types.hpp:15,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/gregorian/gregorian_types.hpp:22,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/posix_time/posix_time_config.hpp:18,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/posix_time/posix_time_system.hpp:13,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/posix_time/ptime.hpp:12,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/posix_time/posix_time_types.hpp:12,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/thread_time.hpp:11,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/lock_types.hpp:18,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/pthread/mutex.hpp:16,
                 from /home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/thread/mutex.hpp:16,
                 from /home/alon/repos/casablanca/Release/src/pch/stdafx.h:62,
                 from /home/alon/repos/casablanca/Release/src/http/client/http_client.cpp:16:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/wrapping_int.hpp: In instantiation of ‘IntT boost::date_time::wrapping_int2<int_type_, wrap_min, wrap_max>::calculate_wrap(IntT) [with IntT = short int; int_type_ = short int; int_type_ wrap_min = 1; int_type_ wrap_max = 12]’:
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/wrapping_int.hpp:126:35:   required from ‘IntT boost::date_time::wrapping_int2<int_type_, wrap_min, wrap_max>::add(IntT) [with IntT = short int; int_type_ = short int; int_type_ wrap_min = 1; int_type_ wrap_max = 12]’
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/adjust_functors.hpp:77:29:   required from ‘boost::date_time::month_functor<date_type>::duration_type boost::date_time::month_functor<date_type>::get_offset(const date_type&) const [with date_type = boost::gregorian::date; boost::date_time::month_functor<date_type>::duration_type = boost::gregorian::date_duration]’
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/date_duration_types.hpp:67:16:   required from ‘boost::date_time::months_duration<base_config>::duration_type boost::date_time::months_duration<base_config>::get_offset(const date_type&) const [with base_config = boost::gregorian::greg_durations_config; boost::date_time::months_duration<base_config>::duration_type = boost::gregorian::date_duration; boost::date_time::months_duration<base_config>::date_type = boost::gregorian::date]’
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/posix_time/date_duration_operators.hpp:33:37:   required from here
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/wrapping_int.hpp:151:14: error: conversion to ‘boost::date_time::wrapping_int2<short int, 1, 12>::int_type {aka short int}’ from ‘int’ may alter its value [-Werror=conversion]
       value_ -= (wrap_max - wrap_min + 1);
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alon/repos/voiceengine/voiceengine/voiceengine/boost_1_65_1/boost/date_time/wrapping_int.hpp:156:14: error: conversion to ‘boost::date_time::wrapping_int2<short int, 1, 12>::int_type {aka short int}’ from ‘int’ may alter its value [-Werror=conversion]
       value_ += (wrap_max - wrap_min + 1);
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-format-truncation’ [-Werror]
cc1plus: all warnings being treated as errors
src/CMakeFiles/cpprest.dir/build.make:62: recipe for target 'src/CMakeFiles/cpprest.dir/http/client/http_client.cpp.o' failed
make[2]: *** [src/CMakeFiles/cpprest.dir/http/client/http_client.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/cpprest.dir/all' failed
make[1]: *** [src/CMakeFiles/cpprest.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
hrantzsch commented 6 years ago

-Werror=conversion is not enabled by default on GCC 8. What's your compiler version and how did you invoke it?

mobileben commented 6 years ago

I just built fine using master on Ubuntu 16.04.

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)

Although my version of boost is 1.67.

yaira24 commented 5 years ago

g++ -v "gcc version 6.4.0 20180424 (Ubuntu 6.4.0-17ubuntu1~16.04)" I invoke like in the instructions "How to build for Linux" cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 make

hrantzsch commented 5 years ago

I get the same "conversion to ... from ... may alter its value" errors as you with boost 1.68 if I compile with -Werror=conversion. Did you ever set that flag and did you try cleaning the build folder and running again?

In addition, you get "cc1plus: error: unrecognized command line option ‘-Wno-format-truncation’ [-Werror]", which looks a lot like the GCC issue described here, although GCC 6 should not be affected.

BillyONeal commented 5 years ago

https://dev.azure.com/vclibs/cpprestsdk/_build/results?buildId=123&view=logs -- suggests otherwise?

mobileben commented 5 years ago

I do not have 1.65.1 boost to compile past 1% (I got to 13% with another issue), but I tried to use your cmake invocation and it built with my config. I did have to point to my openssl was the only change I made to the invocation.

As per hrantzsch's comment did you ever set the -Werror=conversion flag or try cleaning the build folder and running again.

I have noticed the cc1plus error is a bit of red herring. It only seems to how if you have a compilation error. Otherwise it seems suppressed. Not sure if that article also states that as well.

BTW, the oneysue I did run into which I'll have to look into is this:

[ 13%] Building CXX object Release/src/CMakeFiles/cpprest.dir/websockets/client/ws_client_wspp.cpp.o
/tmp/cpprestsdk/Release/src/websockets/client/ws_client_wspp.cpp:46:46: fatal error: websocketpp/config/asio_client.hpp: No such file or directory
compilation terminated.
Release/src/CMakeFiles/cpprest.dir/build.make:542: recipe for target 'Release/src/CMakeFiles/cpprest.dir/websockets/client/ws_client_wspp.cpp.o' failed
mobileben commented 5 years ago

@BillyONeal Ubuntu is actually broken now due to websockets. Is there now some dependency required for websocketpp? It seem that this is missing

https://github.com/zaphoyd/websocketpp/tree/master/websocketpp/config

It would sort of be nice if we're not having to pull in these items ourselves. It looks like azure-pipelines.yml is pulling it in. So does this mean we now need to build and install in /usr/local?

As an FYI I did look at documentation ... no mention of this requirement that I could find. And the last successful build I had using master was 4 days ago.

BillyONeal commented 5 years ago

@yaira24

Hmmmm perhaps those instructions are broken. On the build machines we are presently doing:

sudo apt-get update sudo apt-get install -y libboost-atomic-dev libboost-thread-dev libboost-system-dev libboost-date-time-dev libboost-regex-dev libboost-filesystem-dev libboost-random-dev libboost-chrono-dev libboost-serialization-dev libwebsocketpp-dev openssl libssl-dev ninja-build mkdir build.debug cd build.debug cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug .. ninja

(With of course debug and Debug replaced with release and Release for release bits.... :) )

There's no reason make shouldn't work if Ninja does though admittedly I haven't been testing that.

@mobileben

As per hrantzsch's comment did you ever set the -Werror=conversion flag or try cleaning the build folder and running again.

No, but given that our CMakeLists.txt don't say -Werror=conversion it seems problems caused by that would be with whatever is setting that flag? It's certainly working in Pipelines (running Ubuntu 16.04) and locally (18.04).

BTW, the oneysue I did run into which I'll have to look into is this: fatal error: websocketpp/config/asio_client.hpp: No such file or directory

That means that either (1) you need to install libwebsocketpp-dev, or (2) you need to git submodule update --init. Previously we had an older copy of websocketspp checked in which resulted in confusion where if changes were made you'd accidentally edit upstream bits. I recently deleted the checked in copy in favor of a submodule to make it clear what is actually part of cpprestsdk and what is an upstream dependency.

We have always looked for this dependency on the system, and if that's not available, used that checked in copy.

mobileben commented 5 years ago

@BillyONeal I'll install it later today and build. Just curious shouldn't the CMakeFiles be adjusted so it would at least notify if a dependency doesn't exist?

Mainly looking to make it easier for folks to use. Esp if they are currently using and then it suddenly won't build when they move to master. BTW, I've built, previously to try and discern why yaira24 was having issues, but it was building for me. I updated master and rebuilt today only to try and use his/her cmake invocation to see if that had an influence.

BillyONeal commented 5 years ago

@mobileben It's likely that it was indeed broken -- I know the initial merge of the compression feature broke it, for example. The fact that so much broke was the motivation for adding Pipelines CI for platforms we care about. Still trying to figure out how to get Android and iOS builds working there....

adah1972 commented 5 years ago

I arrived here by searching for websocketpp. This new dependency does not seem to be documented yet, and my build (on Mac and CentOS) is broken.

Are we supposed to install https://github.com/zaphoyd/websocketpp manually? Also, I would appreciate an option to disable websocketpp during the build.

adah1972 commented 5 years ago

Anyway, cloning https://github.com/zaphoyd/websocketpp and adding it to CPLUS_INCLUDE_PATH solved my problem and made everything work now.

c72578 commented 5 years ago

@adah1972: If your distro does not provide a package for websocketpp, you can get it using git: git submodule update --init Release/libs/websocketpp

And then websocketpp appears as in the past inside the cpprestsdk git checkout, however at a newer version of websocketpp

adah1972 commented 5 years ago

I did not notice the submodule existed already. Good to know. (Since Git does not check out submodules automatically, it still needs to be documented.)

BillyONeal commented 5 years ago

I'm interpreting the results of this thread as a request to spit out a better error message on configure :)

mobileben commented 5 years ago

I am going to take a look at this in a day or two (ie. look at the cmake files and see about flagging the the non-existence case). I think it is sufficient if at the very least you're alerted on the config versus whilst compiling.

adah1972 commented 5 years ago

@BillyONeal Mostly true but not completely. The "How to build" wiki pages should probably mention git submodule update --init … or similar.

BillyONeal commented 5 years ago

Yeah, the wiki pages are super duper out of date at this point.

BillyONeal commented 5 years ago

Resolved by https://github.com/Microsoft/cpprestsdk/pull/930