When building NUPIC getting error undefined references to YAML in 64-bit Ubuntu

I was compiling NUPIC by using the tutorial page Compiling NuPIC on Ubuntu 14
At the build stage when I give make -j4 I am getting these messages. My Ubuntu is 15.10 and gcc is 5.2.1 . Please help. I have been trying this for a few days now. I ran

cmake $NUPIC_CORE -DCMAKE_INSTALL_PREFIX=../release 
-DPY_EXTENSIONS_DIR=$NUPIC_CORE/bindings/py/nupic/bindings 
-DCMAKE_AR:PATH=/usr/bin/gcc-ar -DCMAKE_RANLIB:PATH=/usr/bin/gcc-ranlib

and then did make -j4

/tmp/cc1ysgzr.ltrans11.ltrans.o: In function `nupic::YAMLUtils::toValue(YAML::Node const&, NTA_BasicType)':
<artificial>:(.text+0xfaa): undefined reference to `YAML::Node::GetScalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
<artificial>:(.text+0x14d1): undefined reference to `YAML::Node::GetScalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
<artificial>:(.text+0x19d9): undefined reference to `YAML::Node::GetScalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
<artificial>:(.text+0x1a51): undefined reference to `YAML::Node::GetScalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
<artificial>:(.text+0x1a9f): undefined reference to `YAML::Node::GetScalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
/tmp/cc1ysgzr.ltrans11.ltrans.o:<artificial>:(.text+0x1af4): more undefined references to `YAML::Node::GetScalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const' follow
collect2: error: ld returned 1 exit status
src/CMakeFiles/unit_tests.dir/build.make:1124: recipe for target 'src/unit_tests' failed
make[2]: *** [src/unit_tests] Error 1
CMakeFiles/Makefile2:562: recipe for target 'src/CMakeFiles/unit_tests.dir/all' failed
make[1]: *** [src/CMakeFiles/unit_tests.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2