Installation problems CentOS 6.8

Discussions on installation issues go here.

Moderator: Moderators

Posts: 3
Joined: 13 Apr 2017, 19:32

Installation problems CentOS 6.8

Postby barry » 13 Apr 2017, 19:41

I am having problems with Some background: We are using CentOS 6.8. The system versions of gcc and perl are too old for
polymake, so I built newer versions. We use environment modules to control which version is then used. I used gcc 5.4 and perl 5.16.3.

Everything compiles fine, but when starting polymake, I get the error message:

swadmin@pleiades Ext]$ polymake
Can't load '/usr/public/polymake/3.0/lib/polymake/perlx/5.16.3/x86_64-linux-thread-multi/auto/Polymake/Ext/'\
for module Polymake::Ext: /usr/lib64/ version `GLIBCXX_3.4.15' not found (required by /usr/public/\
polymake/3.0/lib/polymake/perlx/5.16.3/x86_64-linux-thread-multi/auto/Polymake/Ext/ at /usr/public/perl/5.1\
6.3/lib/ line 191.
at /usr/public/polymake/3.0/share/polymake/perllib/Polymake/ line 17.
Compilation failed in require at /usr/public/polymake/3.0/share/polymake/perllib/Polymake/ line 17.
BEGIN failed--compilation aborted at /usr/public/polymake/3.0/share/polymake/perllib/Polymake/ line 1

I built polymake using the version of libstdc++ that is specific to my installation of gcc 5.4. However, the loader always wants to use /usr/lib64/libstdc++. I have set:


So, it should find in /usr/public/gnu/gcc/5.4.0/lib64. It doesn't, nor does it find any libraries there, instead finding them in /lib64 or /usr/lib64.

[swadmin@pleiades Ext]$ ldd
./ /usr/lib64/ version `GLIBCXX_3.4.15' not found (required by ./
./ /usr/lib64/ version `GLIBCXX_3.4.21' not found (required by ./ => (0x00007ffc109a1000) => /usr/public/gnu/gcc/5.4.0/lib/ (0x00002ae7b25ea000) => /usr/lib64/ (0x00002ae7b2849000) => /lib64/ (0x00002ae7b2aa4000) => /usr/lib64/ (0x00002ae7b2cc1000) => /lib64/ (0x00002ae7b3015000) => /usr/lib64/ (0x00002ae7b322b000) => /lib64/ (0x00002ae7b3531000) => /usr/lib64/ (0x00002ae7b37b6000) => /lib64/ (0x00002ae7b39cb000) => /lib64/ (0x00002ae7b3be1000) => /usr/public/gnu/gcc/5.4.0/lib/ (0x00002ae7b3f76000)
/lib64/ (0x000000376dc00000) => /lib64/ (0x00002ae7b41ea000) => /lib64/ (0x00002ae7b43ee000)

Note: is able to find the correct version of (and other libraries)

swadmin@pleiades lib]$ ldd => (0x00007ffd677e6000) => /usr/public/gnu/gcc/5.4.0/lib/ (0x00002ba42b6c1000) => /usr/lib64/ (0x00002ba42b93f000) => /lib64/ (0x00002ba42bb9a000) => /usr/lib64/ (0x00002ba42bdb7000) => /lib64/ (0x00002ba42c10b000) => /usr/public/perl/5.16.3/lib/CORE/ (0x00002ba42c321000) => /usr/public/gnu/gcc/5.4.0/lib64/ (0x00002ba42c5a6000) => /lib64/ (0x00002ba42c935000) => /usr/public/gnu/gcc/5.4.0/lib64/ (0x00002ba42cbb9000) => /usr/public/gnu/gcc/5.4.0/lib64/ (0x00002ba42cdda000) => /lib64/ (0x00002ba42cff1000) => /usr/public/gnu/gcc/5.4.0/lib/ (0x00002ba42d385000)
/lib64/ (0x000000376dc00000) => /lib64/ (0x00002ba42d5f9000) => /lib64/ (0x00002ba42d7fe000) => /lib64/ (0x00002ba42da17000) => /lib64/ (0x00002ba42dc4e000) => /lib64/ (0x00002ba42de52000) => /lib64/ (0x00002ba42e05a000)

So, there is something with the way was compiled that it doesn't see LD_LIBRARY_PATH to pick up the correct

****** Do you have suggestions on how to fix the problem? ********

Note. I am using polymake-3.0r2.

An Aside: I had problems compiling version 3.1 (with gcc 5.1, gcc 5.4, gcc 6.3), which is why I used version 3.0. I always get the following:

