Problems with the installation under Ubuntu 11.04

Discussions on installation issues go here.

Moderator: Moderators

keilen
Posts: 6
Joined: 02 Jun 2011, 15:41

Problems with the installation under Ubuntu 11.04

Postby keilen » 02 Jun 2011, 15:56

While trying to install polymake under ubuntu 11.04 the following error occured:

/home/keilen/Computeralgebra/Polymake/polymake/lib/PTL/include/GenericIO.h:929:1: internal compiler error: in redirec
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make[1]: *** [perl/auto-induced_subgraph.o] Fehler 1
make[1]: Verlasse Verzeichnis '/home/keilen/Computeralgebra/Polymake/polymake/build.i686/apps/common'
make: *** [compile] Fehler 2

keilen
Posts: 6
Joined: 02 Jun 2011, 15:41

Re: Problems with the installation under Ubuntu 11.04

Postby keilen » 02 Jun 2011, 17:24

I sent the problem by email originally, and Michael answered that this problem is due to an error in the compiler, and that it can be solved by either using vanilla gcc 4.4 or by replacing the "-03" in line 9 of build.xxx/conf.make by "-01".

The latter worked, however, I now get a new error message:

/home/keilen/Computeralgebra/Polymake/polymake/lib/PTL/include/GenericIO.h:929:1: internal compiler error: in redirect_jump, at jump.c:1443
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make[1]: *** [perl/auto-induced_subgraph.o] Fehler 1
make[1]: Verlasse Verzeichnis '/home/keilen/Computeralgebra/Polymake/polymake/build.i686/apps/common'
make: *** [compile] Fehler 2

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

Re: Problems with the installation under Ubuntu 11.04

Postby joswig » 03 Jun 2011, 14:25

OK, maybe my first comment was too quick. Please restart from scratch (deleting all files produced so far) with "make distclean; make configure CXXOPT=-O1". If there is still a problem please also send the call to gcc which causes the problem (that is, not only the final error message but also the line above).

The recommended solution anyway is to install gcc 4.4.6. The versions 4.5.x of gcc don't seem to be much fun as far as C++ is concerned (your error message "internal compiler error" really means it).

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

Re: Problems with the installation under Ubuntu 11.04

Postby hampe » 04 Jun 2011, 16:18

I had exactly the same problem under Kubuntu Natty and using g++ 4.4 did fix the problem.
More precisely, I changed the symbolic links in /usr/bin to the older version ,
i.e. did a
$ rm /usr/bin/g++
$ ln -s /usr/bin/g++-4.4 /usr/bin/g++
(and the same for gcc)
Afterwards, with make distclean; ./configure; make; everything compiled and installed perfectly.

It did, however, not solve a different problem I'm having, which might be related (since it works perfectly on my office PC with Ubuntu Lucid, but not on my laptop with Kubuntu Natty):

I imported an extension that I wrote on my office PC (build... directory and Makefile were removed before importing). When I call a specific c++ function with signature

Code: Select all

perl::Object divisorByValueVector(perl::Object fan, Vector<Rational> values)
that is wrapped via

Code: Select all

Function4perl(&divisorByValueVector,"divisorByValueVector(fan::PolyhedralFan, Vector<Rational>)");
I get the following error message:
polymake: ERROR: Shared module compilation failed; see the error log below

/tmp/poly15024Taaaa0001.cc: In static member function âstatic sv* polymake::tropical::IndirectFunctionWrapper<Fptr>::call(Fptr*, sv**, char*) [with Fptr = pm::type2type<pm::perl::Object(pm::perl::Object, pm::Vector<pm::Rational>)>]â:
/tmp/poly15024Taaaa0001.cc:7: error: âfuncâ cannot be used as a function
make: *** [/tmp/poly15024Taaaa0001.o] Error 1
Again, I have no such problems on my office PC. Changing the wrapper to UserFunction4Perl also has no effect. I have several other c++ functions that all seem to work perfectly. Did someone experience similar problems? Might this be related to the OS update or am I missing something?

keilen
Posts: 6
Joined: 02 Jun 2011, 15:41

Re: Problems with the installation under Ubuntu 11.04

Postby keilen » 06 Jun 2011, 14:30

make distclean
./configure CXXOPT=-O1
make

This worked for polymake 2.9.10 as provided on the web page of the workshop in March.

With the sources from the repository I get another error message. However, if I remember right I had this error message already in March with Ubuntu 9.10, and Andreas tried to understand what the reason was:


