# Installation issues on RedHat 7

**URL:** <https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554>\
**Category:** NuPIC\
**Created:** [November 4, 2016, 4:00pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554 "2016-11-04T16:00:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 4:00pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/1 "2016-11-04T16:00:30Z")

</div>

Hi- I am having issues installing nupic-core on my Redhat7 system.(nupic installed ok.). Not sure how much info to put here. But here goes and thanks

```auto
ERROR #1:
-- Check for working CXX compiler: /bin/g++ -- broken
      CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "/bin/g++" is not able to compile a simple test program.
  It fails with the following output:
   Change Dir: /tmp/tmpVb17vn/scripts/ThirdParty/Build/CapnProto/CMakeFiles/CMakeTmp
  Run Build Command:/bin/gmake "cmTryCompileExec1656490146/fast"
  gmake[3]: Entering directory
  `/tmp/tmpVb17vn/scripts/ThirdParty/Build/CapnProto/CMakeFiles/CMakeTmp'
  /bin/gmake -f CMakeFiles/cmTryCompileExec1656490146.dir/build.make
  CMakeFiles/cmTryCompileExec1656490146.dir/build
  gmake[4]: Entering directory
  `/tmp/tmpVb17vn/scripts/ThirdParty/Build/CapnProto/CMakeFiles/CMakeTmp'
  /usr/bin/cmake -E cmake_progress_report
  /tmp/tmpVb17vn/scripts/ThirdParty/Build/CapnProto/CMakeFiles/CMakeTmp/CMakeFiles
  1
  Building CXX object
  CMakeFiles/cmTryCompileExec1656490146.dir/testCXXCompiler.cxx.o
  /bin/g++ -fvisibility=hidden -shared-libgcc -fdiagnostics-show-option -m64
  -fPIC -Wno-unused-variable -Wno-unused-parameter
  -Wno-incompatible-pointer-types -Wno-deprecated-declarations
  -static-libstdc++ -std=c++11 -fvisibility-inlines-hidden -DHAVE_UNISTD_H -o
  CMakeFiles/cmTryCompileExec1656490146.dir/testCXXCompiler.cxx.o -c
  /tmp/tmpVb17vn/scripts/ThirdParty/Build/CapnProto/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
  Linking CXX executable cmTryCompileExec1656490146
  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec1656490146.dir/link.txt --verbose=1
  /bin/g++ -fvisibility=hidden -shared-libgcc -fdiagnostics-show-option -m64
  -fPIC -Wno-unused-variable -Wno-unused-parameter
  -Wno-incompatible-pointer-types -Wno-deprecated-declarations
  -static-libstdc++ -std=c++11 -fvisibility-inlines-hidden -DHAVE_UNISTD_H
  CMakeFiles/cmTryCompileExec1656490146.dir/testCXXCompiler.cxx.o -o
  cmTryCompileExec1656490146 -rdynamic
  /bin/ld: cannot find -lstdc++
  collect2: error: ld returned 1 exit status
  gmake[4]: Leaving directory
  `/tmp/tmpVb17vn/scripts/ThirdParty/Build/CapnProto/CMakeFiles/CMakeTmp'
  gmake[3]: Leaving directory
  `/tmp/tmpVb17vn/scripts/ThirdParty/Build/CapnProto/CMakeFiles/CMakeTmp'
  gmake[4]: *** [cmTryCompileExec1656490146] Error 1
  gmake[3]: *** [cmTryCompileExec1656490146/fast] Error 2
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)

```

```auto
ERROR # 2 
pcretest.c:1506:14: error: conflicting types for 'sys_errlist'
 extern char *sys_errlist[];
              ^
In file included from /usr/include/stdio.h:853:0,
                 from pcretest.c:54:
/usr/include/bits/sys_errlist.h:27:26: note: previous declaration of 'sys_errlist' was here
 extern const char *const sys_errlist[];
                          ^
make[4]: *** [pcretest-pcretest.o] Error 1
make[3]: *** [all] Error 2
Could not build PCRE
make[2]: *** [ThirdParty/Stamp/Swig/Swig-configure] Error 1
make[1]: *** [external/CMakeFiles/Swig.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 58, in <module>
    
  File "/cfs/ad/binello/nupic.core/bindings/py/setup.py", line 201, in <module>
    getExtensionFiles(platform)
  File "/cfs/ad/binello/nupic.core/bindings/py/setup.py", line 166, in getExtensionFiles
    generateExtensions()
  File "/cfs/ad/binello/nupic.core/bindings/py/setup.py", line 185, in generateExtensions
    subprocess.check_call(["make", "-j3"])
  File "/opt/Anaconda2/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j3']' returned non-zero exit status 2

```

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [November 4, 2016, 6:15pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/2 "2016-11-04T18:15:19Z")

</div>

Hi @Sev, thanks for posting your question here. The answers will help others who may run into the same problem.

First of all, it looks like you don’t have g++ installed, which is a C++ compiler. You need to install a C++ 11 compatible compiler on your system. I recommend GCC 4.8 or higher.

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 6:17pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/3 "2016-11-04T18:17:15Z")

</div>

