Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2781

Windows install doesn't work as documented?

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.12.0
    • Component/s: Build
    • Labels:
      None
    • Environment:
      Windows 10

      When trying to following Windows Visual Studio build instructions (on http://mongoc.org/libmongoc/current/installing.html) after download the 1.12.0 kit, I get:

      f:\Downloads\temp\mongo-c-driver-1.12.0\cmake-build>cmake -G "Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=f:\mongo-c-driver" "-DCMAKE_BUILD_TYPE=Release"
      CMake Error: The source directory "F:/Downloads/temp/mongo-c-driver-1.12.0/cmake-build" does not appear to contain CMakeLists.txt.
      Specify --help for usage, or press the help button on the CMake GUI.

      And also the following fails:

      f:\Downloads\temp\mongo-c-driver-1.12.0\cmake-build>cmake -LH
      CMake Error: The source directory "F:/Downloads/temp/mongo-c-driver-1.12.0/cmake-build" does not appear to contain CMakeLists.txt.
      Specify --help for usage, or press the help button on the CMake GUI.
      – Cache values

      If I copy the ..\CMakeLists.txt into this directory, I get a bit further:

      f:\Downloads\temp\mongo-c-driver-1.12.0\cmake-build>cmake -G "Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=f:\mongo-c-driver" "-DCMAKE_BUILD_TYPE=Release"
      – Selecting Windows SDK version to target Windows 10.0.16299.
      – 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/x86_amd64/cl.exe
      – Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe – works
      – Detecting C compiler ABI info
      – Detecting C compiler ABI info - done
      – Detecting C compile features
      – Detecting C compile features - done
      CMake Error at CMakeLists.txt:65 (include):
      include could not find load file:

      LoadVersion

      CMake Error at CMakeLists.txt:66 (LoadVersion):
      Unknown CMake command "LoadVersion".

      – Configuring incomplete, errors occurred!
      See also "F:/Downloads/temp/mongo-c-driver-1.12.0/cmake-build/CMakeFiles/CMakeOutput.log".

       

      I am successful if I don't "cd cmake-build".

       

      I am using cmake-3.12.0-win64-x64.msi.

       

      Thus, I think the steps:

      cd mongo-c-driver-1.12.0
      mkdir cmake-build
      cd cmake-build
      cmake -G "Visual Studio 14 2015 Win64" \
      "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" \
      "-DCMAKE_PREFIX_PATH=C:\mongo-c-driver" \
      ..

      Are incorrect or are missing something.

      Instead it should be:

      cd mongo-c-driver-1.12.0
      cmake -G "Visual Studio 14 2015 Win64" \
      "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" \
      "-DCMAKE_PREFIX_PATH=C:\mongo-c-driver" \
      ..

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            bevolz Bernie Volz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: