thewml / website-meta-language

An old offline HTML preprocessor (which can be used for static site generation), written in Perl and C that is still maintained for legacy reasons, but probably not recommended for new sites.
https://www.shlomifish.org/open-source/projects/website-meta-language/
GNU General Public License v2.0
14 stars 8 forks source link

Please document perl dependencies #28

Closed traumschule closed 5 years ago

traumschule commented 5 years ago

This repository depend on the cpan modules Carp::Always Class::XSAccessor File::Which GD IO::All Path::Tiny Curses and requires (on debian) libgd-perl libncurses-dev libpcre++-dev.

Please disable features gracefully or document all dependencies in INSTALL.

website-meta-language/src/build$ cmake ..
Can't locate Carp/Always.pm in @INC (you may need to install the Carp::Always module) (@INC contains: /etc/perl /usr/local/lib/i386-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/i386-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/i386-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/i386-linux-gnu/perl-base).
BEGIN failed--compilation aborted.
CMake Error at cmake/Shlomif_Common.cmake:409 (MESSAGE):
  Your Perl doesn't have the module Carp::Always.  Please install it.
Call Stack (most recent call first):
  cmake/Shlomif_Common.cmake:415 (CHECK_FOR_PERL_MODULE)
  CMakeLists.txt:105 (CHECK_FOR_MULTIPLE_PERL_MODULES)

$ cpan Carp::Always

$ cmake ..
Can't locate Class/XSAccessor.pm in @INC (you may need to install the Class::XSAccessor module)

$ cpan Class::XSAccessor

$ cmake ..
Can't locate File/Which.pm in @INC (you may need to install the File::Which module)

$ cpan File::Which

$ cmake ..
Can't locate GD.pm in @INC (you may need to install the GD module)

$ cpan GD
Package gdlib was not found in the pkg-config search path.

# apt install libgd-perl

$ cmake ..
Can't locate IO/All.pm in @INC (you may need to install the IO::All module)

$ cpan IO::All

$ cmake ..
Can't locate Path/Tiny.pm in @INC (you may need to install the Path::Tiny module)

$ cpan Path::Tiny

$ cmake ..
-- Could NOT find Curses (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH)

# apt install libncurses-dev

$ cpan Curses

$ cmake ..
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBPCRE_LIB
    linked by target "mp4h" in directory /path/to/website-meta-language/src/wml_backend/p2_mp4h/src

# apt install libpcre++-dev

$ cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/website-meta-language/src/build
shlomif commented 5 years ago

Feel free to send a pull-req to document them in the INSTALL file. But see https://blog.codinghorror.com/learn-to-read-the-source-luke/ and https://www.shlomifish.org/philosophy/computers/software-management/perfect-workplace/perfect-it-workplace.xhtml#soft-eng-methods-to-avoid and we also have https://en.wikipedia.org/wiki/Continuous_integration files. Documentation tends to become stale and misleading.