ownlifeful has asked for the wisdom of the Perl Monks concerning the following question:
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:
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Releasing a CPAN module using Dist::Zilla & perlbrew
by bliako (Abbot) on Dec 30, 2021 at 11:44 UTC | |
by perlfan (Parson) on Dec 30, 2021 at 21:10 UTC | |
by bliako (Abbot) on Dec 31, 2021 at 10:43 UTC | |
|
Re: Releasing a CPAN module using Dist::Zilla & perlbrew
by NERDVANA (Priest) on Dec 30, 2021 at 22:12 UTC | |
|
Re: Releasing a CPAN module using Dist::Zilla & perlbrew
by perlfan (Parson) on Dec 29, 2021 at 21:51 UTC | |
|
Re: Releasing a CPAN module using Dist::Zilla & perlbrew (search the error message)
by Anonymous Monk on Dec 29, 2021 at 20:30 UTC | |
by ownlifeful (Beadle) on Dec 29, 2021 at 20:55 UTC | |
|
Re: Releasing a CPAN module using Dist::Zilla & perlbrew
by ownlifeful (Beadle) on Jan 23, 2022 at 10:53 UTC |