Compiling on Windows with Visual Studio 2015

First post!

I have been trying to compile the master branch of nupic.core on Windows 10 with Visual Studio 2015. I tried to follow the steps outlined the readme.

Here is a list of the things I needed to do:

  1. Make sure python 2.7 is in PATH env. I have had python 3.5 and I think that caused some issues when running cmake
  2. Install numpy by using the command: “pip install numpy==1.12.1”
  3. Make sure the “patch” command is in PATH

I then run cmake as described in the readme. The output is here

In Visual Studio, when running “ALL_BUILD” in Release configuration I get the output

A few things I have noticed are:

  1. LINK : fatal error LNK1181: cannot open input file ‘C:/Users/chhenning/Numenta/nupic.core/build/scripts/ThirdParty/Build/YamlStaticLib/yaml.lib’

    -> I fixed it by copying the lib file into the correct folder

  2. LINK : fatal error LNK1181: cannot open input file ‘C:/Users/chhenning/Numenta/nupic.core/build/scripts/ThirdParty/Install/YamlCppStaticLib/lib/yaml-cpp.lib’

    -> I renamed from “libyaml-cppmd.lib” to “libyaml-cpp.lib”. Is that a debug lib?

  3. LINK : fatal error LNK1104: cannot open file ‘$<TARGET_FILE:nupic_core_solo>’
    -> Not sure what to about it.

There are many compiler errors and even ICE’s (Internal Compiler Errors). For instance:

------ Build started: Project: nupic_core_solo, Configuration: Release x64 ------
Cell.cpp
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(170): error C2876: ‘nupic::Serializable’: not all overloads are accessible
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(93): note: see declaration of ‘nupic::Serializable’
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(181): error C2876: ‘nupic::Serializable’: not all overloads are accessible
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(93): note: see declaration of ‘nupic::Serializable’
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(365): warning C4838: conversion from ‘double’ to ‘const nupic::Real’ requires a narrowing conversion
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(862): error C2876: ‘nupic::Serializable’: not all overloads are accessible
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(383): note: see declaration of ‘nupic::Serializable’
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(884): error C2876: ‘nupic::Serializable’: not all overloads are accessible
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Segment.hpp(383): note: see declaration of ‘nupic::Serializable’
C:\Users\chhenning\Numenta\nupic.core\src\nupic/algorithms/Cell.hpp(258): error C2876: ‘nupic::Serializable’: not all overloads are accessible

My questions are.

  1. Can nupic.core be compiled on Windows using Visual Studio?

  2. Is there interest in having a working Visual Studio solution that contains all of nupic.core source code? I think most of the compiler errors can be fixed quite easily.

Thanks,
Christian

Thanks for your efforts, Christian. I’m not sure if anyone is actively compiling nupic.core in VS at this point. I know no one at Numenta is doing this. But there has been interest in the past.

If anyone else is working on this, or interested in helping, please post here!

Hi Matt,

thanks for your answer.

I have created a github repo which contains the nupic c++ source code. My first goals are to have the nupic library compile and to have the tests run through.

Quick, question there is some c++ code which needs fixing in Visual Studio 2017. Would your team be interested in incorporating those changes? I can go into more detail in a follow up email.

Regards,
Christian

It depends on how extensive and complicated the changes are. If this is a simple PR that doesn’t break our pipelines, I’ll do what I can to get it reviewed and merged, and another version of nupic.core released. But if it will take extensive review from a C++ expert on the research time, not so sure it would be worth creating a PR. Let me know how much work you think it will be.

Hi Matt,

good news I can compile nupic.core on Visual Studio 2017! Attached is a screenshot with the debugger on. :slight_smile:

Except for commenting out some yaml-cpp stuff, I think my code changes are pretty minor.

Regards,
Christian

1 Like

That’s great Christian! Thanks. I’ll look for your PR Monday.

Hi Matt,

here is a small update. With my cloned nupic.core repo I can now run 319 unit tests from which 37 are failing. Here is an overview.

I have created a fork and have now started setting myself up for a pull request. There is an issue with the “yaml-cpp” library. I think currently nupic.core is using an outdated version and my visual studio package manager doesn’t support it. Hence, I commented out some code. That would be explanation for some of the unit test failures.

Another “issue” or shall I say new feature is that I’m using python 3 bindings. So maybe we can use this release as a test bed for python 3? I saw some requests for that somewhere on the forum.

I’ll you updated.

Regards,
Christian

1 Like