Problems with the installation under Ubuntu 11.04

Discussions on installation issues go here.

Moderator: Moderators

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

Re: Problems with the installation under Ubuntu 11.04

Postby gawrilow » 12 Jul 2011, 18:05

polymake just calls make. Whatever was configured at the very beginning and stored in build.*/conf.make, is then used for temporary compilations as well. If you have stored short program names there like gcc and g++, and install a new GCC version later, or just change your PATH, then surely you will call a different compiler than that was used for the initial build.

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

Re: Problems with the installation under Ubuntu 11.04

Postby blorenz » 13 Jul 2011, 18:38

There is/was indeed a bug in the parsing of demangled c++ types with recent version of binutils (c++filt).
The attached patch should fix the problem with non-compiling wrappers.

It can be applied by running the following command in the polymake directory.

Code: Select all

patch -p3 < path/to/cppfilt.diff
Attachments
cppfilt.diff
demangling patch for polymake 2.10
(840 Bytes) Downloaded 307 times

User avatar
hampe
Developer
Posts: 45
Joined: 29 Apr 2011, 10:42

Re: Problems with the installation under Ubuntu 11.04

Postby hampe » 13 Jul 2011, 21:58

Wonderful, that fixed it! Thank you very much!

User avatar
joswig
Main Author
Posts: 221
Joined: 24 Dec 2010, 11:10

Re: Problems with the installation under Ubuntu 11.04

Postby joswig » 08 Aug 2011, 11:45

I finally moved to Ubuntu 11.04, too. Running into the same problems discussed above. Could someone who finally succeeded please sum up all the installation steps necessary? I got stuck at the nauty issue.

The key trouble seems to be the useless standard compiler which requires to build a new gcc first. I did this a hundred times on various systems, but this time it seems to be more complicated than usual. Can we do something to improve polymake installation/configuration with a compiler that does not reside in a standard position (and thus needs to find the right kind of shared libraries and such)?

Is the problem related to slightly incompatible installations of the two gccs?

Here is the standard gcc:

Code: Select all

> gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
And here is the self compiled version (with "make -bootstrap")

Code: Select all

> gcc-4.6.1 -v Using built-in specs. COLLECT_GCC=gcc-4.6.1 COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.6.1/configure --prefix=/usr/local --program-suffix=-4.6.1 --enable-languages=c,c++ --enable-version-specific-runtime-libs Thread model: posix gcc version 4.6.1 (GCC)
Is there a better choice of configuration options?

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

Re: Problems with the installation under Ubuntu 11.04

Postby blorenz » 09 Aug 2011, 20:48

On Ubuntu 11.04, I think the easiest option is to install the ubuntu packages gcc-4.4 and g++-4.4 and use this compiler with the following configure options

Code: Select all

CC=gcc-4.4 CXX=g++-4.4
Concerning the custom gcc:
The problem is the "--enable-version-specific-runtime-libs" option together with the multilib system. The gcc installation places libgcc_s.so(.1) in

Code: Select all

$PREFIX/lib/gcc/x86_64-linux-gnu/lib{64,32}/libgcc_s.so
But the linker looks only in

Code: Select all

$PREFIX/lib/gcc/x86_64-linux-gnu/4.6.1, $PREFIX/lib64, $PREFIX/lib
which wont work.
Seems to be a long open gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32415

One fix was to add LDFLAGS="-L$PREFIX/lib/gcc/x86_64-linux-gnu/lib64/" to configure, but the ldflags will not be passed to the nauty configure script (because they should not be necessary there), thus this configure script fails and does not create nauty.h.
You can either add the ldflags to the call of the nauty configuration script in some Makefile or you could move libgcc_s.so(.1) from .../lib64 to .../4.6.1 and the 32bit versions from .../lib32 to .../4.6.1/32. (I think the second one is the better solution as this is where these files should lie)

Or, last option, remove the --enable-version-specific-runtime-libs option and reinstall gcc, then the library should end up in $PREFIX/lib{64,32} which is correct and one of the paths scanned by the linker.


Once you got it to compile the next problem you might face is that the runtime linker will find the system default libgcc_s.so / libstdc++.so first which will be too old for a pogram linked with a newer version of the library. Then you need to set a runtime linker path:

Code: Select all

-Wl,-rpath,$PREFIX/lib/gcc/x86_64-linux-gnu/4.6.1


Return to “Installing polymake”

cron