google / s2geometry

Computational geometry and spatial indexing on the sphere
http://s2geometry.io/
Apache License 2.0
2.29k stars 302 forks source link

installion s2geometry on windows' issues #330

Closed satoti closed 7 months ago

satoti commented 11 months ago

I am trying to install s2geometry libaray in windows x64 11, I downloaded all the dependcy files. I still have this error. × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [119 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-39 creating build\lib.win-amd64-cpython-39\s2geometry copying src\python__init__.py -> build\lib.win-amd64-cpython-39\s2geometry

Any solustion for this plz ?

smcallis commented 11 months ago

Can you paste the full output? That might give us more to go on.

satoti commented 11 months ago

Thank you very much for your quick reply, I am really disparate, I want to get this library install. I have to install it on windows platform because I am developing a model to be test by ArcGIS pro developed by Esri which only supported Windows.

Please check the following error. error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [119 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-39 creating build\lib.win-amd64-cpython-39\s2geometry copying src\python__init__.py -> build\lib.win-amd64-cpython-39\s2geometry running build_ext -- Building for: Visual Studio 17 2022 -- The C compiler identification is MSVC 19.37.32824.0 -- The CXX compiler identification is MSVC 19.37.32824.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The following features have been disabled:

   * GFLAGS, allows changing command line flags.
   * GLOG, provides logging configurability.
   * SHARED_LIBS, builds shared libraries instead of static.

  -- Found OpenSSL: optimized;C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MD.lib;debug;C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib (found version "3.1.2")
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- 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 - not found
  -- Found Threads: TRUE
  -- Found SWIG: C:/Users/c1910526/AppData/Local/Programs/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Library/bin/swig.exe (found version "4.0.2")
  -- Found PythonInterp: C:/Users/c1910526/AppData/Local/Programs/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/python.exe (found version "3.9.16")
  -- Found PythonLibs: C:/Users/c1910526/AppData/Local/Programs/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/libs/python39.lib (found version "3.9.16")
   * GTEST_ROOT:
  CMake Warning (dev) at C:/Users/c1910526/AppData/Local/Programs/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Library/share/cmake-3.26/Modules/UseSWIG.cmake:809 (message):
    Policy CMP0078 is not set: UseSWIG generates standard target names.  Run
    "cmake --help-policy CMP0078" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.

  Call Stack (most recent call first):
    src/python/CMakeLists.txt:12 (swig_add_library)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  CMake Warning (dev) at C:/Users/c1910526/AppData/Local/Programs/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Library/share/cmake-3.26/Modules/UseSWIG.cmake:651 (message):
    Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
    flag.  Run "cmake --help-policy CMP0086" for policy details.  Use the
    cmake_policy command to set the policy and suppress this warning.

  Call Stack (most recent call first):
    C:/Users/c1910526/AppData/Local/Programs/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Library/share/cmake-3.26/Modules/UseSWIG.cmake:922 (SWIG_ADD_SOURCE_TO_MODULE)
    src/python/CMakeLists.txt:12 (swig_add_library)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  CMake Error at C:/Users/c1910526/AppData/Local/Programs/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Library/share/cmake-3.26/Modules/UseSWIG.cmake:939 (add_library):
    Syntax error in cmake code when parsing string

      C:\Users\c1910526\AppData\Local\Temp\pip-install-4n6xanur\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80\build\lib.win-amd64-cpython-39\s2geometry/s2PYTHON_wrap.cxx

    Invalid character escape '\U'.
  Call Stack (most recent call first):
    src/python/CMakeLists.txt:12 (swig_add_library)

  CMake Error at C:/Users/c1910526/AppData/Local/Programs/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Library/share/cmake-3.26/Modules/UseSWIG.cmake:939 (add_library):
    Syntax error in cmake code when parsing string

      C:\Users\c1910526\AppData\Local\Temp\pip-install-4n6xanur\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80\build\lib.win-amd64-cpython-39\s2geometry/s2.py

    Invalid character escape '\U'.
  Call Stack (most recent call first):
    src/python/CMakeLists.txt:12 (swig_add_library)

  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\c1910526\AppData\Local\Temp\pip-install-4n6xanur\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80\setup.py", line 66, in <module>
      setup(
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\dist.py", line 989, in run_command
      super().run_command(command)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\wheel\bdist_wheel.py", line 364, in run
      self.run_command("build")
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\dist.py", line 989, in run_command
      super().run_command(command)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\dist.py", line 989, in run_command
      super().run_command(command)
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\c1910526\AppData\Local\Temp\pip-install-4n6xanur\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80\setup.py", line 20, in run
      self.build_extension(ext)
    File "C:\Users\c1910526\AppData\Local\Temp\pip-install-4n6xanur\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80\setup.py", line 47, in build_extension
      subprocess.check_call(["cmake", ext.sourcedir] + cmake_args,
    File "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\c1910526\\AppData\\Local\\Temp\\pip-install-4n6xanur\\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80', '-DBUILD_PYWRAPS2=ON', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\c1910526\\AppData\\Local\\Temp\\pip-install-4n6xanur\\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80\\build\\lib.win-amd64-cpython-39\\s2geometry', '-DCMAKE_SWIG_OUTDIR=C:\\Users\\c1910526\\AppData\\Local\\Temp\\pip-install-4n6xanur\\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80\\build\\lib.win-amd64-cpython-39\\s2geometry', '-DPYTHON_EXECUTABLE=C:\\Users\\c1910526\\AppData\\Local\\Programs\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\c1910526\\AppData\\Local\\Temp\\pip-install-4n6xanur\\s2geometry_b263ecd3f0d948ba89a628f3cc79fe80\\build\\lib.win-amd64-cpython-39\\s2geometry', '-A', 'x64']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for s2geometry Running setup.py clean for s2geometry Failed to build s2geometry ERROR: Could not build wheels for s2geometry, which is required to install pyproject.toml-based projects has context menu

From: smcallis @.> Sent: Monday, October 2, 2023 3:13 PM To: google/s2geometry @.> Cc: Abdurauf Satoti @.>; Author @.> Subject: Re: [google/s2geometry] installion s2geometry on windows' issues (Issue #330)

External email to Cardiff University - Take care when replying/opening attachments or links. Nid ebost mewnol o Brifysgol Caerdydd yw hwn - Cymerwch ofal wrth ateb/agor atodiadau neu ddolenni.

Can you paste the full output? That might give us more to go on.

— Reply to this email directly, view it on GitHubhttps://github.com/google/s2geometry/issues/330#issuecomment-1743095220, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATB7L2TTO34BCHJ4A3I3F3DX5LDW7AVCNFSM6AAAAAA5PPILOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGA4TKMRSGA. You are receiving this because you authored the thread.Message ID: @.**@.>>

smcallis commented 11 months ago

This sounds like an issue with windows paths having backslashes in them, it's the \U in \Users that's causing the trouble:

https://stackoverflow.com/questions/13737370/cmake-error-invalid-escape-sequence-u

So I think there needs to be some more quoting of the paths somewhere.

satoti commented 11 months ago

I am using windows terminal to install the library (pip install s2geometry). I don't quate any paths. Could you please clarify ?

From: smcallis @.> Sent: Monday, October 2, 2023 3:27 PM To: google/s2geometry @.> Cc: Abdurauf Satoti @.>; Author @.> Subject: Re: [google/s2geometry] installion s2geometry on windows' issues (Issue #330)

External email to Cardiff University - Take care when replying/opening attachments or links. Nid ebost mewnol o Brifysgol Caerdydd yw hwn - Cymerwch ofal wrth ateb/agor atodiadau neu ddolenni.

This sounds like an issue with windows paths having backslashes in them, it's the \U in \Users that's causing the trouble:

https://stackoverflow.com/questions/13737370/cmake-error-invalid-escape-sequence-u

So I think there needs to be some more quoting of the paths somewhere.

- Reply to this email directly, view it on GitHubhttps://github.com/google/s2geometry/issues/330#issuecomment-1743122794, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATB7L2UGD734FKLLECMIL2TX5LFK3AVCNFSM6AAAAAA5PPILOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGEZDENZZGQ. You are receiving this because you authored the thread.Message ID: @.**@.>>

smcallis commented 11 months ago

I don't have a windows machine setup for development, so this'll require a little back and forth, but as a first thing let's try changing this line: https://github.com/google/s2geometry/blob/master/src/python/CMakeLists.txt#L10

from:

set(S2GEOMETRY_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

to:

cmake_path(SET S2GEOMETRY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

satoti commented 11 months ago

I am really quite sure where to change it plz. Do you mean I should download a clone then I make the change on it. Because now I am just trying to install using pip install s2geomety command

From: smcallis @.> Sent: Monday, October 2, 2023 3:39 PM To: google/s2geometry @.> Cc: Abdurauf Satoti @.>; Author @.> Subject: Re: [google/s2geometry] installion s2geometry on windows' issues (Issue #330)

External email to Cardiff University - Take care when replying/opening attachments or links. Nid ebost mewnol o Brifysgol Caerdydd yw hwn - Cymerwch ofal wrth ateb/agor atodiadau neu ddolenni.

I don't have a windows machine setup for development, so this'll require a little back and forth, but as a first thing let's try changing this line: https://github.com/google/s2geometry/blob/master/src/python/CMakeLists.txt#L10

from:

set(S2GEOMETRY_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

to:

cmake_path(SET S2GEOMETRY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

- Reply to this email directly, view it on GitHubhttps://github.com/google/s2geometry/issues/330#issuecomment-1743144704, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATB7L2TFE6TGDBOGCNZXGMTX5LGX5AVCNFSM6AAAAAA5PPILOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGE2DINZQGQ. You are receiving this because you authored the thread.Message ID: @.**@.>>

smcallis commented 11 months ago

Yes you'd have to clone it manually and edit the file, you can follow the direction for building a wheel here. (Sorry, windows compilation has been a lower priority for S2 in general).

satoti commented 11 months ago

Thank you very much. I have did the following step:

  1. git clone https://github.com/google/s2geometry.git
  2. cd s2geometry
  3. mkdir build
  4. cd build I also edited the CMakelists.txt as being mentioned in pervious email. file Path: "C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\s2geometry\src\python\CMakeLists.txt"

5- I run pip install cmake_build_extension wheel

6- When I run Cmake..

I get the following error

C:\Users\c1910526\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\s2geometry\build> cmake ..

CMake Error at CMakeLists.txt:3 (project):

Generator

Visual Studio 16 2019

could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred!

From: smcallis @.> Sent: Monday, October 2, 2023 3:39 PM To: google/s2geometry @.> Cc: Abdurauf Satoti @.>; Author @.> Subject: Re: [google/s2geometry] installion s2geometry on windows' issues (Issue #330)

External email to Cardiff University - Take care when replying/opening attachments or links. Nid ebost mewnol o Brifysgol Caerdydd yw hwn - Cymerwch ofal wrth ateb/agor atodiadau neu ddolenni.

I don't have a windows machine setup for development, so this'll require a little back and forth, but as a first thing let's try changing this line: https://github.com/google/s2geometry/blob/master/src/python/CMakeLists.txt#L10

from:

set(S2GEOMETRY_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

to:

cmake_path(SET S2GEOMETRY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

- Reply to this email directly, view it on GitHubhttps://github.com/google/s2geometry/issues/330#issuecomment-1743144704, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATB7L2TFE6TGDBOGCNZXGMTX5LGX5AVCNFSM6AAAAAA5PPILOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGE2DINZQGQ. You are receiving this because you authored the thread.Message ID: @.**@.>>

smcallis commented 11 months ago

Now we're fully out of my depth. You'll have to make sure you have a working version of visual studio installed too to compile on Windows.

satoti commented 11 months ago

I have solved that issues.

Now when I run the command ====> cmake .. -G "Visual Studio 17 2022" -A x64

I receive this error :::::

-- The following features have been disabled:

CMake Error at CMakeLists.txt:53 (find_package): By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "absl", but CMake did not find one.

Could not find a package configuration file provided by "absl" with any of the following names:

abslConfig.cmake
absl-config.cmake

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

-- Configuring incomplete, errors occurred!

From: smcallis @.> Sent: Monday, October 2, 2023 4:55 PM To: google/s2geometry @.> Cc: Abdurauf Satoti @.>; Author @.> Subject: Re: [google/s2geometry] installion s2geometry on windows' issues (Issue #330)

External email to Cardiff University - Take care when replying/opening attachments or links. Nid ebost mewnol o Brifysgol Caerdydd yw hwn - Cymerwch ofal wrth ateb/agor atodiadau neu ddolenni.

Now we're fully out of my depth. You'll have to make sure you have a working version of visual studio installed too to compile on Windows.

- Reply to this email directly, view it on GitHubhttps://github.com/google/s2geometry/issues/330#issuecomment-1743280634, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATB7L2Q4LEQF3C2KU3WE37DX5LPWBAVCNFSM6AAAAAA5PPILOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGI4DANRTGQ. You are receiving this because you authored the thread.Message ID: @.**@.>>

smcallis commented 11 months ago

You'll have to have Abseil installed as well to compile.

satoti commented 11 months ago

Yes I have downloaded and install this, however, when I run this line of code I get this error:

MSBuild version 17.7.2+d6990bcfa for .NET Framework MSBUILD : error MSB1009: Project file does not exist. Switch: all.vcxproj

Also I don't know where to make these change Please !!!! in which file please

https://github.com/google/s2geometry#building

First, install Abseilhttps://github.com/abseil/abseil-cpp/blob/master/CMake/README.md#traditional-cmake-set-up. It must be configured with -DCMAKE_POSITION_INDEPENDENT_CODE=ON. s2geometry must be configured to use the same C++ version that abseil uses. The easiest way to achieve this is to pass -DCMAKE_CXX_STANDARD=14 (or -DCMAKE_CXX_STANDARD=17) to cmake when compiling both abseil and s2geometry.

From: smcallis @.> Sent: Monday, October 2, 2023 5:30 PM To: google/s2geometry @.> Cc: Abdurauf Satoti @.>; Author @.> Subject: Re: [google/s2geometry] installion s2geometry on windows' issues (Issue #330)

External email to Cardiff University - Take care when replying/opening attachments or links. Nid ebost mewnol o Brifysgol Caerdydd yw hwn - Cymerwch ofal wrth ateb/agor atodiadau neu ddolenni.

You'll have to have Abseilhttps://abseil.io/ installed as well to compile.

- Reply to this email directly, view it on GitHubhttps://github.com/google/s2geometry/issues/330#issuecomment-1743340355, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATB7L2TPZUCN6L7UL5HDMPTX5LTZVAVCNFSM6AAAAAA5PPILOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGM2DAMZVGU. You are receiving this because you authored the thread.Message ID: @.**@.>>

smcallis commented 11 months ago

Without a working windows development box I don't think I'll be able to be much more help. If you can get a working configuration that builds, it might be worth submitting a PR to update the build files so they're more cross platform compatible.

satoti commented 11 months ago

Ok thank you for your support, it a bit complex issue to use windows development box because I am running ArcGIS pro to test the model. However, is there any other ways that might be applicable to to install s2 on windows I heard about python library called pywraps2. This library seems not exist in the src/python/pywraps2_test.py. I really need this library.

From: smcallis @.> Sent: Monday, October 2, 2023 5:58 PM To: google/s2geometry @.> Cc: Abdurauf Satoti @.>; Author @.> Subject: Re: [google/s2geometry] installion s2geometry on windows' issues (Issue #330)

External email to Cardiff University - Take care when replying/opening attachments or links. Nid ebost mewnol o Brifysgol Caerdydd yw hwn - Cymerwch ofal wrth ateb/agor atodiadau neu ddolenni.

Without a working windows development box I don't think I'll be able to be much more help. If you can get a working configuration that builds, it might be worth submitting a PR to update the build files so they're more cross platform compatible.

- Reply to this email directly, view it on GitHubhttps://github.com/google/s2geometry/issues/330#issuecomment-1743405243, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATB7L2XY7DFHPXYCDMV2QH3X5LXCHAVCNFSM6AAAAAA5PPILOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGQYDKMRUGM. You are receiving this because you authored the thread.Message ID: @.**@.>>

satoti commented 10 months ago

Hi I tried installing Abseil using cmake and I get the following error. The steps are in the tutorial here

cmake --build . --target all
MSBuild version 17.7.2+d6990bcfa for .NET Framework
MSBUILD : error MSB1009: Project file does not exist.
Switch: all.vcxproj

Also here is the full output during the previous make step:

cmake -DABSL_BUILD_TESTING=ON -DABSL_USE_GOOGLETEST_HEAD=ON -DCMAKE_CXX_STANDARD=17 ..
-- Building for: Visual Studio 17 2022
-- The CXX compiler identification is MSVC 19.37.32824.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:82 (message):
  A future Abseil release will default ABSL_PROPAGATE_CXX_STD to ON for CMake
  3.8 and up.  We recommend enabling this option to ensure your project still
  builds correctly.

-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17 - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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 - not found
-- Found Threads: TRUE
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.27/Modules/ExternalProject.cmake:3136 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.27/Modules/ExternalProject.cmake:4345 (_ep_add_download_command)
  CMakeLists.txt:6 (ExternalProject_Add)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done (1.3s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/c1910526/source/abseil-cpp/build/googletest-external
MSBuild version 17.7.2+d6990bcfa for .NET Framework

  1>Checking Build System
  Creating directories for 'googletest'
  Building Custom Rule C:/Users/c1910526/source/abseil-cpp/build/googletest-external/CMakeLists.txt
  Performing download step (download, verify and extract) for 'googletest'
  -- Downloading...
     dst='C:/Users/c1910526/source/abseil-cpp/build/googletest-external/googletest-prefix/src/main.zip'
     timeout='none'
     inactivity timeout='none'
  -- Using src='https://github.com/google/googletest/archive/main.zip'
  -- Downloading... done
  -- extracting...
       src='C:/Users/c1910526/source/abseil-cpp/build/googletest-external/googletest-prefix/src/main.zip'
       dst='C:/Users/c1910526/source/abseil-cpp/build/googletest-src'
  -- extracting... [tar xfz]
  -- extracting... [analysis]
  -- extracting... [rename]
  -- extracting... [clean up]
  -- extracting... done
  No update step for 'googletest'
  No patch step for 'googletest'
  No configure step for 'googletest'
  No build step for 'googletest'
  No install step for 'googletest'
  No test step for 'googletest'
  Completed 'googletest'
  Building Custom Rule C:/Users/c1910526/source/abseil-cpp/build/googletest-external/CMakeLists.txt
-- The C compiler identification is MSVC 19.37.32824.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python3: C:/msys64/ucrt64/bin/python3.10.exe (found version "3.10.12") found components: Interpreter
-- Configuring done (36.1s)
-- Generating done (11.6s)
-- Build files have been written to: C:/Users/c1910526/source/abseil-cpp/build
jmr commented 10 months ago

Sorry, I don't really know anything about Windows. If I search for [cmake all.vcxproj], I find:

https://discourse.cmake.org/t/msbuild-error-msb1009-project-file-does-not-exist-switch-all-build-vcxproj/4107

https://stackoverflow.com/questions/71437697/cmake-msbuild-error-msb1009-project-file-does-not-exist

Try some of those suggestions.

jherico commented 8 months ago

338 should fix these issues.

jmr commented 7 months ago

Reopen #338 if this is not fixed.