Page 1 of 1

Can't locate loadable object for module Polymake::Ext in @INC

Posted: 12 Mar 2021, 04:25
by gdavtor
I'm on Mac OS 11.2 and I'm using brew to install polymake 4.3. No issues with brew, but when I try to execute the polymake binary I get the following error:

Code: Select all

Can't locate loadable object for module Polymake::Ext in @INC (@INC contains: /usr/local/Cellar/polymake/4.3/share/polymake/perllib /usr/local/Cellar/polymake/4.3/lib/polymake/perlx /usr/local/Cellar/polymake/4.3/libexec/perl5/lib/perl5/darwin-thread-multi-2level /usr/local/Cellar/polymake/4.3/libexec/perl5/lib/perl5 /usr/local/Cellar/perl/5.32.1_1/lib/perl5/site_perl/5.32.1/darwin-thread-multi-2level /usr/local/Cellar/perl/5.32.1_1/lib/perl5/site_perl/5.32.1 /usr/local/Cellar/perl/5.32.1_1/lib/perl5/5.32.1/darwin-thread-multi-2level /usr/local/Cellar/perl/5.32.1_1/lib/perl5/5.32.1 /usr/local/lib/perl5/site_perl/5.32.1/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.32.1) at /usr/local/Cellar/polymake/4.3/share/polymake/perllib/Polymake/Namespaces.pm line 18. Compilation failed in require at /usr/local/Cellar/polymake/4.3/share/polymake/perllib/Polymake/Namespaces.pm line 18. BEGIN failed--compilation aborted at /usr/local/Cellar/polymake/4.3/share/polymake/perllib/Polymake/Namespaces.pm line 18. Compilation failed in require at /usr/local/Cellar/polymake/4.3/share/polymake/perllib/Polymake.pm line 29. BEGIN failed--compilation aborted at /usr/local/Cellar/polymake/4.3/share/polymake/perllib/Polymake.pm line 29. Compilation failed in require at /usr/local/Cellar/polymake/4.3/libexec/perl5/bin/polymake line 159. BEGIN failed--compilation aborted at /usr/local/Cellar/polymake/4.3/libexec/perl5/bin/polymake line 159.

I had a previous version of polymake installed which got botched when I upgraded the OS. The same error occurs when I try 'polymake --reconfigure'

Re: Can't locate loadable object for module Polymake::Ext in @INC

Posted: 12 Mar 2021, 18:14
by paffenholz
I assume that your previous version of polymake was not installed with 'brew install polymake' but either completely self compiled or using brew just for the dependencies, and then polymake was installed into the standard location with 'ninja -C build/Opt install'?

In that case you probably have a version of Polymake::Ext left from the previous version in the same place as brew tries to install it again. And brew refuses to overwrite if it has not created the file itself (or some other condition including this one). You can try to remove polymake via brew again (so that brew removes it from its list of installed packages) and then remove all traces of polymake in /usr/local. Afterwards brew should install the correct version of Polymake::ext.

I did not realize this problem until it happened to someone else, as I always use a fresh mac os installation for testing, sorry. I added a small note to the installation page in the wiki about this.

If my guess is wrong or this does not solve the problem then please provide some more details: Which type of mac do you have, and how was the previous version of polymake installed.

Andreas

Re: Can't locate loadable object for module Polymake::Ext in @INC

Posted: 13 Mar 2021, 19:41
by gdavtor
Thank you for your help! I brew uninstalled and then tried to delete any files in /usr/local that had to do with polymake. Here is what I get when I grep for polymake now:

Code: Select all

> grep -rl "polymake" ./ grep: .//Homebrew/Library/Homebrew/os/mac/pkgconfig/fuse/osxfuse.pc: No such file or directory grep: .//Homebrew/Library/Homebrew/os/mac/pkgconfig/fuse/fuse.pc: No such file or directory .//var/homebrew/linked/ppl/ChangeLog .//var/homebrew/linked/ppl/share/doc/ppl/ChangeLog .//var/homebrew/linked/ppl/share/doc/ppl/ppl-user-1.2-html/index.html .//opt/ppl/ChangeLog .//opt/ppl/share/doc/ppl/ChangeLog .//opt/ppl/share/doc/ppl/ppl-user-1.2-html/index.html grep: .//opt/gcc@9: No such file or directory .//Cellar/ppl/1.2_1/ChangeLog .//Cellar/ppl/1.2_1/share/doc/ppl/ChangeLog .//Cellar/ppl/1.2_1/share/doc/ppl/ppl-user-1.2-html/index.html grep: .//texlive/2012/bin/universal-darwin/man/man: No such file or directory grep: .//texlive/2012/bin/x86_64-darwin/man/man: No such file or directory grep: .//texlive/2012/texmf/doc/man/man: No such file or directory grep: .//share/man/man1/brew-cask.1: No such file or directory .//share/doc/ppl/ChangeLog .//share/doc/ppl/ppl-user-1.2-html/index.html grep: .//share/zsh/site-functions/_brew_cask: No such file or directory
It looks like all of those files are inconsequential for installation purposes. So I should be good to go re-installing. However, when I re-installed via brew, I got the exact same error as before.

I am on MacOS 11.2.1 (intel). The previous polymake was installed from source (then on MacOS 10.15 I believe) following the instructions on the website. I was unsuccessful in getting it to work that time and just gave up. Here is the forum post I posted at the time: viewtopic.php?f=10&t=1820

Re: Can't locate loadable object for module Polymake::Ext in @INC

Posted: 15 Mar 2021, 00:39
by paffenholz
Yes, sorry, remains of the previous installation of polymake were not the only problem. I was able to reproduce this on my VM.

The perl bottle of brew has been updated from 5.32.0 to 5.32.1 since I compiled the bottles. As polymake uses perl XS, which is compiled code and depends on the precise version of perl, the binary of polymake then contained perl parts for the "wrong" perl version. I guess I will have to find a way to get notified if the perl version is changed.

I have compiled and uploaded new bottles that use the new perl version 5.32.1. On my test installation I can now successfully start polymake. You will have to uninstall polymake again and then reinstall.

Andreas

Re: Can't locate loadable object for module Polymake::Ext in @INC

Posted: 15 Mar 2021, 03:50
by gdavtor
That worked! Thank you so much.