g++ -c -o graph_compare.o -fPIC -I/home/keilen/Computeralgebra/Polymake/polymake/apps/graph/include -I/home/keilen/Computeralgebra/Polymake/polymake/apps/common/include/perl/bindings -I/home/keilen/Computeralgebra/Polymake/polymake/apps/common/include -I/home/keilen/Computeralgebra/Polymake/polymake/lib/PTL/include -I/home/keilen/Computeralgebra/Polymake/polymake/lib/PTL/include/std -march=native -ftemplate-depth-200 -Wall -Wno-strict-aliasing -Wno-parentheses -fno-inline-functions-called-once -DPOLYMAKE_APPNAME=graph -DNDEBUG -DPOLYMAKE_DEBUG=0 -O1 -MD -DBIGNAUTY -I../../external/nauty /home/keilen/Computeralgebra/Polymake/polymake/apps/graph/src/graph_compare.cc
/home/keilen/Computeralgebra/Polymake/polymake/apps/graph/src/graph_compare.cc:22:19: fatal error: nauty.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
make[1]: *** [graph_compare.o] Fehler 1
make[1]: Verlasse Verzeichnis '/home/keilen/Computeralgebra/Polymake/polymake/build.i686/apps/graph'
make: *** [compile] Fehler 2

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 Jun 2011, 15:08

It does not find the nauty headers. Please check include directories. For instance, in my installation the correct path (relative to the svn top) is

Code: Select all

build.x86_64/external/nauty/nauty.h
Actually, it looks like a weird problem; at least, I did not encounter this before.

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

Re: Problems with the installation under Ubuntu 11.04

Postby joswig » 09 Jun 2011, 09:38

I had exactly the same problem under Kubuntu Natty and using g++ 4.4 did fix the problem.
More precisely, I changed the symbolic links in /usr/bin to the older version ,
i.e. did a
$ rm /usr/bin/g++
$ ln -s /usr/bin/g++-4.4 /usr/bin/g++
This seems a bit drastic to me. It is never a good idea to get rid of a system's preferred compiler (how ever bad it may be; the people putting together the distributions have their reasons).

The proper thing to do is to install a new gcc into a separate path, usually /usr/local. A standard way to build a gcc is the following

Code: Select all

cd /tmp wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.4.6/gcc-4.4.6.tar.bz2 tar jxf gcc-4.4.6.tar.bz2 mkdir build cd build ../gcc-4.4.6/configure --prefix=/usr/local --program-suffix=-4.4.6 --enable-languages=c,c++ --enable-version-specific-runtime-libs make bootstrap make install
Afterwards you can remove the directories gcc-4.4.6 and build in /tmp. Your new compilers now are /usr/local/bin/gcc-4.4.6 and /usr/local/bin/g++-4.4.6. You can pass them through the options CC and CXX to the polymake configuration.

It is a bit difficult to analyze your error from a distance, but it is likely that you messed up your system. One thing to keep in mind is that polymake is a Perl/C++ hybrid. It needs both languages to function properly. A Perl installation is quite a subtle thing. My suspicion is that your Perl freaks out because you killed its favorite gcc.
Last edited by joswig on 09 Jun 2011, 19:26, edited 1 time in total.

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

Re: Problems with the installation under Ubuntu 11.04

Postby blorenz » 09 Jun 2011, 11:50

just some more digging into the problem, what files do you have in

Code: Select all

build.i686/external/nauty
There should be at least a Makefile, if not (or even the directory does not exist) you need to rerun configure.
If there is a Makefile, what is the result of the following command (run in the main polymake directory) and is there a nauty.h in the above directory after that?

Code: Select all

make -C build.i686/external/nauty
Thanks, Benjamin

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

Re: Problems with the installation under Ubuntu 11.04

Postby hampe » 12 Jun 2011, 18:46

I tried the following on the workshop version AND the new release 2.10:

I reverted my /usr/bin/gcc(and g++) and installed gcc-4.4.6 as suggested.

I ran ./configure CC=/usr/local/bin/gcc-4.4.6 CXX=/usr/local/bin/g++-4.4.6 LDFLAGS="-L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/lib64/"

(the LDFLAGS was necessary, since it didnt' find libgcc otherwise) and then make -j2. I get the following error, also if I run the command, Benjamin suggested (make -C build.x86_64/external/nauty/), i.e.:

/home/talio/bin/polymake/polymake-2.10/external/nauty/naututil.c:62:77: error: naututil.h: No such file or directory

(and there is no naututil.h or nauty.h in the mentioned directory or anywhere else).The actual error message is much longer, but all following error messages simply complain that something is undeclared.
joswig wrote:
It is a bit difficult to analyze your error from a distance, but it is likely that you messed up your system. One thing to keep in mind is that polymake is a Perl/C++ hybrid. It needs both languages to function properly. A Perl installation is quite a subtle thing. My suspicion is that your Perl freaks out because you killed its favorite gcc.
The error also occured before I started messing with my system (this was actually the reason I tried to recompile a freshly downloaded polymake), so it would have been the OS update that messed up my system.

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

Re: Problems with the installation under Ubuntu 11.04

Postby blorenz » 12 Jun 2011, 23:14

If you do not have those nauty headers after running the make command i posted it seems that the nauty configuration fails, which i have never seen happen.

Could you please change into

Code: Select all

build.xxx/external/nauty
and run

Code: Select all

sh -c "CC=/usr/local/bin/gcc-4.4.6 ../../../external/nauty/configure; rm makefile"
I would guess that this fails for whatever reason, and thus does not create the necessary .h files. If so please post its output.


Return to “Installing polymake”

cron