Installing KArchive on QT 5.11.2 (MSVC 2015)



  • Hello!

    I am trying to install KArchive following this guide: https://wiki.qt.io/Karchive_on_windows

    When I come to the following step:

    • list itemIn extra-cmake-modules: mkdir build && cd build && cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C: nmake install (nmake is installed with Qt, if you don't find it, check you Qt installation)

    gitbash (git-scm) gives me the error message:

    Damien@Robin MINGW64 /e/karchive/extra-cmake-modules/build (master)
    $ cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:
    -- Could NOT find Sphinx (missing: Sphinx_BUILD_EXECUTABLE) (Required is at least version "1.2")
    -- Could NOT find QCollectionGenerator (missing: QCollectionGenerator_EXECUTABLE)
    -- The C compiler identification is unknown
    CMake Error at tests/CMakeLists.txt:33 (project):
      The CMAKE_C_COMPILER:
    
        cl
    
      is not a full path and was not found in the PATH.
    
      To use the NMake generator with Visual C++, cmake must be run from a shell
      that can use the compiler cl from the command line.  This environment is
      unable to invoke the cl compiler.  To fix this problem, run cmake from the
      Visual Studio Command Prompt (vcvarsall.bat).
    
      Tell CMake where to find the compiler by setting either the environment
      variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
      the compiler, or to the compiler name if it is in the PATH.
    
    
    -- Configuring incomplete, errors occurred!
    See also "E:/karchive/extra-cmake-modules/build/CMakeFiles/CMakeOutput.log".
    See also "E:/karchive/extra-cmake-modules/build/CMakeFiles/CMakeError.log".
    

    Extra info: I have an nmake.exe file in: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

    Thankful for any help!


  • Lifetime Qt Champion

    Hi,

    @RobinQT said in Installing KArchive on QT 5.11.2 (MSVC 2015):

    MINGW64

    Are you mixing MinGW and Visual Studio ?



  • This post is deleted!


  • @SGaist

    My bad. GitBash uses MINGW64 :) But if I use Qt 5.11.2 64-bit for Desktop (MSVC 2015) it gives me same error as above.


  • Lifetime Qt Champion

    How do you do it with Qt 5.11.2 ?



  • @SGaist I open open: Qt 5.11.2 64-bit for Desktop (MSVC 2015) and navigate to: E:\Karchive\extra-cmake-modules\build and enter:
    cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:
    and receive the same error as above post.

    I know I have both nmake.exe and cl.exe in:
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

    I also tried open up vsdevcmd.bat and navigate to E:\karchive\extra-cmake-modules\build and type:
    cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:

    But at that time it can not recognize cmake, eventho it did it earlier. Path is in system variables.

    This is the output of CMakeError.log: https://pastebin.com/5qA3jX13
    This is the output of CMakeOutput.log:
    The system is: Windows - 10.0.17134 - AMD64

    It seems cmake is accessible from cmd.exe but not from Qt 5.11.2 64-bit for Desktop (MSVC 2015).


  • Lifetime Qt Champion

    Did you clean up between to cmake calls ?

    One alternative you can try: open the project in Qt Creator, so you'll have everything setup to use Qt and the same compiler as Qt.



  • @SGaist There is not really a project to open. This is the files you get included: https://github.com/KDE/karchive from doing the fourth step from the guide: https://wiki.qt.io/Karchive_on_windows :)



  • @SGaist Made abit of progress, but still some errors. Any clue?

    E:\karchive\extra-cmake-modules\build>cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C: nmake install
    -- Could NOT find Sphinx (missing: Sphinx_BUILD_EXECUTABLE) (Required is at least version "1.2")
    -- The C compiler identification is MSVC 19.0.24215.1
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken
    CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message):
      The C compiler
    
        "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe"
    
      is not able to compile a simple test program.
    
      It fails with the following output:
    
        Change Dir: E:/karchive/extra-cmake-modules/CMakeFiles/CMakeTmp
    
        Run Build Command:"nmake" "/nologo" "cmTC_21399\fast"
            "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_21399.dir\build.make /nologo -L                  CMakeFiles\cmTC_21399.dir\build
        Building C object CMakeFiles/cmTC_21399.dir/testCCompiler.c.obj
            C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe @C:\Users\Damien\AppData\Local\Temp\nm2766.tmp
        testCCompiler.c
        Linking C executable cmTC_21399.exe
            "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_21399.dir --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_21399.dir\objects1.rsp @C:\Users\Damien\AppData\Local\Temp\nm28CF.tmp
        RC Pass 1: command "rc /foCMakeFiles\cmTC_21399.dir/manifest.res CMakeFiles\cmTC_21399.dir/manifest.rc" failed (exit code 0) with the following output:
        Det går inte att hitta filenNMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
        Stop.
        NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
        Stop.
    
    
    
    
      CMake will not be able to correctly generate this project.
    Call Stack (most recent call first):
      tests/CMakeLists.txt:33 (project)
    
    
    -- Configuring incomplete, errors occurred!
    See also "E:/karchive/extra-cmake-modules/CMakeFiles/CMakeOutput.log".
    See also "E:/karchive/extra-cmake-modules/CMakeFiles/CMakeError.log".
    
    E:\karchive\extra-cmake-modules\build>
    


  • It seemed I had to set a path to:
    @set "PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;%PATH%"
    so it could reach rc.exe


  • Lifetime Qt Champion

    cmake not found is normal in the VS command prompt. You can use the full path to the executable to run it.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.