Welcome to the world of software development (on a Mac)!
Let me point out that development on a Mac is very challenging. This has recently become more acute with the release of Monterey (OSX 12) because I believe a prime directive at Apple is security and the protections in place with 12 are severe. Does this mean you cannot develop with a Mac? No, of course not, but you need to be aware that at every turn the OS is going to question why you want access to a file and why you want to write one and where. I am simplifying this for the purpose of discussion, but the main takeaway is have patience.
You may also want to invest in Parallels. It emulates Windows 11 excellently and not only allows you to run everything developed for Windows, but it also provides something of a protected sandbox environment.
Yeah, I guess in this case, though, it is just a question of how to get all the dependencies I need installed, so that I can even build it properly. I have no idea at the moment how to get make on the system. I guess maybe I have to use something else now like brew to build it. How crazy.
The following just worked for me (OSX 12.3) yesterday afternoon because some of the dependencies were updated. This is a modification of @sheiser1 's list from earlier in the thread. If you have already cloned the git repo, delete that clone and clone it again.
modify cmake file CommonCompilerConfig.cmake: see below
run python setup: python setup.py install
The cmake file to modify is CommonCompilerConfig.cmake on line 282 you’ll find this line:
set (internal_compiler_warning_flags ${internal_compiler_warning_flags} -Werror -Wextra -Wreturn-type -Wunused -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers)
The flag -Werror appears to convert warnings into errors. Remove that flag, changing that line to:
set (internal_compiler_warning_flags ${internal_compiler_warning_flags} -Wextra -Wreturn-type -Wunused -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers)
Here is the latest entry on git log for my version of htm.core, if you see this entry in your git log, your version is at least as up to date as mine and will, hopefully, compile:
Oh, I forgot about homebrew, glad you mentioned it. It seems that in ‘the big picture’ the cognoscenti recommend that brew be used under Monterey. Brew will handle all the dependencies automatically, but there are a few pkgs (MacText comes to mind) that brew falls apart on. I go brew first and then to separate pkg installs as needed.
Yeah, been trying to use it, but a lot of stuff still isn’t working right.
Not really sure what I am doing wrong.
Might have to start over again.
Would be nice to get this working, so an explicit set of steps can be provided, so people aren’t struggling to even get it to compile and work properly.
I call that the ‘tragic cascade’, like in King Lear. When I was an undergrad I worked for the Computer Center (think ‘Mainframe’) and sat at a theatre ticket window and helped other students with their programming questions. It was exclusively other engineers as we had no CS department. Anyway, and it was invariably a civil engineer trying to run a sewage system piping simulation, I would say “Take that comma out and rerun it.” Then they would be incredulous, because the number of errors were extensive. Then I had to explain that because of that one comma, FORTRAN was not declaring the variable and all through the program, each time that variable or a subsequent calc was accessed, the compiler threw an error. The ‘tragic cascade’
We just made some changes (updated the third part software versions) in htm.core that ‘might’ help. Start with a new clone and rebuild. You will probably need Brew.
We no longer have a Mac machine to use for regression tests so input from Mac users is particularly valuable to us.
So if you still have problems with htm.core or have updates for our docs, please create a new issue at: Issues · htm-community/htm.core · GitHub and we will attempt to address it.
I just tried the new clone. It builds successfully and passes all tests on Monterey 12.3.1, using Anaconda Python 3.9 and Xcode13.2.
However, the build fails with Xcode13.3. This failure is not new and is the reason for my keeping Xcode 13.2 on my system.
Install any of the Python requirements with conda if they are in the conda repository. If not use pip. I think that hexy was the only one in the latter category.
You can download older Xcode versions form Apple Developer in the “Additional downloads” section. You will need an Apple Id to access that. BTW maintaining multiple Xcode versions is a pain. If you want to know how to do it, just Google it.
Follow the build instructions in the htm.core Read.me. If it complains of any missing packages look for them first in the conda repository (you may need to use conda-forge versions) and if that fails try pip.
I am using the procedure described by TheFinn, and when I try
$python setup.py install
I get messages
Traceback (most recent call last):
File “/Users/hal/htm.core/setup.py”, line 32, in
from packaging import version
ModuleNotFoundError: No module named ‘packaging’