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

SPATAG build failure with cmake #357

Open
anujkapoor007 opened this issue Feb 20, 2023 · 3 comments
Open

SPATAG build failure with cmake #357

anujkapoor007 opened this issue Feb 20, 2023 · 3 comments

Comments

@anujkapoor007
Copy link

Describe the bug
A clear and concise description of what the bug is.

Trying to build the project and getting following error:-

15>Error copying file "C:/Users/anujkapoor/repos/SPTAG/Wrappers/inc/SPTAG.py" to "C:/Users/anujkapoor/repos/SPTAG/build/Release".
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: The command "setlocal
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/Users/anujkapoor/repos/SPTAG/Wrappers/inc/SPTAG.py C:/Users/anujkapoor/repos/SPTAG/build/Release
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: :cmEnd
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: :cmErrorLevel
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: exit /b %1
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: :cmDone
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
15>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: :VCEnd" exited with code 1.
15>Done building project "_SPTAG.vcxproj" -- FAILED.

To Reproduce
Steps to reproduce the behavior:

  1. Create a build folder inside repo
  2. go inside build folder and execute cmake -A x64 ..
  3. From the build folder, open SPTAGLib.sln solution in Visual Studio and compile all projects
  4. See error

Expected behavior
Appliction should compile

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@anujkapoor007
Copy link
Author

image

@JingyuanHe1222
Copy link

Hi, I'm encountering a similar issue. Have you solve it by any chance?

@khaiwang
Copy link

khaiwang commented Jun 5, 2024

I encountered a similar issue and it was caused by a failure to build the Python bindings for the code. To resolve this, please check the following:

SWIG Library Path:

Ensure that the SWIG_LIB environment variable is correctly set to the directory containing the SWIG library files (e.g., swig.swg and python.swg). This directory is typically found within the SWIG installation directory.

swig -swig_lib
export SWIG_LIB=/usr/local/share/swig/4.0.2  # Adjust the path based on your installation

SWIG Version:

Verify that you are using the correct version of SWIG. The required version should match the version specified by your project. You can check the version by running:

swig -version

Ensure the output meets the swig version requirement (SWIG Version >= 4.0.2).

It works in my case.

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

3 participants