Building error nupic.core in Ubuntu 16.04 LTS

but I really do not know how to uninstall those eggs.
Should I remove them from my harddisk?

I really don’t know. It looks like you installed them with pip at some point in the past. Maybe you can review your shell history for pip commands? I don’t understand how pip decides where to put stuff. It depends on user permissions and the --user flag. You’re hopefully not using sudo for these commands…

@rhyolight
I am going to sleep now (it is midnight in Germany), maybe I have some ideas tomorrow morning. Best thanks for your support.

1 Like

@rhyolight
I used the following methods for solving problems:
1- delete the directory “nupic.core” and “nupic.research” for solving "eggs"
2- upgrade pip 8.1.1 into pip 8.1.2
3- clone nupic.core and install
pip install https://s3-us-west-2.amazonaws.com/artifacts.numenta.org/numenta/nupic.core/releases/nupic.bindings/nupic.bindings-0.4.4-cp27-none-linux_x86_64.whl
pip install nupic
Please note that I have to use “sudo pip install …” due to written permission into python 2.7 directory.
4- build nupic.core
Once again, I have the same error as before:
/usr/bin/ar: invalid option – ‘R’

I think, it seems to be a problem with CMake.
Can anyone help me?
Thanks

@rhyolight
In the meantime, 2 steps for nupic installation were successfully done

pip install https://s3-us-west-2.amazonaws.com/artifacts.numenta.org/numenta/nupic.core/releases/nupic.bindings/nupic.bindings-0.4.4-cp27-none-linux_x86_64.whl
pip install nupic

After that I tried to build the nupic.core again, and had the same error as before.
After very long debugging, I found out I have to modify the script “libtool” in the directory
./nupic.core/build/scripts/ThirdParty/Build/Apr1StaticLib at the line 147 as follows:

#AR="gcc-ar RANLIB=gcc-ranlib"
AR="gcc-ar"

After modifying the file “libtool” I can build all the thirdparty SW.
But I am not sure if there is any further problem after this modification.

Can you explain this effect?

By building nupic.core, we have additional errors

make -j1
[  3%] Built target CapnProto
[  6%] Built target ZStaticLib
[  9%] Built target Apr1StaticLib
[ 12%] Built target Swig
[ 15%] Built target YamlStaticLib
[ 19%] Built target YamlCppStaticLib
[ 23%] Built target AprUtil1StaticLib
[ 61%] Built target nupic_core_solo
[ 61%] Linking CXX executable cpp_region_test
/tmp/ccSSPRP1.ltrans1.ltrans.o: In function `nupic::NuPIC::init()':
<artificial>:(.text+0xea1): undefined reference to `apr_app_initialize'
/tmp/ccSSPRP1.ltrans8.ltrans.o: In function `nupic::IFStream::diagnostics(char const*)':
<artificial>:(.text+0x2dd9): undefined reference to `apr_pool_create_ex'
<artificial>:(.text+0x2f13): undefined reference to `apr_dir_open'
/tmp/ccSSPRP1.ltrans16.ltrans.o: In function `nupic::Directory::Iterator::~Iterator() [clone .constprop.244]':
<artificial>:(.text+0x617): undefined reference to `apr_dir_close'
<artificial>:(.text+0x622): undefined reference to `apr_pool_destroy'
/tmp/ccSSPRP1.ltrans16.ltrans.o: In function `nupic::Directory::Iterator::next(nupic::Directory::Entry&) [clone .constprop.243]':
<artificial>:(.text+0x13f2): undefined reference to `apr_dir_read'
/tmp/ccSSPRP1.ltrans24.ltrans.o: In function `nupic::VectorFile::appendFloat32File(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, bool) [clone .constprop.50]':
<artificial>:(.text+0x2819): undefined reference to `apr_stat'
collect2: error: ld returned 1 exit status
src/CMakeFiles/cpp_region_test.dir/build.make:107: recipe for target 'src/cpp_region_test' failed
make[2]: *** [src/cpp_region_test] Error 1
CMakeFiles/Makefile2:438: recipe for target 'src/CMakeFiles/cpp_region_test.dir/all' failed
make[1]: *** [src/CMakeFiles/cpp_region_test.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Are those errors known by you?
Best thanks

Binh

I’m not sure I’m going to be able to help you until I’ve done a complete installation test on Ubuntu 16, and I won’t have time to do that for awhile. My apologies :frowning:.

@rhyolight
No problem that you do not have time for it.
Now, I find out a systematical solution for this building problem:
In the file: CommonCompilerConfig.cmake at the line 313,
please change:
set(EXTERNAL_STATICLIB_CONFIGURE_DEFINITIONS_OPTIMIZED_STR “AR=gcc-ar RANLIB=gcc-ranlib”)
into
set(EXTERNAL_STATICLIB_CONFIGURE_DEFINITIONS_OPTIMIZED_STR “AR=gcc-ar”)

Best regards
Binh

@thanh-binh.to, see fix in Fixes AR and RANLIB settings for Release builds of configure-based externals with g++ >=4.9 by vitaly-krugl ¡ Pull Request #1032 ¡ numenta/nupic.core-legacy ¡ GitHub

1 Like

Thanks for helping debug the issue with AR and RANLIB

Fix has been merged into nupic.core master

@rhyolight, @vkruglikov: best thank for your support.
I have just download the current version of nupic.core and built successfully
Best regards, Binh