Closed Horep closed 1 day ago
Hi,
When I try the alternative route, on the github.io site, the following occurs. The first part is just me moving from the visual studio area into my own user area. Again, I'm not sure what to do to have ngbem properly install. As far as I can tell, it should function. I clearly have a C compiler, it recognises the python installation, it can find netgen, so I am quite confused.
** Visual Studio 2022 Developer Command Prompt v17.10.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Program Files\Microsoft Visual Studio\2022\Community>cd..
C:\Program Files\Microsoft Visual Studio\2022>cd..
C:\Program Files\Microsoft Visual Studio>cd..
C:\Program Files>cd..
C:\>cd users
C:\Users>cd gpb22197
C:\Users\gpb22197>cd python
The system cannot find the path specified.
C:\Users\gpb22197>cd ngbemstuff
The system cannot find the path specified.
C:\Users\gpb22197>cd ngbemstuff
C:\Users\gpb22197\ngbemstuff>git clone https://github.com/Weggler/ngbem.git
Cloning into 'ngbem'...
remote: Enumerating objects: 2871, done.
remote: Counting objects: 100% (806/806), done.
remote: Compressing objects: 100% (287/287), done.
remote: Total 2871 (delta 491), reused 745 (delta 458), pack-reused 2065 (from 1)
Receiving objects: 100% (2871/2871), 40.38 MiB | 27.06 MiB/s, done.
Resolving deltas: 100% (1657/1657), done.
C:\Users\gpb22197\ngbemstuff>cd ngbem
C:\Users\gpb22197\ngbemstuff\ngbem>mkdir build
C:\Users\gpb22197\ngbemstuff\ngbem>cd build
C:\Users\gpb22197\ngbemstuff\ngbem\build>cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.40.33812.0
-- The CXX compiler identification is MSVC 19.40.33812.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.40.33807/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.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: C:/Program Files/Python312/python.exe (found version "3.12.5") found components: Interpreter Development.Module
-- Found Netgen: C:/Users/gpb22197/AppData/Roaming/Python/Python312/site-packages/netgen/cmake
-- Install dir: C:/Users/gpb22197/AppData/Roaming/Python/Python312/site-packages
-- Configuring done (6.1s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/gpb22197/ngbemstuff/ngbem/build
C:\Users\gpb22197\ngbemstuff\ngbem\build>make -j4 install
make: *** No rule to make target 'install'. Stop.
C:\Users\gpb22197\ngbemstuff\ngbem\build>```
Try
cmake --build . --config RelWithDebInfo --target install
instead of make -j 4 install
(this only works with gnu make installed, like on Linux and MacOS).
This attempt also failed, but it at least ran a bit more this time.
I don't see the stubs
folder it references during C:/Users/gpb22197/ngbemstuff/ngbem/build/stubs/ngbem
in my build
folder
Note that I do not have admin access on this machine, in case that is important.
** Visual Studio 2022 Developer Command Prompt v17.10.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Program Files\Microsoft Visual Studio\2022\Community>cd ..
C:\Program Files\Microsoft Visual Studio\2022>cd ..
C:\Program Files\Microsoft Visual Studio>cd ..
C:\Program Files>cd .
C:\Program Files>cd ..
C:\>cd users
C:\Users>cd gpb22197
C:\Users\gpb22197>cd ngbemstuff
C:\Users\gpb22197\ngbemstuff>git clone https://github.com/Weggler/ngbem.git
Cloning into 'ngbem'...
remote: Enumerating objects: 2871, done.
remote: Counting objects: 100% (806/806), done.
remote: Compressing objects: 100% (287/287), done.
remote: Total 2871 (delta 491), reused 745 (delta 458), pack-reused 2065 (from 1)
Receiving objects: 100% (2871/2871), 40.38 MiB | 23.16 MiB/s, done.
Resolving deltas: 100% (1657/1657), done.
C:\Users\gpb22197\ngbemstuff>cd ngbem
C:\Users\gpb22197\ngbemstuff\ngbem>mkdir build
C:\Users\gpb22197\ngbemstuff\ngbem>cd build
C:\Users\gpb22197\ngbemstuff\ngbem\build>cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.40.33812.0
-- The CXX compiler identification is MSVC 19.40.33812.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.40.33807/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.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: C:/Program Files/Python312/python.exe (found version "3.12.5") found components: Interpreter Development.Module
-- Found Netgen: C:/Users/gpb22197/AppData/Roaming/Python/Python312/site-packages/netgen/cmake
-- Install dir: C:/Users/gpb22197/AppData/Roaming/Python/Python312/site-packages
-- Configuring done (7.1s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/gpb22197/ngbemstuff/ngbem/build
C:\Users\gpb22197\ngbemstuff\ngbem\build>cmake --build . --config RelWithDebInfo --target install
MSBuild version 17.10.4+10fbfbf2e for .NET Framework
1>Checking Build System
Building Custom Rule C:/Users/gpb22197/ngbemstuff/ngbem/CMakeLists.txt
ngbem.cpp
python_bem.cpp
hmat.cpp
intrules.cpp
test_compression.cpp
Generating Code...
Creating library C:/Users/gpb22197/ngbemstuff/ngbem/build/RelWithDebInfo/_ngbem.lib and object C
:/Users/gpb22197/ngbemstuff/ngbem/build/RelWithDebInfo/_ngbem.exp
_ngbem.vcxproj -> C:\Users\gpb22197\ngbemstuff\ngbem\build\RelWithDebInfo\_ngbem.pyd
Building Custom Rule C:/Users/gpb22197/ngbemstuff/ngbem/CMakeLists.txt
1>
-- Install configuration: "RelWithDebInfo"
-- Installing: C:/Users/gpb22197/AppData/Roaming/Python/Python312/site-packages/Lib/site-packages/n
gbem/_ngbem.lib
-- Installing: C:/Users/gpb22197/AppData/Roaming/Python/Python312/site-packages/Lib/site-packages/n
gbem/_ngbem.pyd
-- Installing: C:/Users/gpb22197/AppData/Roaming/Python/Python312/site-packages/Lib/site-packages/n
gbem/__init__.py
CMake Warning (dev) at cmake_install.cmake:80 (file):
Syntax error in cmake code at
C:/Users/gpb22197/ngbemstuff/ngbem/build/cmake_install.cmake:80
when parsing string
${CMAKE_INSTALL_PREFIX}/Lib\site-packages/ngbem
Invalid escape sequence \s
Policy CMP0010 is not set: Bad variable reference syntax is an error. Run
"cmake --help-policy CMP0010" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at cmake_install.cmake:80 (file):
file INSTALL cannot find
"C:/Users/gpb22197/ngbemstuff/ngbem/build/stubs/ngbem": File exists.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: The command "setlocal [C:\Users\gpb22197\ngbemstuff\ngbem\build\insta
ll.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: C:\Users\gpb22197\AppData\Roaming\Python\Python37\site-packages\cmake
\data\bin\cmake.exe -DBUILD_TYPE=RelWithDebInfo -P cmake_install.cmake [C:\Users\gpb22197\ngbemstuff\
ngbem\build\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\gpb22197\ngbemstuff\ngbem
\build\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: :cmEnd [C:\Users\gpb22197\ngbemstuff\ngbem\build\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\g
pb22197\ngbemstuff\ngbem\build\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: :cmErrorLevel [C:\Users\gpb22197\ngbemstuff\ngbem\build\install.vcxpr
oj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: exit /b %1 [C:\Users\gpb22197\ngbemstuff\ngbem\build\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: :cmDone [C:\Users\gpb22197\ngbemstuff\ngbem\build\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\gpb22197\ngbemstuff\ngbem
\build\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon
.targets(166,5): error MSB3073: :VCEnd" exited with code 1. [C:\Users\gpb22197\ngbemstuff\ngbem\build
\install.vcxproj]
C:\Users\gpb22197\ngbemstuff\ngbem\build>```
I have instead opted to use WSL to build ngbem, using WSL with Ubuntu. This seems to have worked without any trouble at all, so may be the way forward.
Hi, back again on a new machine, with a new installation problem. I repeated all the previous steps in my other post, including using x64 Native Tools. When attempting to run the installation sequence, I receive a CMake syntax error:
The problem appears to be in how Windows writes the path, as seen in this post. They link a solution using
file(TO_CMAKE_PATH "<path>" <variable>)
, but I am unsure how to actually use this since I am usingpip
.