Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not find MPI_C MPI_CXX MPI ... during cmake -A x64 .. #320

Open
jinwei14 opened this issue Jul 26, 2022 · 1 comment
Open

could not find MPI_C MPI_CXX MPI ... during cmake -A x64 .. #320

jinwei14 opened this issue Jul 26, 2022 · 1 comment

Comments

@jinwei14
Copy link
Contributor

Describe the bug
followed the steps in here https://github.com/microsoft/SPTAG/blob/main/docs/WindowsInstallation.md but still got an error
cmake version 3.24.0-rc1
boost == 1.67.0
SWIG Version 4.0.2

To Reproduce
Steps to reproduce the behavior:
mkdir build
cd build
cmake -A x64 ..

Error log
D:\DevRepo\SPTAG\build>cmake -A x64 ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
-- The C compiler identification is MSVC 19.32.31332.0
-- The CXX compiler identification is MSVC 19.32.31332.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.32.31326/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/Enterprise/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR /EHsc /std:c++14
-- Build type: Release
-- Platform type: x64
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- Found openmp.
-- 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
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - no
-- Found Threads: TRUE
-- Found Boost: D:/software/Boost1_67/boost_1_67_0 (found suitable version "1.67.0", minimum required is "1.66") found components: system thread serialization wserialization regex filesystem chrono date_time atomic
-- Found Boost.
-- Include Path: D:/software/Boost1_67/boost_1_67_0
-- Library Path: D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1
-- Library: optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_system-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_system-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_thread-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_thread-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_serialization-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_serialization-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_wserialization-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_wserialization-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_regex-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_regex-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_filesystem-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_filesystem-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_chrono-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_chrono-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_date_time-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_date_time-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_atomic-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_atomic-vc141-mt-gd-x64-1_67.lib
CMake Error at CMakeLists.txt:96 (add_subdirectory):
add_subdirectory given source "ThirdParty/zstd/build/cmake" which is not an
existing directory.

-- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS)
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS)
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
-- Found Boost: D:/software/Boost1_67/boost_1_67_0 (found suitable version "1.67.0", minimum required is "1.66") found components: system thread serialization wserialization regex filesystem unit_test_framework chrono date_time atomic
-- Found Boost.
-- Include Path: D:/software/Boost1_67/boost_1_67_0
-- Library Path: D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1
-- Library: optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_system-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_system-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_thread-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_thread-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_serialization-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_serialization-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_wserialization-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_wserialization-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_regex-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_regex-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_filesystem-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_filesystem-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_unit_test_framework-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_unit_test_framework-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_chrono-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_chrono-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_date_time-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_date_time-vc141-mt-gd-x64-1_67.lib;optimized;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_atomic-vc141-mt-x64-1_67.lib;debug;D:/software/Boost1_67/boost_1_67_0/lib64-msvc-14.1/libboost_atomic-vc141-mt-gd-x64-1_67.lib
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- Could not find cuda.
-- Could NOT find Python2 (missing: Python2_LIBRARIES Python2_INCLUDE_DIRS Development Development.Module Development.Embed)
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- Could not find cuda.
-- Found Python3: C:/Users/jinweizhang/AppData/Local/Programs/Python/Python310/libs/python310.lib (found version "3.10.4") found components: Development Development.Module Development.Embed
-- Found Python.
-- Include Path: C:/Users/jinweizhang/AppData/Local/Programs/Python/Python310/include
-- Library Path: C:/Users/jinweizhang/AppData/Local/Programs/Python/Python310/libs/python310.lib
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT JVM)
-- Could not find JNI.
-- Found dotnet.
-- DOTNET_EXECUTABLE: C:\windows\Microsoft.NET\Framework64/v4.0.30319/csc.exe
D:\DevRepo\SPTAG\Wrappers\inc....\AnnService\inc\Core\SearchResult.h(21) : Warning 503: Can't wrap 'operator <' unless renamed to a valid identifier.
D:\DevRepo\SPTAG\Wrappers\inc....\AnnService\inc\Core\SearchResult.h(26) : Warning 503: Can't wrap 'operator >' unless renamed to a valid identifier.
D:\DevRepo\SPTAG\Wrappers\inc....\AnnService\inc\Core\SearchResult.h(42) : Warning 503: Can't wrap 'operator ()' unless renamed to a valid identifier.
D:\DevRepo\SPTAG\Wrappers\inc....\AnnService\inc\Core\SearchResult.h(47) : Warning 503: Can't wrap 'operator ()' unless renamed to a valid identifier.
D:\DevRepo\SPTAG\Wrappers\inc....\AnnService\inc\Core\SearchResult.h(62) : Warning 503: Can't wrap 'operator ()' unless renamed to a valid identifier.
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/AnnClient.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/AnnIndex.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/BasicResult.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/CSHARPSPTAG.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/CSHARPSPTAGClient.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/CSHARPSPTAGClientPINVOKE.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/CSHARPSPTAGPINVOKE.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/Edge.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/EdgeCompare.cs
-- Add copy post-command for file D:/DevRepo/SPTAG/Wrappers/inc/NodeDistPair.cs
-- Configuring incomplete, errors occurred!
See also "D:/DevRepo/SPTAG/build/CMakeFiles/CMakeOutput.log".
See also "D:/DevRepo/SPTAG/build/CMakeFiles/CMakeError.log".

@phgn0
Copy link
Contributor

phgn0 commented Jul 27, 2022

The add_subdirectory error seems to be solved by including all git submodules when cloning SPTAG:

set GIT_LFS_SKIP_SMUDGE=1
git clone --recurse-submodules https://github.com/microsoft/SPTAG

For the other Could NOT find ... errors I'm not sure. In my environment (AWS Sagemaker Studio Pytorch 1.10 Python3.8 GPU Image) I solved them with these installs:

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb

apt-get update && apt-get install build-essential cmake libboost-all-dev swig libjna-jni mpi apt-transport-https dotnet-sdk-6.0 nvidia-cuda-toolkit default-jdk -y

phgn0 added a commit to phgn0/SPTAG that referenced this issue Jul 27, 2022
`cmake` throws an error if the `ThirdParty/zstd/build/cmake` git submodule is not cloned before the build:
```
CMake Error at CMakeLists.txt:96 (add_subdirectory):
add_subdirectory given source "ThirdParty/zstd/build/cmake" which is not an
existing directory.
```

So update the install command to avoid more users running into this.

See microsoft#320
MaggieQi added a commit that referenced this issue Jul 29, 2022
`cmake` throws an error if the `ThirdParty/zstd/build/cmake` git submodule is not cloned before the build:
```
CMake Error at CMakeLists.txt:96 (add_subdirectory):
add_subdirectory given source "ThirdParty/zstd/build/cmake" which is not an
existing directory.
```

So update the install command to avoid more users running into this.

See #320

Co-authored-by: MaggieQi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants