macOS Installation Problems

Questions and problems about using polymake go here.
PaulH
Posts: 4
Joined: 22 Mar 2021, 17:07

macOS Installation Problems

Postby PaulH » 22 Mar 2021, 17:18

Hi,

I just tried installing polymake using the steps here https://polymake.org/doku.php/install/macos, and I got a couple of error messages that I couldn't directly resolve.

Under "Install dependencies with Perlbrew", I tried the command

Code: Select all

brew link --force readline
and I got the following error message:

Code: Select all

Refusing to link macOS provided/shadowed software: readline For compilers to find readline you may need to set: export LDFLAGS="-L/usr/local/opt/readline/lib" export CPPFLAGS="-I/usr/local/opt/readline/include"
Adding these lines to the terminal didn't help either. Afterwards I was able to install polymake using the rest of the commands (and it didn't give me any error messages), but when I tried running polymake I got

Code: Select all

Can't locate object method "new" via package "Term::ReadLine::Gnu" at ...


I tried a quick Google search, but I couldn't find anything to resolve this problem. I'm currently using mac OS X 10.15.7.

Thanks in advance!

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

Re: macOS Installation Problems

Postby paffenholz » 24 Mar 2021, 09:49

On 10.15 and later it is not anymore necessary to force link the readline library. I have updated the installation instructions. But the installation of Term::ReadLine::Gnu should have worked regardless. Can you retry to install it with

Code: Select all

cpanm Term::ReadLine::Gnu
and if it fails post the error message?

PaulH
Posts: 4
Joined: 22 Mar 2021, 17:07

Re: macOS Installation Problems

Postby PaulH » 25 Mar 2021, 16:21

Ok, so the installation failed. I first got the following:

Code: Select all

! ! Can't write to /Library/Perl/5.18 and /usr/local/bin: Installing modules to /Users/paulalexanderhelminck/perl5 ! To turn off this warning, you have to do one of the following: ! - run me as a root or with --sudo option (to install to /Library/Perl/5.18 and /usr/local/bin) ! - Configure local::lib in your existing shell to set PERL_MM_OPT etc. ! - Install local::lib by running the following commands ! ! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) ! --> Working on Term::ReadLine::Gnu Fetching http://www.cpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.40.tar.gz ... OK Configuring Term-ReadLine-Gnu-1.40 ... OK Building and testing Term-ReadLine-Gnu-1.40 ... FAIL ! Installing Term::ReadLine::Gnu failed. See /Users/paulalexanderhelminck/.cpanm/work/1616685219.73626/build.log for details. Retry with --force to force install it.
I tried doing it with --force, but that didn't change anything. The error log is as follows:

Code: Select all

cpanm (App::cpanminus) 1.9018 on perl 5.018004 built for darwin-thread-multi-2level Work directory is /Users/paulalexanderhelminck/.cpanm/work/1616684888.73451 You have make /usr/bin/make You have LWP: 6.05 You have LWP::Protocol::https: 6.04 You have /usr/bin/tar: bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6 You have /usr/bin/unzip ! ! Can't write to /Library/Perl/5.18 and /usr/local/bin: Installing modules to /Users/paulalexanderhelminck/perl5 ! To turn off this warning, you have to do one of the following: ! - run me as a root or with --sudo option (to install to /Library/Perl/5.18 and /usr/local/bin) ! - Configure local::lib in your existing shell to set PERL_MM_OPT etc. ! - Install local::lib by running the following commands ! ! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) ! Searching Term::ReadLine::Gnu () on cpanmetadb ... --> Working on Term::ReadLine::Gnu Fetching http://www.cpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.40.tar.gz -> OK Unpacking Term-ReadLine-Gnu-1.40.tar.gz Entering Term-ReadLine-Gnu-1.40 Checking configure dependencies from META.json Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.60) Configuring Term-ReadLine-Gnu-1.40 Running Makefile.PL cc -I/usr/local/opt/readline/include -I/usr/local/opt/ncurses/include -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -DHAVE_STRING_H rlver.c -o rlver -L/usr/local/opt/readline/lib -L/usr/local/opt/ncurses/lib -fstack-protector -lreadline -ltermcap <<<It seems that you have the GNU Readline Library version 8.1.>>> cc -I/usr/local/opt/readline/include -I/usr/local/opt/ncurses/include -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0801 rlmalloc.c -o rlmalloc -L/usr/local/opt/readline/lib -L/usr/local/opt/ncurses/lib -fstack-protector -lreadline -ltermcap Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Term::ReadLine::Gnu Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.60) Building and testing Term-ReadLine-Gnu-1.40 cp Gnu/XS.pm blib/lib/Term/ReadLine/Gnu/XS.pm AutoSplitting blib/lib/Term/ReadLine/Gnu/XS.pm (blib/lib/auto/Term/ReadLine/Gnu/XS) blib/lib/Term/ReadLine/Gnu/XS.pm: some names are not unique when truncated to 8 characters: directory blib/lib/auto/Term/ReadLine/Gnu/XS: rl_bind_key.al, rl_bind_key_if_unbound.al, rl_bind_keyseq.al, rl_bind_keyseq_if_unbound.al truncate to rl_bind_ rl_set_keymap.al, rl_set_key.al truncate to rl_set_k cp Gnu.pm blib/lib/Term/ReadLine/Gnu.pm Running Mkbootstrap for Gnu () chmod 644 "Gnu.bs" "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Gnu.bs blib/arch/auto/Term/ReadLine/Gnu/Gnu.bs 644 "/usr/bin/perl" "/System/Library/Perl/5.18/ExtUtils/xsubpp" -typemap '/System/Library/Perl/5.18/ExtUtils/typemap' -typemap '/Users/paulalexanderhelminck/.cpanm/work/1616684888.73451/Term-ReadLine-Gnu-1.40/typemap' Gnu.xs > Gnu.xsc mv Gnu.xsc Gnu.c cc -c -I/usr/local/opt/readline/include -I/usr/local/opt/ncurses/include -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Wno-error=implicit-function-declaration -Os -DVERSION=\"1.40\" -DXS_VERSION=\"1.40\" "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0801 Gnu.c Gnu.xs:14:10: fatal error: 'EXTERN.h' file not found #include "EXTERN.h" ^~~~~~~~~~ 1 error generated. make: *** [Gnu.o] Error 1 -> FAIL Installing Term::ReadLine::Gnu failed. See /Users/paulalexanderhelminck/.cpanm/work/1616684888.73451/build.log for details. Retry with --force to force install it.

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

Re: macOS Installation Problems

Postby paffenholz » 26 Mar 2021, 09:26

The missing EXTERN.h should hopefully be found after

Code: Select all

export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/
before installing with

Code: Select all

cpanm Term::ReadLine::Gnu
Andreas

PaulH
Posts: 4
Joined: 22 Mar 2021, 17:07

Re: macOS Installation Problems

Postby PaulH » 29 Mar 2021, 17:44

Great, I got it to work, thank you!

(I also had to add sudo to the install line, but everything after this worked out fine.)


Return to “Helpdesk”