0

Trying to install Linux::Inotify on Fedora Core 6 x86 machine which ends up in failure.

Looks like the kernel which is below 2.6.36 doesn't support IN_EXCL_UNLINK. This causes the issue in installation. So I have modified the source code and tried to install. But cpan again replaces it with online repo.

Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load.t ..... Undefined subroutine &Linux::Inotify2::IN_EXCL_UNLINK called at /root/.cpan/build/Linux-Inotify2-2.1/blib/lib/Linux/Inotify2.pm line 431.
Compilation failed in require at t/00_load.t line 3.
BEGIN failed--compilation aborted at t/00_load.t line 3.
t/00_load.t ..... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/1 subtests
t/01_inotify.t .. Undefined subroutine &Linux::Inotify2::IN_EXCL_UNLINK called at /root/.cpan/build/Linux-Inotify2-2.1/blib/lib/Linux/Inotify2.pm line 431.
Compilation failed in require at t/01_inotify.t line 2.
BEGIN failed--compilation aborted at t/01_inotify.t line 2.
# Looks like your test exited with 255 before it could output anything.
t/01_inotify.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 5/5 subtests

Test Summary Report
-------------------
t/00_load.t   (Wstat: 65280 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 255
t/01_inotify.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 5 tests but ran 0.
Files=2, Tests=1,  0 wallclock secs ( 0.01 usr  0.05 sys +  0.05 cusr  0.08 csys =  0.19 CPU)
Result: FAIL
Failed 2/2 test programs. 1/1 subtests failed.
make: *** [test_dynamic] Error 255
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

Is there a way to fix this one or install using CPAN local source?

Note: make install using source code is working fine after editing the source code.

  • Yes you could for example create a local patch that you apply to `Inotify2.pm` before you run `perl Makefile.PL`. Please also [notify the author](https://rt.cpan.org/Dist/Display.html?Name=Linux-Inotify2) of the module about this issue, maybe they will provide a fix in the future – Håkon Hægland Jul 12 '19 at 07:39
  • "*make install using source code is working fine*" - then it is already installed. – melpomene Jul 12 '19 at 07:40
  • Fedora Core 6 reached end of life in 2007! It hasn't had a security update in over a decade! Upgrade the OS as soon as possible! – Quentin Jul 12 '19 at 09:43

2 Answers2

3
wget https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Linux-Inotify2-2.1.tar.gz
tar xzf Linux-Inotify2-2.1.tar.gz
cd Linux-Inotify2-2.1
...apply change...
perl Makefile.PL
make test
make install

It sounds like you've already done this, so you've already installed it. cpan won't replace it (if it sees the installed version (which it will, unless you used the wrong perl, or unless you used env var PERL_MB_OPT to tell ExtUtils::MakeMaker to install the module in a non-standard location and didn't tell CPAN via env var PERL5LIB)).

ikegami
  • 367,544
  • 15
  • 269
  • 518
1

install using CPAN local source?

cpanm supports installing from a local tarball (containing the patched sources), see synopsis:

cpanm ~/dists/MyCompany-Enterprise-1.00.tar.gz   # install from a local file
daxim
  • 39,270
  • 4
  • 65
  • 132