In file included from <command-line>:0:0:
/usr/public/polymake/sources/polymake-3.1gcc5.4/bundled/libnormaliz/apps/polytope/src/ In function 'pm:
:RationalFunction<> polymake::polytope::{anonymous}::nmz_convert_HS(const libnormaliz::HilbertSeries&)':
/usr/public/polymake/sources/polymake-3.1gcc5.4/bundled/libnormaliz/apps/polytope/src/ error: no
matching function for call to 'convert_to(pm::Vector<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >)'
UniPolynomial<> HSnum(convert_to<Integer>(Vector<mpz_class>(nmzHilb.getNum())),
In file included from /usr/public/polymake/sources/polymake-3.1gcc5.4/include/core/polymake/Integer.h:26:0,
from /usr/public/polymake/sources/polymake-3.1gcc5.4/include/core-wrappers/polymake/Integer.h:20,
from /usr/public/polymake/sources/polymake-3.1gcc5.4/bundled/libnormaliz/apps/polytope/src/normali,
from <command-line>:0:
/usr/public/polymake/sources/polymake-3.1gcc5.4/include/core/polymake/internal/converters.h:164:8: note: candidate:
template<class Target, class Source> Target pm::convert_to(const Source&, typename std::enable_if<((pm::can_initia
lize<Source, Target>::value && ((! std::is_arithmetic<T>::value) || (! std::is_arithmetic<_Tp>::value))) && (! std:
:is_base_of<T1, T2>::value)), void**>::type)
Target convert_to(const Source& x,
/usr/public/polymake/sources/polymake-3.1gcc5.4/include/core/polymake/internal/converters.h:164:8: note: template
argument deduction/substitution failed:
/usr/public/polymake/sources/polymake-3.1gcc5.4/include/core/polymake/internal/converters.h: In substitution of 'te
mplate<class Target, class Source> Target pm::convert_to(const Source&, typename std::enable_if<((pm::can_initializ
e<Source, Target>::value && ((! std::is_arithmetic<T>::value) || (! std::is_arithmetic<_Tp>::value))) && (! std::is
_base_of<T1, T2>::value)), void**>::type) [with Target = pm::Integer; Source = pm::Vector<__gmp_expr<__mpz_struct [
1], __mpz_struct [1]> >]':
/usr/public/polymake/sources/polymake-3.1gcc5.4/bundled/libnormaliz/apps/polytope/src/ require
d from here
/usr/public/polymake/sources/polymake-3.1gcc5.4/include/core/polymake/internal/converters.h:164:8: error: no type n
amed 'type' in 'struct std::enable_if<false, void**>'

Thank you


User avatar
Main Author
Posts: 349
Joined: 25 Dec 2010, 17:40

Re: Installation problems CentOS 6.8

Postby gawrilow » 18 Apr 2017, 01:42

On the first problem: is not a "normal" shared library despite of its suffix '.so' . It's a dynamic module loaded with dlopen() some time after the program (perl interpreter) start; however, LD_LIBRARY_PATH is only consulted by dynamic loader for shared libraries required immediately at the program start. This is not a specific problem of polymake but a common mess for everybody using a manually built gcc with shared libraries installed at a non-standard location. When you link any C++program compiled with your custom gcc, add an option -Wl,-rpath,/path/where/your/custom/libstdc++/dwells . If you want to fix this for polymake only, you can set this as a configure script option LDFLAGS=... . If you want to use this compiler for other projects as well and have this option applied automatically, you can create a specs file (gcc -dumpspecs) and insert the option into the *link command, in a dynamic linking clause.

The second problem (failing to compile the libnormaliz extension) looks like you've picked a strange version of GMP C++ wrappers (libgmpxx), either too old or too new for polymake. Have you installed it yourself or does it come from a host system RPM package; does it match the version of libgmp?

Posts: 109
Joined: 10 Jan 2011, 17:21

Re: Installation problems CentOS 6.8

Postby blorenz » 18 Apr 2017, 11:03

A few comments on the required versions:

polymake 3.0 should build with all gcc versions starting from 4.2 (but might have issues with very new ones), the minimal perl version is 5.10.0 (see ), both should be satisfied in CentOS 6.

The compilation error for the normaliz extensions might also be caused by mixing a rather old gmp version (< 5.1) with a quite new gcc version. One workaround would be to disable this extension by passing

Code: Select all

to the configure script.

Posts: 3
Joined: 13 Apr 2017, 19:32

Re: Installation problems CentOS 6.8

Postby barry » 18 Apr 2017, 18:30

Thank you for the suggestions. I now have 3.0 working

I added the rpath to LDFLAGS= in the configure step, which solved the
problem in 3.0 I also added --with-gmp= and --with-mpfr in the
configure step. I thought I had specified the location of the
libraries and include files in the LDFLAGS, LD_LIBRARY_PATH, CFLAGS,
CXXFLAGS corresponding to the version of gcc that I was using, but it
seems the old system ones (installed via rpms) were being used. This
didn't seem to cause problems for 3.0, but I now know I am using the
correct versions of gmp and mpfr. I used gcc version 5.4.0 and perl

For 3.1. I am still getting the same error in my original post, even
with --with-gmp= and --with-mpfr that corresponds to gcc 5.4.0.
I think we are fine with 3.0. If you want to pursue this, I would be
happy to help.


Posts: 3
Joined: 13 Apr 2017, 19:32

Re: Installation problems CentOS 6.8

Postby barry » 18 Apr 2017, 19:48

Version 3.1 is now working. I recompiled gmp 6.0. I had forgotten to add:



User avatar
Main Author
Posts: 349
Joined: 25 Dec 2010, 17:40

Re: Installation problems CentOS 6.8

Postby gawrilow » 18 Apr 2017, 23:25

Thanks for the positive feedback!

I guess, we should add a version coherence check for gmp and gmpxx in our magic configuration script.

Return to “Installing polymake”