Azure / azure-storage-cpp

Microsoft Azure Storage Client Library for C++
http://azure.github.io/azure-storage-cpp
Apache License 2.0
131 stars 147 forks source link

Building CXX object src/CMakeFiles/azurestorage.dir/executor.cpp.o is failed #328

Open neelam256 opened 4 years ago

neelam256 commented 4 years ago

While building object using azure-storage-cpp sdk 7.1.0 and 7.2.0 getting an error at [ 3%] Building CXX object src/CMakeFiles/azurestorage.dir/executor.cpp.o

/Microsoft.WindowsAzure.Storage/src/executor.cpp: In static member function ‘static pplx::task azure::storage::core::executor_impl::execute_async(std::shared_ptr, const azure::storage::request_options&, azure::storage::operation_context)’: /azure-storage-cpp/Microsoft.WindowsAzure.Storage/src/executor.cpp:33:16: error: ‘_do_while’ is not a member of ‘pplx::details’ return pplx::details::_do_while([instance]() -> pplx::task ^ /azure-storage-cpp/Microsoft.WindowsAzure.Storage/src/executor.cpp: In lambda function: /azure-storage-cpp/Microsoft.WindowsAzure.Storage/src/executor.cpp:154:24: error: ‘class web::http::client::http_client_config’ has no member named ‘set_nativesessionhandle_options’ config.set_nativesessionhandle_options(instance->m_context._get_impl()->get_native_session_handle_options_callback()); ^ src/CMakeFiles/azurestorage.dir/build.make:86: recipe for target 'src/CMakeFiles/azurestorage.dir/executor.cpp.o' failed

Jinming-Hu commented 4 years ago

@neelam256 Hi, can you share your dev environment? Like Linux or Windows, VS version or GCC version, dependency cpprestsdk version etc.

neelam256 commented 4 years ago

@JinmingHu-MSFT dev environment is Linux (ubuntu 18.04) and GCC is 7.4 and CPPrestsdk version is libcpprest.so.2.10 and other dependencies are libpthread-stubs0-dev version (0.3-4). zlib1g-dev version (1:1.2.11.dfsg-0ubuntu2). libboost-all-dev version (1.65.1.0ubuntu1). libcpprest-dev version (2.10.2-6). libcrypto++-dev version (5.6.4-8). libcurl4-openssl-dev version (7.58.0-2ubuntu3.8). libssl-dev i version (1.1.1-1ubuntu2.1~18.04.5). libxml2-dev version (2.9.4+dfsg1-6.1ubuntu1.3).

Jinming-Hu commented 4 years ago

@neelam256 Please make sure cpprest is latest release 2.10.14.

neelam256 commented 4 years ago

@JinmingHu-MSFT Version '2.10.14' for 'libcpprest-dev' was not found, I am using sudo apt-get install -y libcpprest-dev=2.10.14

Jinming-Hu commented 4 years ago

@neelam256 As I tested, the latest version I can get on Ubuntu 18.04 is 2.10.2, which doesn't meet requirement of cpp sdk. So I think you'd better build and install it from source.

Jinming-Hu commented 4 years ago

@neelam256 Or you can try ubuntu 19.10, which is not LTS but comes with cpprest 2.10.14.

neelam256 commented 4 years ago

Thanks @JinmingHu-MSFT after i build using CPPrest SDK it worked. To do this, I need to specify the path for CASABLANCA_DIR for make but i need to modify the FinCasablanca.cmake PATH_SUFFIXES for include [header files] and Binaries [*.so] , based my CPP rest compilation path Binaries and include.

Jinming-Hu commented 4 years ago

@neelam256 I have to admit the CMake files of this project is a mess. But things would be much easier if you remove cpprest installed by apt-get, and install your build to path like /usr/local