2

I'm trying to install WWW::WebKit by

cpanm WWW::WebKit

but when it tries to install the X11::Xlib dependency it fails.

See the error log below.

syntax error at inc/Devel/CheckLib.pm line 164, near "$mm_attr_key qw(LIBS INC)"
    syntax error at inc/Devel/CheckLib.pm line 171, near "}"
    Global symbol "%args" requires explicit package name at inc/Devel/CheckLib.pm line 175.
    syntax error at inc/Devel/CheckLib.pm line 179, near "}"
    syntax error at inc/Devel/CheckLib.pm line 185, near "}"
    Global symbol "@headers" requires explicit package name at inc/Devel/CheckLib.pm line 192.
    Global symbol "@libs" requires explicit package name at inc/Devel/CheckLib.pm line 223.
    Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 230.
    Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 236.
    Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 240.
    syntax error at inc/Devel/CheckLib.pm line 252, near "}"
    inc/Devel/CheckLib.pm has too many errors.
    Compilation failed in require at Makefile.PL line 8.
    BEGIN failed--compilation aborted at Makefile.PL line 8.
    -> N/A
    -> FAIL Configure failed for X11-Xlib-0.02. See /home/chankey/.cpanm/work/1412186280.51492/build.log for details.
    -> FAIL Installing the dependencies failed: Module 'X11::Xlib' is not installed
    -> FAIL Bailing out the installation for WWW-WebKit-0.06.

I searched on Google and found this

Devel::CheckLib syntax errors when trying to install Tree::Suffix

RT ticket says

The bundled Devel::CheckLib uses the deprecated "for qw()" syntax, which does not work anymore with perl 5.18.x. Please upgrade to a newer Devel::CheckLib, at least version 0.9.

but I'm already using the 1.02 version of Devel::CheckLib. I don't get where is the issue then?

I've installed all the below packages

sudo apt-get install libx11-dev 
sudo apt-get install mesa-common-dev
sudo apt-get install libglu1-mesa-dev
sudo apt-get install libxrandr-dev 
sudo apt-get install libxi-dev 
Community
  • 1
  • 1
Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133

1 Answers1

1

The problem is that X11::Xlib bundles an out-of-date copy of Devel::CheckLib with it - if you check the distribution directory, it's in inc/Devel/CheckLib.pm. There are a few choices:

  • correct the error in the code of that copy of Devel::CheckLib;
  • remove the whole inc directory so that perl uses the installed version of Devel::CheckLib
  • comment out the line use lib qw(inc); in Makefile.PL to stop perl from looking for modules in there (there are no other modules in inc).

All have the same effect, and you should be able to continue your installation of X11::Xlib undisturbed!

i alarmed alien
  • 9,412
  • 3
  • 27
  • 40