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

Fixed building on RHEL/CentOS 8. #52

Open
wants to merge 1 commit into
base: 2.1
Choose a base branch
from

Conversation

cgagner
Copy link

@cgagner cgagner commented May 23, 2020

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.

Tested on CentOS 7 and CentOS 8.

Fixes #51.

Additional Note:

  • The src/CMakeLists.txt defines MOOS_LIBRARIES to be MOOS. This should possibly get changed to using the namespaced version MOOS::MOOS.
  • This pull request does not modify the version in the CMakeLists.txt. If accepted, the version should probably get updated to 2.1.15 and a new tag created...

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.
@tsaubergine
Copy link
Member

Thanks! This is conceptually very close to my implementation in Goby3:

GobySoft/goby3@997168a

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!

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

Successfully merging this pull request may close these issues.

Unable to build goby2 on RHEL/CentOS 8.
2 participants