My attempt to install ROS Melodic on macOS Mojave (10.14) with https://github.com/mikepurvis/ros-install-osx
Use the file attached.
Install it manually:
PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" pip install --no-cache-dir pycurl
Compile everything with:
catkin build -DCMAKE_CXX_STANDARD=14
Enable c++11 for the following packages:
- pluginlib_tutorials
- diagnostics_aggregator
- nodelet
- rosbag_storage
Add c++11 flag to CMakeLists.txt:
add_definitions(-std=c++11)
If you are using Boost 1.67, then the python
component should be changed to python27
, e.g.:
find_package(Boost REQUIRED COMPONENTS filesystem python27)
in the following packages:
- cv_bridge
- camera_calibration_parsers
In the terminal:
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
Add the following to CMakeLists.txt
:
find_package(PkgConfig REQUIRED)
pkg_check_modules(OpenSSL REQUIRED openssl)
pkg_check_modules(LibCrypto REQUIRED libcrypto)
find_package(Gpgmepp CONFIG REQUIRED)
# Add OpenSSL includes, modify the line
include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR} ${OpenSSL_INCLUDE_DIRS})
link_directories(${LibCrypto_LIBRARY_DIRS})
Also change the line in if-block:
set(AES_ENCRYPT_LIBRARIES "crypto" "gpgme")
to
set(AES_ENCRYPT_LIBRARIES "crypto" "Gpgmepp")
In the terminal:
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
In the CMakeLists.txt
:
# Find OpenSSL
find_package(PkgConfig REQUIRED)
pkg_check_modules(OpenSSL REQUIRED openssl)
# Add it includes
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${BZIP2_INCLUDE_DIR}
${OpenSSL_INCLUDE_DIRS}
)
Replace local GTest copy with the system one.
In CMakeLists.txt
:
find_package(GTest REQUIRED)
# Add corresponding includes
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS})
# Remove dependency to local gtest
add_executable(analyzer_loader test/analyzer_loader.cpp)
# Link libraries
target_link_libraries(analyzer_loader diagnostic_aggregator ${GTEST_BOTH_LIBRARIES})
Happens with Boost 1.67, similar to ros/roscpp_core#79.
To fix, change the line in actionlib/src/connection_monitor.cpp
:
boost::posix_time::milliseconds(time_left.toSec() * 1000.0f));
to
boost::posix_time::milliseconds(int(time_left.toSec() * 1000.0f)));
Similarly for laser_assembler/test/test_assembler.cpp
:
Change
cloud_condition_.timed_wait(lock, boost::posix_time::milliseconds(1000.0f));
to
cloud_condition_.timed_wait(lock, boost::posix_time::milliseconds(1000));
In the CMakeLists.txt
:
find_package(PkgConfig REQUIRED)
pkg_check_modules(Pango REQUIRED pango)
link_directories(${Pango_LIBRARY_DIRS})
#...
include_directories(
#...
${Pango_INCLUDE_DIRS}
)
target_link_libraries(
#...
${Pango_LIBRARIES}
)