Polymake doesn't start after compilation

Discussions on installation issues go here.

Moderator: Moderators

mws
Posts: 32
Joined: 16 Jan 2014, 22:57

Polymake doesn't start after compilation

I compiled Polymake 2.13 on GNU/Linux (apparently) without any errors. But when I try to start polymake it aborts with the following error message:

Code: Select all

Polymake::Core::CPlusPlus::bootstrap not defined at /home/mws/software/polymake-2.13-1/share/polymake/perllib/Polymake/Core/CPlusPlus.pm line 2308 BEGIN failed--compilation aborted at /home/mws/software/polymake-2.13-1/share/polymake/perllib/Polymake/Core/CPlusPlus.pm line 2308. Compilation failed in require at /home/mws/software/polymake-2.13-1/share/polymake/perllib/Polymake.pm line 84. Compilation failed in require at software/polymake-2.13-1/bin/polymake line 166. BEGIN failed--compilation aborted at software/polymake-2.13-1/bin/polymake line 166. 
Does anyone have an idea what the problem might be?

assarf
Developer
Posts: 74
Joined: 12 Oct 2011, 15:52

Re: Polymake doesn't start after compilation

• linux distribution
• c/c++ compiler
• perl version
• could you paste your environment variables related to perl (e.g. PERL5LIB, ...)
• maybe you could strace polymake with: "strace -o logfile.txt /path/to/polymake" and upload the logfile.txt here
thanks
no signature

mws
Posts: 32
Joined: 16 Jan 2014, 22:57

Re: Polymake doesn't start after compilation

Here is information about my Linux system, the Perl version I use and my gcc:

Code: Select all

mws@allegro:~$uname -a Linux allegro 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux mws@allegro:~$ perl --version This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi (with 88 registered patches, see perl -V for more detail) Copyright 1987-2011, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. mws@allegro:~$gcc --version gcc (Debian 4.7.2-5) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. mws@allegro:~$ 
The following is dump of all my shell variables:

Code: Select all

mws@allegro:~$env MODULE_VERSION_STACK=3.2.9 TERM=xterm SHELL=/bin/bash SSH_CLIENT=160.45.109.222 60331 22 SSH_TTY=/dev/pts/13 USER=mws LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: MODULE_VERSION=3.2.9 MAIL=/var/mail/mws PATH=/home/mws/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/dell/srvadmin/bin PWD=/home/mws LANG=de_DE.UTF-8 MODULEPATH=/usr/share/modules/versions:/usr/Modules/$MODULE_VERSION/modulefiles:/usr/share/modules/modulefiles LOADEDMODULES= KRB5CCNAME=FILE:/tmp/krb5cc_193382_zEujTd SHLVL=1 HOME=/home/mws LOGNAME=mws SSH_CONNECTION=160.45.109.222 60331 160.45.42.200 22 MODULESHOME=/usr/share/modules OMP_NUM_THREADS=1 DISPLAY=localhost:10.0 XAUTHORITY=/var/tmp/Xauthority-mws/Xauthority module=() { eval /usr/bin/modulecmd bash \$* } _=/usr/bin/env OLDPWD=/home/mws/software 
And attached you find the strace output. I had to call the file logfile.poly because otherwise the forum software would complain "The extension is not allowed" and not upload anything.

Please let me know if I can provided further information.
Attachments
logfile.poly

gawrilow
Main Author
Posts: 308
Joined: 25 Dec 2010, 17:40

Re: Polymake doesn't start after compilation

Everything looks healthy.

If you haven't deleted the build tree yet, I'd propose to try the following:

- find the files CPlusPlus.o, Bootstrap.h, and Ext.so in the build tree and delete them

- repeat make' and make install'

Don't run make clean'.

A possible reason is a mysterious glitch in the makefiles which causes, rarely and absolutely randomly, a wrong compiler command to be run for that specific object file. It only happens in a clean build with a high number of parallel jobs. So far I saw every time a compiler error and hence a stopped build process, but maybe you've got another manifestation of this bug...

mws
Posts: 32
Joined: 16 Jan 2014, 22:57

Re: Polymake doesn't start after compilation

Wow. This solved the problem. So, thanks a lot!

This actually impressed me so much that I ran a few further tests:

