The compilation of RStudio server on AIX7.2 failed.

I am trying to build RStudio server on AIX7.2. First of all, my cmake version is 3.16.0 and I compiled boost 1.70.0 with the following statement to include all libraries.

 ./bootstrap.sh --with-python=`which python3` \
                                       --with-python-root=$PYTHON_ROOT \
                                                        --with-libraries=all\
                --prefix=/software/boost/boost_1_70_0

In rstudio_server/CMakeLists.txt file, I added the following statements:

set(Boost_DEBUG 1)
set(BOOST_ROOT "/software/boost/boost_1_70_0")
SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/software/boost/boost_1_70_0/boost")
SET(CMAKE_INCLUDEDIR ${CMAKE_INCLUDE_PATH} "/software/boost/boost_1_70_0/boost")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "/software/boost/boost_1_70_0/libs")
      SET(CMAKE_THREAD_LIBS_INIT "-lpthread")
#      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
      SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
      SET(CMAKE_HAVE_THREADS_LIBRARY 1)
      SET(CMAKE_USE_WIN32_THREADS_INIT 0)
      SET(CMAKE_USE_PTHREADS_INIT 1)
      SET(THREADS_PREFER_PTHREAD_FLAG ON)
FIND_PACKAGE(Boost)
IF (Boost_FOUND)
    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
    ADD_DEFINITIONS( "-DHAS_BOOST" )
ENDIF()

My cmake statement is cmake .. -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release > cmake.log 2>&1. It has the following error:

CMake Error at /opt/freeware/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Boost (missing: atomic chrono date_time filesystem iostreams
  program_options random regex system thread) (found suitable version
  "1.70.0", minimum required is "1.63.0")

Can someone tell me why "atomic chrono date_time filesystem iostreams program_options random regex system thread" are missing? Somehow, I don't see boost "include" library after ./b2 install. I wonder if that is the root cause of the issue.

Thanks.

I finally compiled boost 1.72 successfully with lib and include sub-directories. In CMakeList.txt file, I added the following statements:

set(Boost_DEBUG 1)
set(BOOST_ROOT "/software/boost/boost_1_72_0")
SET(Boost_USE_STATIC_LIBS ON)

SET(CMAKE_INCLUDE_PATH "/software/boost/boost_1_72_0/include")
SET(CMAKE_INCLUDEDIR "/software/boost/boost_1_72_0/include")
SET(CMAKE_LIBRARY_PATH "/software/boost/boost_1_72_0/lib")
SET(BOOST_LIBRARYDIR "/software/boost/boost_1_72_0/lib")
SET(CMAKE_THREAD_LIBS_INIT "-lpthread")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")

FIND_PACKAGE(Boost)
IF (Boost_FOUND)
    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
    ADD_DEFINITIONS( "-DHAS_BOOST" )
ENDIF()

This time, the error is limited to "thread" only as shown below:

CMake Error at /opt/freeware/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Boost (missing: thread) (found suitable version "1.72.0",
  minimum required is "1.63.0")
Call Stack (most recent call first):
  /opt/freeware/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /opt/freeware/share/cmake-3.16/Modules/FindBoost.cmake:2165 (find_package_handle_standard_args)
  src/cpp/CMakeLists.txt:228 (find_package)

Can someone tell me what's wrong with it? Let me know if additional information is required.

Thanks.

I am actually running into another problem. The obsolete "boost_signals" library has been removed since boost1.69. Somehow, it is shill show up in RStudio source package that causes the following error. Is there an easy way to fix it?

-- BoostConfig: find_package(boost_signals 1.72.0 EXACT CONFIG REQUIRED QUIET HINTS /usr/local/lib/cmake)
CMake Error at /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package):
  Could not find a package configuration file provided by "boost_signals"
  (requested version 1.72.0) with any of the following names:

    boost_signalsConfig.cmake
    boost_signals-config.cmake

  Add the installation prefix of "boost_signals" to CMAKE_PREFIX_PATH or set
  "boost_signals_DIR" to a directory containing one of the above files.  If
  "boost_signals" provides a separate development package or SDK, be sure it
  has been installed.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.