No thats whats confusing  
We have 4.8.5  
ex: g++ --version  
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [November 4, 2016, 6:19pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/4 "2016-11-04T18:19:38Z")

</div>

You might have more than one `gcc` compiler installed, and the build is picking up the wrong one. Try setting the following environment variables:

```bash
export CC=gcc
export CXX=g++

```

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 6:22pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/5 "2016-11-04T18:22:16Z")

</div>

Also for error num 2. It looks like HAVE\_STRERROR is not getting defined  
so that in pcretest.c a strerror function is getting defined, Thus causing duplicate declaration error. Is there something I need to set to have this correctly defined.

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 6:23pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/6 "2016-11-04T18:23:26Z")

</div>

Right those are defined correctly as well  
ex:  
acnvm010 259:printenv CC  
gcc  
acnvm010 260:printenv CXX  
g++

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [November 4, 2016, 6:30pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/7 "2016-11-04T18:30:25Z")

</div>

This could also be a `cmake` / `gmake` issue. I have never used gmake, so not sure how compatible it is with our build.

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 6:42pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/8 "2016-11-04T18:42:55Z")

</div>

The make and gmake are one and the same on our system  
acnvm010 274:ls /bin/make  
-rwxr-xr-x. 1 root root 182736 Jan 26 2014 /bin/make  
acnvm010 275:ls /bin/gmake  
lrwxrwxrwx. 1 root root 4 Mar 24 2016 /bin/gmake -\> make

So make is used to build  
and from output I do see cmake is getting used for configuration

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [November 4, 2016, 6:44pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/9 "2016-11-04T18:44:36Z")

</div>

Ok, just a guess. This still seems to be the main indicator, IMO:

```
The C++ compiler "/bin/g++" is not able to compile a simple test program.

```

Have you compiled any other C++ programs with g++ on this system?

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 6:48pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/10 "2016-11-04T18:48:16Z")

</div>

Yes. that works fine.  
Do you know what the test is that is used here  
If I can find it, I could try compiling it separately.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [November 4, 2016, 6:51pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/11 "2016-11-04T18:51:16Z")

</div>

I don’t know, I thought that cmake was running that check. Honestly I’m not all that familiar with C++ build systems.

Here’s another idea… the error is caused by compilation of Capnproto, which you might try installing yourself manually. I’ve done this before on OS X and it worked for me. See instructions at [https://capnproto.org/](https://capnproto.org/)

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 6:58pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/12 "2016-11-04T18:58:38Z")

</div>

Yes cmake does.  
Ok. I can try that.  
But Let me ask you about error #2 also  
as it may relate

Any idea why HAVE\_STRERROR is not getting defined.  
If I look at code it indicates this should only happen of some old Sun systems.  
There arent any env variables/flags I need to set are there ?

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [November 4, 2016, 7:06pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/13 "2016-11-04T19:06:36Z")

</div>

Are you using [these instructions](https://github.com/numenta/nupic.core#developer-installation)? These are the commands you should be running assuming `$NUPIC_CORE` points to the `nupic.core` checkout directory:

```bash
mkdir -p $NUPIC_CORE/build/scripts
cd $NUPIC_CORE/build/scripts
cmake $NUPIC_CORE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../release -DPY_EXTENSIONS_DIR=$NUPIC_CORE/bindings/py/nupic/bindings

```

Just making sure you’re running the right commands.

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 7:09pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/14 "2016-11-04T19:09:01Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 7:19pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/15 "2016-11-04T19:19:43Z")

</div>

Also I checked the version of cmake it is 2.8.11  
Is that Ok ?  
I see that there is a 3.7 release  
Is a paticular version required ?

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 9:30pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/16 "2016-11-04T21:30:26Z")

</div>

So I downloaded built and installed capnproto ok  
How do I now prevent the nupic from doing the same ?  
It still seems to go do all the same things as before

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [November 4, 2016, 9:59pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/17 "2016-11-04T21:59:20Z")

</div>

I’m sorry @sev, I don’t know the answer to your question. I don’t have time to spin up a VM with Red Hat right now, and I’ve run out of ideas. Give it a few days and maybe someone else will help you out.

Anyone else have NuPIC running on Red Hat?

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 4, 2016, 10:10pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/18 "2016-11-04T22:10:01Z")

</div>

ok thanks  
have a good weekend

---

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://discourse.numenta.org/u/Sev)\
**Post date:** [November 8, 2016, 4:11pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/19 "2016-11-08T16:11:38Z")

</div>

Hi I was able to fix our problem. In case it helps others this is a summary.  
The compiler test failed, when looking further it indicated it could not find libstdc++  
even though this is present on our system. Looking further the link specification  
was calling out a static version of this library i.e.: -static-libstdc++  
I am not sure why in this case they would call out for a static version, anyhow this is not part of the standard install. Once this was installed I was able to compile.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [November 8, 2016, 4:48pm UTC](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554/20 "2016-11-08T16:48:25Z")

</div>

@sev Excellent! Thanks for being persistent and especially for posting your solution here.

[Next page](https://discourse.numenta.org/t/installation-issues-on-redhat-7/1554.md?page=2)
