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

htm.dummy extension #998

Open
aryabhatta000 opened this issue May 28, 2023 · 5 comments
Open

htm.dummy extension #998

aryabhatta000 opened this issue May 28, 2023 · 5 comments

Comments

@aryabhatta000
Copy link

Windows 11 Pro x64 based
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32532 for x64


building 'htm.dummy' extension
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" /Tcdummy.c /Fobuild\temp.win-amd64-cpython-311\Release\dummy.obj
dummy.c
dummy.c(1): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

complete log: htm core logs.txt

@dkeeney
Copy link

dkeeney commented May 29, 2023

I cannot reproduce this error.
Try starting over by first deleting the 'build' folder then using the command "python setup.py install --user --force".

@aryabhatta000
Copy link
Author

@dkeeney Thank You.

Issue continue to persist.

dummy.c(1): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory


Complete Log
htm core logs 6.1.2023.txt

@dkeeney
Copy link

dkeeney commented Jun 3, 2023

Hmmm,well I cloned a fresh copy of htm.core and did a full build on windows using Visual Studio 2022 and Python 3.11. Everything worked.
The only thing I can think of that seems to be different is that I am using a virtual environment for python rather than running from Powershell. I am using virtualenv. I do not know if that is what makes the difference but it is the only thing I can see that is different from my setup.

@aryabhatta000
Copy link
Author

Thank you @dkeeney tried again with virtual env, with complete new download, and build. But error persist.

Though unable to understand where is the issue stemming from, could you please give some pointers.

Error Log -
htn core logs venv.txt

@dkeeney
Copy link

dkeeney commented Jun 4, 2023

I think this time, your 'build' folder at "C:\Users\aryabhatta\Documents\Programs\htm.core\htm.core-master\build" already existed so it did not actually do a build.

The compile error issue stems from not having the C++ build environment in place when it compiles the placeholder object needed to package the bindings for Python so it did not know where to find stdio.h. This normally an indication that the build system is confused.

When you run a build from scratch, the CMake build system will download and build each of the prerequisites. When that is finished, it caches everything in the build folder and then proceeds to compile the htm.core library itself, then the unit tests, then packages the Python bindings. If the build aborts for some reason, it often leaves the CMake cache in a strange state such that the next time you run the build, it just does not do what you expect. So that is why you need to delete the 'build' folder after a failed build.

If that does not fix it...there must be something else that is different between our environments.

  • Maybe your Global site-packages folder already has a (maybe corrupted or partial) entry for htm.core. ' Python -m site'
  • Check your CMake install. must be at least version 3.7 but it is best to install the latest. I am using 3.25
  • My python comes from https://www.python.org/downloads/ Python 3.11.1
  • I am using Windows Visual Studio 2022 on a PC
  • I am using virtual_env

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