Conversation
Fixed building on RHEL/CentOS 8. There were three main issues
with compiling on RHEL/CentOS 8:
1. boost::asio::io_service was deprecated in 1.66. The
"common/io_service.h" header creates a typedefs io_context
to io_service if the boost version is greater than or equal
to 1.66.
2. boost::asio::basic_stream_socket native() method deprecated
in 1.47. The version of boost is checked when the 'native()'
is used and switches to 'native_handle()' if the version is
greater than 1.47.
3. Using proj_api.h is deprecated. Added a define to
"src/CMakeLists.txt" for ACCEPT_USE_OF_DEPRECATED_PROJ_API_H.
Fixes GobySoft#51.
|
Thanks! This is conceptually very close to my implementation in Goby3: Could you cherry-pick that commit for the relevant parts (io_service)? I'd prefer that goby2 still cleanly merge into goby3. I would also prefer that "#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H" be in the actual header, not set by CMake, so that downstream projects don't have to set it in their own build system. See: GobySoft/goby3@f2bf8e4#diff-44d2cc23f56a2a4368a643e762156c8e (this #define will also need to be added to https://github.com/GobySoft/goby/blob/2.1/src/moos/moos_geodesy.cpp) Finally, since this is your first contribution to Goby, could you please sign the CLA by adding your name and email to https://github.com/GobySoft/goby/blob/2.1/AUTHORS and make that part of your PR? Once you make these changes I'll merge this in. Thanks for your help! |
Fixed building on RHEL/CentOS 8. There were three main issues
with compiling on RHEL/CentOS 8:
boost::asio::io_servicewas deprecated in 1.66. Thecommon/io_service.hheader creates a typedefs io_contextto io_service if the boost version is greater than or equal
to 1.66.
boost::asio::basic_stream_socketnative()method deprecatedin 1.47. The version of boost is checked when the
native()is used and switches to
native_handle()if the version isgreater than 1.47.
proj_api.his deprecated. Added a define tosrc/CMakeLists.txtforACCEPT_USE_OF_DEPRECATED_PROJ_API_H.Tested on CentOS 7 and CentOS 8.
Fixes #51.
Additional Note:
src/CMakeLists.txtdefinesMOOS_LIBRARIESto beMOOS. This should possibly get changed to using the namespaced versionMOOS::MOOS.