gh0stwizard/p5-EAV-XS

how to install the non-perl dependencies

szabgab opened this issue · 3 comments

I saw in the README what are the dependencies, but it would be great help if there were instruction how to install these packages on the major OS-es. e.g. are there ready-made packages for Ubuntu that one can install using apt?

BTW I tried to figure it out, but so far I only found libidn2-dev and I am not sure even about that one.
See also: https://github.com/szabgab/p5-EAV-XS/actions/runs/3262936736/jobs/5360824824

Hi there,

Well, you have to checkout git submodules too. This repo was made from a developer perspective, e.g. to build the module from the scratch based on best practices of Github Flow :D At least, I hope so.

How to fix your case. Put this after apt-get install -y libidn2-dev:

    - name: Checkout submodules
      run: |
        git submodule init
        git submodule update --checkout

Your workflow is good. All details about errors may be found out in the section Show Errors on Ubuntu, expand it, then expand the Run cat /home/runner/.cpanm/work/*/build.log, in the end of the log you have this:

Error: Can't locate ExtUtils/PkgConfig.pm in @INC (you may need to install the ExtUtils::PkgConfig module) (@INC contains: /home/runner/work/p5-EAV-XS/p5-EAV-XS/local/lib/perl5 /home/runner/work/_actions/shogo82148/actions-setup-perl/v1/scripts/lib /opt/hostedtoolcache/perl/5.36.0/x64/lib/site_perl/5.36.0/x86_64-linux /opt/hostedtoolcache/perl/5.36.0/x64/lib/site_perl/5.36.0 /opt/hostedtoolcache/perl/5.36.0/x64/lib/5.36.0/x86_64-linux /opt/hostedtoolcache/perl/5.36.0/x64/lib/5.36.0 .) at Makefile.PL line 304.

I've never used "shogo-perl", but according to its documentation you have to use this (note install-modules directive):

    - name: Set up perl
      uses: shogo82148/actions-setup-perl@v1
      with:
          perl-version: ${{ matrix.perl }}
          distribution: ${{ ( startsWith( matrix.runner, 'windows-' ) && 'strawberry' ) || 'default' }}
          install-modules: [ 'ExtUtils::PkgConfig' ]

Reference: https://github.com/shogo82148/actions-setup-perl

I've created workflow based on yours:
https://github.com/gh0stwizard/p5-EAV-XS/blob/master/.github/workflows/main.yml

Log output (everything successful):
https://github.com/gh0stwizard/p5-EAV-XS/actions/runs/3265595031/jobs/5368053636

Noticeable things atm:

  • libidn2-0 is installed by default on ubuntu-latest (may be removed)
  • pkg-config is installed by default (may be removed)
  • install-modules directive of "shogo-perl" is working as expected

Perfect workflow setup should be like that:

  • after actions/checkout@v2 update git submodules first
  • install all dependencies via apt-get before uses shogo82148/actions-setup-perl@v1, because some modules like Net::SSLeay depends on external libraries.
  • use shogo82148/actions-setup-perl@v1
  • do your job, e.g. use cpanm, make modules, etc

Hope this should help. Any questions?

Excellent. Thank you for your reply and your workflow.
Later you might also want to enable the other Operating Systems and other versions of Perl.