Greetings, dear PerlMonks,

I have released a module to CPAN, but now I am having trouble installing the latest version. The module is called: Graph::Undirected::Hamiltonicity

A demo is hosted at https://ownlifeful.com/, and the source code is hosted on GitHub.

To install the module from the source, you would follow these steps:

  1. Get the source: git clone https://github.com/ownlifeful/Graph-Undirected-Hamiltonicity.git
  2. cd Graph-Undirected-Hamiltonicity
  3. perl ./Build.PL
  4. ./Build

I see an error message as below:

... Configuring Graph-Undirected-Hamiltonicity-0.013 ... OK Building and testing Graph-Undirected-Hamiltonicity-0.013 ... FAIL ! Installing . failed. See /home/ashwin/.cpanm/work/1640803042.747791/ +build.log for details. Retry with --force to force install it. [DZ] error running {{["cpanm", "."]}} [DZ] install failed, left failed dist in place at .build/ZWeABKzuKx [DZ] error running {{["cpanm", "."]}} at inline delegation in Dist::Zi +lla for logger->log_fatal (attribute declared in /home/ashwin/perl5/p +erlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0/Dist/Zilla.pm at line +782) line 18.

You can peek at the Build file. It shows:

#!/bin/sh /home/ashwin/perl5/perlbrew/perls/perl-5.34.0/bin/dzil authordeps | /h +ome/ashwin/perl5/perlbrew/perls/perl-5.34.0/bin/cpanm /home/ashwin/perl5/perlbrew/perls/perl-5.34.0/bin/dzil listdeps | /hom +e/ashwin/perl5/perlbrew/perls/perl-5.34.0/bin/cpanm /home/ashwin/perl5/perlbrew/perls/perl-5.34.0/bin/dzil install

The error occurs on the last line of the Build file. i.e., /home/ashwin/perl5/perlbrew/perls/perl-5.34.0/bin/dzil install and it looks like this:

Configuring Graph-Undirected-Hamiltonicity-0.013 ... OK Building and testing Graph-Undirected-Hamiltonicity-0.013 ... FAIL ! Installing . failed. See /home/ashwin/.cpanm/work/1640803042.747791/ +build.log for details. Retry with --force to force install it. [DZ] error running {{["cpanm", "."]}} [DZ] install failed, left failed dist in place at .build/ZWeABKzuKx [DZ] error running {{["cpanm", "."]}} at inline delegation in Dist::Zi +lla for logger->log_fatal (attribute declared in /home/ashwin/perl5/p +erlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0/Dist/Zilla.pm at line +782) line 18.

I have looked at the build.log file as indicated above, and found nothing useful. So I tried running this command: strace cpanm . to track down where in the code the error occurs.

Here is an excerpt from strace:

... write(1, "OK\nBuilding and testing . ... ", 30) = 30 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID| +SIGCHLD, child_tidptr=0x7f4de58514d0) = 720013 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], [], 8) = 0 rt_sigaction(SIGALRM, {sa_handler=0x562e53110bf0, sa_mask=[], sa_flags +=SA_RESTORER, sa_restorer=0x7f4de5bb0140}, {sa_handler=SIG_DFL, sa_ma +sk=[], sa_flags=SA_RESTORER, sa_restorer=0x7f4de5bb0140}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 alarm(3600) = 0 wait4(720013, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 7200 +13 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=720013, si_u +id=1000, si_status=1, si_utime=0, si_stime=0} --- alarm(0) = 3564 rt_sigprocmask(SIG_BLOCK, [ALRM], [], 8) = 0 rt_sigaction(SIGALRM, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RES +TORER, sa_restorer=0x7f4de5bb0140}, {sa_handler=0x562e53110bf0, sa_ma +sk=[], sa_flags=SA_RESTORER, sa_restorer=0x7f4de5bb0140}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(1, TCGETS, 0x7ffd19c2e700) = -1 ENOTTY (Inappropriate ioc +tl for device) fstat(1, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0 write(2, "! Installing . failed. See /home"..., 133! Installing . fail +ed. See /home/ashwin/.cpanm/work/1640779718.720003/build.log for deta +ils. Retry with --force to force install it. ...

In the first line of the above excerpt, the error has yet to happen. In the last line of the same excerpt, the error has already happened.

I would appreciate a fresh set of eyes looking at this code. I can barely read the strace output. Can someone tell me what's going wrong?

I have used Dist::Zilla and perlbrew to develop and test this module.

Where's the bug? Is Dist::Zilla worth it? Should I switch to the MakeMaker approach?

Thanks a bunch, folks!


In reply to Releasing a CPAN module using Dist::Zilla & perlbrew by ownlifeful

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.