-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CentOS 7 build failure #682
Comments
This can be worked around with |
"unused parameter" messages are indeed not an error but a warning in many compilers (except you configure it otherwise). This can be safely ignored and the error being switched off for non-library-implementors. Nevertheless the Casablanca team could've done better, there's a standard compliant way to disable this warning/error per call: Simply leave it unnamed. Plus in C++14 we have the attribute [[maybe-unused]], so they should've made it so that those warnings are not triggered at all. There's no big magic behind that, this C++ feature is no breaking news and pros should know how to handle that appropriately! |
Thanks for the help. I have new errors now these seem "real". One thing i noticed when trying to bypass the issues above is the required boost version for the 2.9.X branches require a newer version of boost that CentOS can provide from standard repositories (1.54 i believe. CentOS 7 provides 1.53) [ 51%] Building CXX object tests/functional/http/listener/CMakeFiles/httplistener_test.dir/listener_construction_tests.cpp.o |
Huh? boost V1.53 stems from February 2013 and is 5 years old now, current version is V1.66. Do they really stay with such an old version in a current OS release? I guess Casablanca does not cater for such old versions, updating boost will presumably be unavoidable for you. But the errors you posted above are all from the tests and examples sections of Casablanca. If Casablanca itself compiles just don't give a damn on the compilability of the examples. In case you'll try to update boost these links might be helpful: HTH |
I was able to get a boost 1.65.1 package to build and install into a non-system directory. How do i override the "find_package" search to use my local directory? Looking at the cmake documentation i should be able to define an environment variable "Boost_DIR" (or BOOST_DIR?) but it is not working. it still resolves to system directory. I have also tried using CMAKE_PREFIX_PATH. https://cmake.org/cmake/help/v3.0/command/find_package.html Sorry, i dont have much experience with cmake. Also, since CentOS is a enterprise production server linux distribution, stability is valued over features so packages rarely update once released (outside of security updates)... At least that is my understanding. |
I found an answer my own question. you define BOOST_ROOT, but my cmake is too old to understand boost 1.65, so I'm going to try to find an older package. |
OK, so here is how I build on CentOS 7:
This still gives you a lot of warnings, but Casablanca works basically. If you want to link against Casablanca you might want to set e.g CPPRESTSDK_DIR=/opt/cpprest-2.10.2 so CMake's find_package() can detect it. And also you might want to add all the /lib directories (Boost, OpenSSL and C++ REST SDK) to LD_LIBRARY_PATH or add them under /etc/ld.so.conf.d/ and call /sbin/ldconfig. |
@maaltan any luck with an older version of boost? Running into the same issues. |
The problem here is that boost V1.54 introduced some major changes and enhancements for ASIO, see here: |
For benefit of those who has to go through similar pains -- here is list of steps to build and install cpprestsdk v2.9.1 and Azure Storage Client v4.0.0 on minimal CentOS 7 with GCC v6.2.0 (built from sources too). Took me a while to get it right:
Note: some cpprestsdk tests are failing, not sure if it ok |
I'm trying to compile Casablanca with the above, CentOS instructions and getting this compile error:
Do you have any suggestions? |
A quote:
|
Thank you, that solved that compile error, I'm getting now this error on a test but at least I got the libcpprest.so I need for azure build:
|
not sure... wrong version of boost? I don't recall having problems compiling sdk tests... |
I'm using libboost: 1.68.0 |
A quote:
Not sure if this is the root cause, but 1.66 worked for me... |
If aligned_storage is a missing piece, if someone wants to contribute a workaround that builds without so much pain on that platform we merge that... |
Trying to build azure-storage-cpp, is there any restrictions on Boost libs versions?
however, I'm getting this error:
Where is this " Boost version: 1.53.0" version# coming from? |
@orest1 Looks like it's a headers problem rather than a libraries problem. /usr/include probably has a 1.53.0 copy which doesn't match the .a files you're trying to use. |
@BillyONeal , thank you, however, shouldn't "BOOST_INCLUDEDIR=/opt/boost/include/boost"
|
@orest1 You're setting environment variables, CMake wants CMake defines. You need to move those after the cmake command and prepend with -D |
Unfortunately I'm not familiar with how azurestorage builds -- whenever I've built it I've just pointed cmake at it and all has been fine, sorry :(. Maybe you can ask those folks? |
As I don't use CentOS I cannot create such a patch, but maybe some other volunteer? |
@PBRCW Yes, a regular union is probably a good workaround. One member unions are a great way to control lifetime of a thing explicitly when one has to. |
I am having exactly the same error as you had. Were you able to fix them after you used GCC version higher than 6.2? I just updated the gcc to 7.3 but still getting the same error. Thanks |
I am having problems building this library in centOS 7. After installing/updating several libraries cmake was looking for, i am still looking at several errors involving "unused parameter 'other'"
`In file included from /home/asdf/otherdev/cpprestsdk/Release/src/pch/stdafx.h:108:0,
from /home/asdf/otherdev/cpprestsdk/Release/src/http/client/http_client.cpp:16:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h:32:13: error: unused parameter ‘other’ [-Werror=unused-parameter]
uri_components(const uri_components &other) = default;
^
In file included from /home/asdf/otherdev/cpprestsdk/Release/src/pch/stdafx.h:108:0,
from /home/asdf/otherdev/cpprestsdk/Release/src/http/client/http_client.cpp:16:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h: In copy constructor ‘web::uri::uri(const web::uri&)’:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h:212:9: note: synthesized method ‘web::details::uri_components::uri_components(const web::details::uri_components&)’ first required here
uri(const uri &other) = default;
^
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h: At global scope:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h:212:9: error: unused parameter ‘other’ [-Werror=unused-parameter]
In file included from /home/asdf/otherdev/cpprestsdk/Release/src/pch/stdafx.h:112:0,
from /home/asdf/otherdev/cpprestsdk/Release/src/http/client/http_client.cpp:16:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/details/web_utilities.h: In constructor ‘web::web_proxy::web_proxy(web::uri)’:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/details/web_utilities.h:162:73: note: synthesized method ‘web::uri::uri(const web::uri&)’ first required here
web_proxy( uri address ) : m_address(address), m_mode(user_provided_) {}
^
In file included from /home/asdf/otherdev/cpprestsdk/Release/src/pch/stdafx.h:108:0,
from /home/asdf/otherdev/cpprestsdk/Release/src/http/client/http_client.cpp:16:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h: At global scope:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h:28:16: error: unused parameter ‘other’ [-Werror=unused-parameter]
struct uri_components
^
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h: In member function ‘web::uri& web::uri::operator=(const web::uri&)’:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h:118:11: note: synthesized method ‘web::details::uri_components& web::details::uri_components::operator=(const web::details::uri_components&)’ first required here
class uri
^
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h: At global scope:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/base_uri.h:118:11: error: unused parameter ‘other’ [-Werror=unused-parameter]
In file included from /home/asdf/otherdev/cpprestsdk/Release/src/pch/stdafx.h:116:0,
from /home/asdf/otherdev/cpprestsdk/Release/src/http/client/http_client.cpp:16:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/http_msg.h: In member function ‘void web::http::details::_http_request::_set_base_uri(const web::uri&)’:
/home/asdf/otherdev/cpprestsdk/Release/include/cpprest/http_msg.h:799:64: note: synthesized method ‘web::uri& web::uri::operator=(const web::uri&)’ first required here
void _set_base_uri(const http::uri &base_uri) { m_base_uri = base_uri; }
^
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/cpprest.dir/http/client/http_client.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/cpprest.dir/all] Error 2
make: *** [all] Error 2
`
here is the output of cmake:
`-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/gcc
-- Check for working C compiler: /bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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 - found
-- Setting gcc options
-- websocketpp not found, using the embedded version
-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- random
-- system
-- thread
-- filesystem
-- chrono
-- atomic
-- date_time
-- regex
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found suitable version "1.0.2k", minimum required is "1.0.0")
-- Performing Test _SSL_LEAK_SUPPRESS_AVAILABLE
-- Performing Test _SSL_LEAK_SUPPRESS_AVAILABLE - Success
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- 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/asdf/otherdev/cpprestsdk/Release/build.debug
`
The text was updated successfully, but these errors were encountered: