Problem with Installing Polymake

Questions and problems about using polymake go here.
tomwitz355
Posts: 3
Joined: 21 Mar 2019, 20:04

Problem with Installing Polymake

Postby tomwitz355 » 21 Mar 2019, 20:15

I have been trying to install polymake from the source code and I have been getting two errors that may or may not be related. The first of the issues is that when I try to install the perl module XML::LibXSLT with cpan, it does not work. Is there another way to install this module? The other error comes when I try to compile polymake. On the second to last file, I get an error which I have copied into the bottom of the post. Has anyone ever had this issue before/know how to fix it?

Thanks.

/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(op.o): requires dynamic R_X86_64_PC32 reloc against 'PL_compcv' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(op.o): requires dynamic R_X86_64_PC32 reloc against 'PL_warnhook' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(perl.o): requires dynamic R_X86_64_PC32 reloc against 'PL_tainting' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(perl.o): requires dynamic R_X86_64_PC32 reloc against 'Perl_my_exit' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(gv.o): requires dynamic R_X86_64_PC32 reloc against 'PL_hash_state' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(toke.o): requires dynamic R_X86_64_PC32 reloc against 'PL_curcop' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(toke.o): requires dynamic R_X86_64_PC32 reloc against 'PL_charclass' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(perly.o): requires dynamic R_X86_64_PC32 reloc against 'PL_savestack_ix' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(pad.o): requires dynamic R_X86_64_PC32 reloc against 'PL_memory_wrap' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(regcomp.o): requires dynamic R_X86_64_PC32 reloc against 'PL_memory_wrap' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(dump.o): requires dynamic R_X86_64_PC32 reloc against 'PL_curstackinfo' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(util.o): requires dynamic R_X86_64_PC32 reloc against 'PL_curcop' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(mg.o): requires dynamic R_X86_64_PC32 reloc against 'PL_savestack_ix' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(mro_core.o): requires dynamic R_X86_64_PC32 reloc against 'PL_isarev' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(keywords.o): requires dynamic R_X86_64_PC32 reloc against 'PL_curcop' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(hv.o): requires dynamic R_X86_64_PC32 reloc against 'PL_body_roots' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(av.o): requires dynamic R_X86_64_PC32 reloc against 'PL_memory_wrap' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(run.o): requires dynamic R_X86_64_PC32 reloc against 'PL_op' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(pp_hot.o): requires dynamic R_X86_64_PC32 reloc against 'PL_sig_pending' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(pp_hot.o): requires dynamic R_X86_64_PC32 reloc against 'PL_isa_DOES' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(sv.o): requires dynamic R_X86_64_PC32 reloc against 'PL_sv_arenaroot' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(sv.o): requires dynamic R_X86_64_PC32 reloc against 'PL_utf8cache' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(pp.o): requires dynamic R_X86_64_PC32 reloc against 'PL_op' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(scope.o): requires dynamic R_X86_64_PC32 reloc against 'PL_memory_wrap' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(pp_ctl.o): requires dynamic R_X86_64_PC32 reloc against 'PL_curstackinfo' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(pp_sys.o): requires dynamic R_X86_64_PC32 reloc against 'PL_op' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(doop.o): requires dynamic R_X86_64_PC32 reloc against 'PL_op' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(doio.o): requires dynamic R_X86_64_PC32 reloc against 'PL_forkprocess' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(regexec.o): requires dynamic R_X86_64_PC32 reloc against 'PL_fold' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(utf8.o): requires dynamic R_X86_64_PC32 reloc against 'PL_charclass' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(taint.o): requires dynamic R_X86_64_PC32 reloc against 'PL_no_security' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(deb.o): requires dynamic R_X86_64_PC32 reloc against 'PL_curcop' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(universal.o): requires dynamic R_X86_64_PC32 reloc against 'PL_stack_base' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(perlio.o): requires dynamic R_X86_64_PC32 reloc against 'PL_markstack_ptr' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(numeric.o): requires dynamic R_X86_64_PC32 reloc against 'PL_charclass' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(mathoms.o): requires dynamic R_X86_64_PC32 reloc against 'PL_utf8skip' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(locale.o): requires dynamic R_X86_64_PC32 reloc against 'PL_warn_locale' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(locale.o): requires dynamic R_X86_64_PC32 reloc against 'categories' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(pp_pack.o): requires dynamic R_X86_64_PC32 reloc against 'PL_uuemap' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(pp_sort.o): requires dynamic R_X86_64_PC32 reloc against 'PL_sort_RealCmp' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(dquote.o): requires dynamic R_X86_64_PC32 reloc against 'PL_charclass' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(time64.o): requires dynamic R_X86_64_PC32 reloc against 'Perl_gmtime64_r' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/tommykins/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/libperl.a(DynaLoader.o): requires dynamic R_X86_64_PC32 reloc against 'PL_markstack_ptr' which may overflow at runtime; recompile with -fPIC

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

Re: Problem with Installing Polymake

Postby gawrilow » 21 Mar 2019, 23:51

This looks really bad. The build process should not use the static library libperl.a but rather the dynamic one, libperl.dylib. Is the perlbrew installation screwed? Unfortunately, I can't reproduce it, on the only Mac system I can get hold of, I'm using the system perl, /usr/bin/perl. This works fine, even though it's still a rather old version 5.18. Maybe our principal Mac expert Andreas can tell more?

paffenholz
Developer
Posts: 211
Joined: 24 Dec 2010, 13:47

Re: Problem with Installing Polymake

Postby paffenholz » 22 Mar 2019, 09:52

That doesn't look like Mac OS to me, perlbrew also exists for linux systems. Probably perl from perlbrew needs to be build with shared library support. Maybe passing

Code: Select all

-Duseshrplib
for perl installation solves the problem:

Code: Select all

perlbrew install perl-<version> -Duseshrplib
?

tomwitz355
Posts: 3
Joined: 21 Mar 2019, 20:04

Re: Problem with Installing Polymake

Postby tomwitz355 » 26 Mar 2019, 01:23

That doesn't look like Mac OS to me, perlbrew also exists for linux systems. Probably perl from perlbrew needs to be build with shared library support. Maybe passing

Code: Select all

-Duseshrplib
for perl installation solves the problem:

Code: Select all

perlbrew install perl-<version> -Duseshrplib
?
Thank you, this fixed the problem of polymake not compiling. However, I am still unable to run polymake as I do not have XML::LibXSLT installed. I tried using cpan to install it and this did not work. I googled some other ways to install it and none of them worked. Do you know any way to install XML::LibXSLT? I am on a linux machine if that clarifies anything.

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

Re: Problem with Installing Polymake

Postby joswig » 26 Mar 2019, 09:35

Do you know any way to install XML::LibXSLT? I am on a linux machine if that clarifies anything.
Most distributions have this as a package. What is your setup, exactly?

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

Re: Problem with Installing Polymake

Postby gawrilow » 26 Mar 2019, 10:52

If you are on a Linux machine, you'd ideally not have to mess with perlbrew altogether but simply install system packages. polymake is happy with any perl starting with 5.18 which is about 6 years old. But you must have your reasons for using perlbrew, and in this case you can't use system packages because perl is very sensitive to version mismatches. You have to use CPAN.

I don't dare to give an exact diagnose for such a vague problem description as "this did not work" without seeing any logs or error messages; I can just suspect that you are missing the headers for the underlying C library, in this case libxslt1. When you install a perl module from CPAN which interfaces a C library, it has to be compiled for your exact perl version, and for that you must have the developer's package for that library installed. On Ubuntu, for example, this package is called libxslt1-dev. It must contain, among others, a header file libxslt/xslt.h . If this hint does not help, please post the log of your CPAN session.

tomwitz355
Posts: 3
Joined: 21 Mar 2019, 20:04

Re: Problem with Installing Polymake

Postby tomwitz355 » 27 Mar 2019, 15:28

If you are on a Linux machine, you'd ideally not have to mess with perlbrew altogether but simply install system packages. polymake is happy with any perl starting with 5.18 which is about 6 years old. But you must have your reasons for using perlbrew, and in this case you can't use system packages because perl is very sensitive to version mismatches. You have to use CPAN.

I don't dare to give an exact diagnose for such a vague problem description as "this did not work" without seeing any logs or error messages; I can just suspect that you are missing the headers for the underlying C library, in this case libxslt1. When you install a perl module from CPAN which interfaces a C library, it has to be compiled for your exact perl version, and for that you must have the developer's package for that library installed. On Ubuntu, for example, this package is called libxslt1-dev. It must contain, among others, a header file libxslt/xslt.h . If this hint does not help, please post the log of your CPAN session.
Thank you for your help. I was successfully able to install libxslt1. However, now when I try to run polymake I get an error. I am running Ubuntu 18.04.2 and this is the error:

ERROR: "/usr/local/share/polymake/apps/group/rules/action.rules", line 206: "/usr/local/share/polymake/apps/group/rules/action.rules", line 201: syntax error near "on_nonhomog_container>"
syntax error near "on_container>"

I looked at the file in question and it appears to be read only. I am not sure if the file is supposed to be like this or if I did something.

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

Re: Problem with Installing Polymake

Postby gawrilow » 27 Mar 2019, 18:57

The source files, including rules, are usually installed in read-only mode, to prevent inadvertent changes. It's not the reason of your next problem. Again, without seeing any logs I can only guess that the build process was not completed before and the shared module group.so does not contain functions from the source file orbit.cc; or that you already had an old polymake installation at the same location which was not cleaned up properly during the new installation but you overlooked an error message... I suggest to do a clean installation from scratch, preserving the full log for further investigations.


Return to “Helpdesk”