Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

MacOS Qt 6.2.1 SDK build error: "The build path contains symlinks. This is not supported."



  • Hello,
    I downloaded the source code of Qt 6.2.1 for macOS to try to build it. My computer runs macOS 12.0.1. CMake 3.21.4 has been installed with Homebrew. When I try to configure the build of Qt, I got this error:

    ../configure -shared -prefix ../build2                                                                     ─╯
    + mkdir -p qtbase
    + cd qtbase
    + exec /tmp/qt-everywhere-src-6.2.1/qtbase/configure -top-level -shared -prefix ../build2
    '/usr/local/Cellar/cmake/3.21.4/bin/cmake' '-DBUILD_SHARED_LIBS=ON' '-DCMAKE_INSTALL_PREFIX=../build2' '-G' 'Ninja' '/tmp/qt-everywhere-src-6.2.1'
    Checking dependencies of 'qtbase'
    Checking dependencies of 'qtshadertools'
    Checking dependencies of 'qtsvg'
    Checking dependencies of 'qtimageformats'
    Checking dependencies of 'qtdeclarative'
    Checking dependencies of 'qt3d'
    Checking dependencies of 'qt5compat'
    Checking dependencies of 'qtactiveqt'
    Checking dependencies of 'qtmultimedia'
    Checking dependencies of 'qtcharts'
    Checking dependencies of 'qtcoap'
    Checking dependencies of 'qtconnectivity'
    Checking dependencies of 'qtdatavis3d'
    Checking dependencies of 'qttools'
    Checking dependencies of 'qtdoc'
    Checking dependencies of 'qtserialport'
    Checking dependencies of 'qtlocation'
    Checking dependencies of 'qtlottie'
    Checking dependencies of 'qtmqtt'
    Checking dependencies of 'qtnetworkauth'
    Checking dependencies of 'qtopcua'
    Checking dependencies of 'qtquicktimeline'
    Checking dependencies of 'qtquick3d'
    Checking dependencies of 'qtremoteobjects'
    Checking dependencies of 'qtscxml'
    Checking dependencies of 'qtsensors'
    Checking dependencies of 'qtserialbus'
    Checking dependencies of 'qttranslations'
    Checking dependencies of 'qtvirtualkeyboard'
    Checking dependencies of 'qtwayland'
    Checking dependencies of 'qtwebsockets'
    Checking dependencies of 'qtwebchannel'
    Checking dependencies of 'qtwebengine'
    Checking dependencies of 'qtwebview'
    Configuring 'qtbase'
    CMake Error at qtbase/CMakeLists.txt:22 (message):
      The build path "/tmp/qt-everywhere-src-6.2.1/build" contains symlinks.
      This is not supported.  Possible solutions:
    
      - map directories using a transparent mechanism such as mount --bind
    
      - pass the real path of the build directory to CMake, e.g.  using cd
      $(realpath <build_dir>) before invoking cmake <source_dir>.
    
    
    -- Configuring incomplete, errors occurred!
    See also "/tmp/qt-everywhere-src-6.2.1/build/CMakeFiles/CMakeOutput.log".
    See also "/tmp/qt-everywhere-src-6.2.1/build/CMakeFiles/CMakeError.log".
    CMake Error at /tmp/qt-everywhere-src-6.2.1/qtbase/cmake/QtProcessConfigureArgs.cmake:947 (message):
      CMake exited with code 1.
    

    I found that there is an attempt to change the required minimum version of CMake to handle symlinks to 3.20, but my version more recent and should not have this problem:
    https://github.com/qt/qtbase/commit/6518bcc167d47e1c27d082c21551b9a838b04e5d

    Does anybody else has the same problem ?

    Regards.


  • Lifetime Qt Champion

    Hi,

    What if you do the build from your home folder ?



  • I have exactly the same problem building 6.2.2 on macOS. Ninja, python2, python3 and cmake are all at the "tools and versions" page required versions or newer and I'm running Xcode 12.4 on Catalina with command line tools installed.

    My configure command is a little simpler.

    ./configure -prefix /Users/myname/Qt/6.2.2_fromsrc

    I miss the QT5 build system that just worked!!



  • Ok, what I've found is that qtbase cmakelists.txt compares the apparent and actual build directory paths. Mine were both identical except for the Qt directory itself. One path had 'qt' and one had 'Qt'. I renamed my qt directory to Qt and now the build works. Grrrr.... there were no actual symlinks; rather the cmakelists.txt comparison should be case insensitive.


  • Lifetime Qt Champion

    @mjsmithers said in MacOS Qt 6.2.1 SDK build error: "The build path contains symlinks. This is not supported.":

    rather the cmakelists.txt comparison should be case insensitive.

    No because Qt is not qt. There are case-sensitive file systems out there.



  • Ok, then this particular cmakelists.txt needs to do a different kind of comparison or needs different logic to achieve the stated goal. If you view the actual paths cmake is comparing for this error, there are no actually simlinks in my case, and maybe the same for the OP.


Log in to reply