Neither Qt 4.8.6 nor 5.5.1 found. Compilation finishes without error, but not rstudio executable created

rstudio

#1

I am trying to install RStudio 1.1.456 on our HPC cluster. We already provide two Qt installations installed in non-standard locations.

/cluster/apps/gcc-4.8.5/qt-4.8.6-aewo2wahtbrgl6lkng7agqta5vtpxvrt
/cluster/apps/gcc-4.8.5/qt-5.5.1-zz5ej2v42ayd4hwjvkkihbhfoxxincg4

The corresponding modules set the variables

  • $PATH
  • $CMAKE_PREFIX_PATH
  • $LIBRARY_PATH
  • $LD_LIBRARY_PATH
  • $PKG_CONFIG_PATH
  • $CPATH
  • $QTDIR

I run ccmake with the following options:

ccmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE='-O2 -g -DNDEBUG -fPIC -ftree-vectorize -march=core-avx2 -mavx2' -DCMAKE_C_FLAGS_RELEASE='-O2 -g -DNDEBUG -fPIC -ftree-vectorize -march=core-avx2 -mavx2' -DCMAKE_INSTALL_PREFIX=/cluster/apps/rstudio/1.1.456/x86_64 -DRSTUDIO_TARGET=desktop -DCMAKE_VERBOSE_MAKEFILE=ON ..

When pressing "c" for configure, then cmake automatically detects BOOST and R, but there is not a single variable present for Qt. Usually (when compiling other software that depends on Qt and uses cmake) cmake does not have any issue detecting the Qt installation.

After configuring I press "g" to generate the sources to be compiled. Finally when running make -j 36 install, the compilation runs through without giving any error message. The resulting installation does not have any rstudio executable (I think this is due to not being able to detect Qt).

What CMake variables can be used to specify the location of the Qt installation ?

Best regards

Sam


#2

I also tried to use the bundled Qt 5.4.0, but with the same result.


#3

This is the script we use when generating package builds of RStudio:

In particular, note how we invoke CMake:

cmake -DRSTUDIO_TARGET=$1 \
      -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
      -DRSTUDIO_PACKAGE_BUILD=1 \
      -DRSTUDIO_PACKAGE_VARIANT=$4 \
      -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \
      -DGWT_BIN_DIR="$BUILD_DIR/gwt/bin" \
      -DGWT_WWW_DIR="$BUILD_DIR/gwt/www" \
      -DGWT_EXTRAS_DIR="$BUILD_DIR/gwt/extras" \
      $PKG_DIR/../..

The -DRSTUDIO_PACKAGE_BUILD tells RStudio to build against + use the bundled Qt. If that's not set, then you need to tell RStudio where Qt lives. See e.g.

In particular you probably need to set the QT_QMAKE_EXECUTABLE variable.

It's highly recommended that you use the bundled version of Qt, as different bugs and regressions affecting RStudio do pop up in the different Qt releases, and we only test explicitly against the bundled versions of Qt we explicitly prepare our releases against.


#4

Thank you for your reply.

When I add the CMAKE variable QT_QMAKE_EXECUTABLE then I get the following warning:

[sfux@lo-a2-017 build]$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE='-O2 -g -DNDEBUG -fPIC -ftree-vectorize -march=core-avx2 -mavx2' -DCMAKE_C_FLAGS_RELEASE='-O2 -g -DNDEBUG -fPIC -ftree-vectorize -march=core-avx2 -mavx2' -DCMAKE_INSTALL_PREFIX=/cluster/apps/rstudio/1.1.456/x86_64 -DRSTUDIO_TARGET=desktop -DCMAKE_VERBOSE_MAKEFILE=ON -DQT_QMAKE_EXECUTABLE=/cluster/apps/gcc-4.8.5/qt-5.5.1-zz5ej2v42ayd4hwjvkkihbhfoxxincg4/bin/qmake ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/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: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- LSB release: centos
-- 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  
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   iostreams
--   program_options
--   regex
--   signals
--   system
--   thread
--   chrono
--   random
--   atomic
-- Using system Boost 1.63.0
-- Performing Test HAVE_SCANDIR_POSIX
-- Performing Test HAVE_SCANDIR_POSIX - Success
-- Looking for SA_NOCLDWAIT
-- Looking for SA_NOCLDWAIT - found
-- Looking for SO_PEERCRED
-- Looking for SO_PEERCRED - found
-- Looking for inotify_init1
-- Looking for inotify_init1 - found
-- Looking for getpeereid
-- Looking for getpeereid - not found
-- Looking for setresuid
-- Looking for setresuid - found
-- Found LibR: /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/r-3.5.1-q37twqrxopc4cwqi6lca7s6nd5d7g7kl/rlib/R  
-- Found R: /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/r-3.5.1-q37twqrxopc4cwqi6lca7s6nd5d7g7kl/rlib/R
-- Performing Test LIBR_MINIMUM_VERSION
-- Performing Test LIBR_MINIMUM_VERSION - Success
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    QT_QMAKE_EXECUTABLE


-- Build files have been written to: /scratch/711558.tmpdir/rstudio-1.1.456/build
[sfux@lo-a2-017 build]$

RStudio is not even looking for Qt.

And are other CMAKE variables like DRSTUDIO_PACKAGE_BUILD and DRSTUDIO_PACKAGE_VARIANT documented somewhere ?