apaffenholz / homebrew-polymake

3 stars 0 forks source link

Brewing polymake on Debian 11 -- missing EXTERN header file #5

Closed jplab closed 2 years ago

jplab commented 2 years ago

Hi,

I am brewing polymake on a fresh Debian bullseye, and I get the following message:

==> Installing apaffenholz/polymake/polymake
==> perl Makefile.PL INSTALL_BASE=/home/linuxbrew/.linuxbrew/Cellar/polymake/4.6/libexec/perl5
==> make install
Last 15 lines from /home/jplabbe/.cache/Homebrew/Logs/polymake/02.make:
Running Mkbootstrap for Util ()
"/usr/bin/perl" "/usr/share/perl/5.32/ExtUtils/xsubpp"  -typemap '/usr/share/perl/5.32/ExtUtils/typemap'  ListUtil.xs > ListUtil.xsc
chmod 644 "Util.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Util.bs blib/arch/auto/List/Util/Util.bs 644
cp lib/Sub/Util.pm blib/lib/Sub/Util.pm
cp lib/List/Util/XS.pm blib/lib/List/Util/XS.pm
cp lib/Scalar/Util.pm blib/lib/Scalar/Util.pm
cp lib/List/Util.pm blib/lib/List/Util.pm
mv ListUtil.xsc ListUtil.c
x86_64-linux-gnu-gcc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.59\" -DXS_VERSION=\"1.59\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.32/CORE"  -DPERL_EXT -DUSE_PPPORT_H ListUtil.c
ListUtil.xs:7:10: fatal error: EXTERN.h: No such file or directory
    7 | #include <EXTERN.h>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:347: ListUtil.o] Error 1
apaffenholz commented 2 years ago

The formula will only work on some versions of MacOS, sorry. For Debian, polymake is available in the usual apt repositories, via apt install polymake.

The particular error you see above says that a header of the perl C library is not found. This is always installed, but not at the standard location, on MacOS. Hence, the path is set explicitly. It may or may not be installed on your Debian, and it will most likely be at a different location. You can fix this in the formula (perl_cpath), but I would expect more errors.

On the other hand, the formula installs lots of things missing in MacOS, but present in most Linux installations. So installation via apt on Debian is, in our view, the much better option, and we don't support Linuxbrew.

jplab commented 2 years ago

Ok! Good to know! I will install it using apt!