make -j6: Gives me always the error that I reported above.
make -j15: always works
make -j5: always works
make -j4: compilations ends with an error, namely

make[3]: *** [cddlib.o] Fehler 1
make[3]: *** Warte auf noch nicht beendete Prozesse...
make[2]: *** [compile] Fehler 2
make[2]: Leaving directory /home/mws/scratch/polymake-2.13-1/build.x86_64/staticlib/cdd'
make[1]: *** [compile-staticlibs] Fehler 2
make[1]: Leaving directory /home/mws/scratch/polymake-2.13-1/build.x86_64/apps/polytope'
make: *** [compile] Fehler 2

So here is my conjecture:

Code: Select all

make -jn compiles without any errors and the compilation process produces an executable binary if and only if n is odd. 

gawrilow
Main Author
Posts: 308
Joined: 25 Dec 2010, 17:40

Re: Polymake doesn't start after compilation

This is indeed a fantastic finding. Nevertheless I'd like to close this hole.
If you don't mind, can you please try out the following patch?
Attachments
changeset_c46f245e5da6c40839510fbcf49b9b209edd9456.diff

mws
Posts: 32
Joined: 16 Jan 2014, 22:57

Re: Polymake doesn't start after compilation

I have no experience in patching things. What I did is this: I changed into lib/core/src/perl and typed patch < changeset_c46f245e5da6c40839510fbcf49b9b209edd9456.diff. Is this correct?

In any case, I then compiled polymake as usual with make -j6. The compilation process went through without any errors but resulted in a binary that gave me the error I reported above. So the problem is still the same.

gawrilow
Main Author
Posts: 308
Joined: 25 Dec 2010, 17:40

Re: Polymake doesn't start after compilation

I have no experience in patching things. What I did is this: I changed into lib/core/src/perl and typed patch < changeset_c46f245e5da6c40839510fbcf49b9b209edd9456.diff. Is this correct?
Almost.

You should change into the top source directory and run patch -p0 <changeset*.diff'.
Usually a patch covers several files residing in different subdirectories, therefore it should be applied from the common root.
In this particular case the patch consisted of just one file, so maybe it accidentally worked out, if patch' did not complain.
In any case, I then compiled polymake as usual with make -j6. The compilation process went through without any errors but resulted in a binary that gave me the error I reported above. So the problem is still the same.
That's sad. Can you please post the files CPlusPlus.cc and Bootstrap.h, generated in the run that produces an invalid binary?

mws
Posts: 32
Joined: 16 Jan 2014, 22:57

Re: Polymake doesn't start after compilation

patch didn't complain and I checked before that you just wanted to patch one file. So I think the patch was applied successfully. But good to know how to do it for other patches in general.

Anyway, please find attached the two files you asked for. CPlusPlus.pm I found in the directory branch that was created by make install (to be precise, I found it in share/polymake/perllib/Polymake/Core) and Bootstrap.h I only found in the source directory in build.x86_64/perlx-5.14.2-x86_64-linux-gnu-thread-multi/.

I had to rename Bootstrap.h to able to upload it to this forum -- have you ever considered lifting the file name extension ban in this forum?

One more thing I noticed. When I try to run make clean I get the following error after it already worked for a bit:

Code: Select all

BUILD FAILED /home/mws/scratch/polymake-2.13-1/bundled/jreality/java/build.xml:31: The following error occurred while executing this line: Target "clean" does not exist in the project "jReality". Total time: 1 second make[3]: *** [clean] Fehler 1 make[2]: *** [clean] Fehler 2 make[1]: *** [clean] Fehler 2 make: *** [clean-arch] Fehler 2 `
Attachments
Bootstrap.h.pm
Renamed from Bootstrap.h to Bootstrap.h.pm to be able to upload file.
CPlusPlus.pm

gawrilow
Main Author
Posts: 308
Joined: 25 Dec 2010, 17:40

Re: Polymake doesn't start after compilation

CPlusPlus.pm is not interesting, it comes from the source repository. I was curious about CPlusPlus.cc, it is automatically generated and resides in the same directory as Bootstrap.h.

The latter looks OK, in particular, the function Polymake::Core::CPlusPlus::bootstrap which is allegedly missing in your binary is appropriately defined.