Skip Menu |

This queue is for tickets about the Devel-CheckLib CPAN distribution.

Report information
The Basics
Id: 108495
Status: open
Priority: 0/
Queue: Devel-CheckLib

People
Owner: Nobody in particular
Requestors: bkb [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Cannot debug what is happening with this error
This is regarding the following error in an upstream module using Devel::CheckLib: https://github.com/benkasminbullock/gzip-faster/issues/5 The problem I have is that it's nearly impossible to work out what happened here. Even if I switch on the debugging option in Devel::CheckLib, I don't get good information: ---------- # /home/njh/perl5/perlbrew/bin/ gcc-5 -D_REENTRANT -D_GNU_SOURCE -O2 -mtune=native -march=native -Wall -pipe -ftree-vectorize -fdiagnostics-color=auto -fsanitize=bounds -g -fwrapv -fno-strict-aliasing -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fsanitize=bounds -g -fstack-protector-strong -L/usr/local/lib assertlibcH_VHpDx.c -o assertlibcw2uEzQX # /home/njh/perl5/perlbrew/bin/ gcc-5 -D_REENTRANT -D_GNU_SOURCE -O2 -mtune=native -march=native -Wall -pipe -ftree-vectorize -fdiagnostics-color=auto -fsanitize=bounds -g -fwrapv -fno-strict-aliasing -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fsanitize=bounds -g -fstack-protector-strong -L/usr/local/lib assertlibOxHlFv_g.c -o assertlibNroAiJbs -lz ------------ The above output is an error on the part of Devel::CheckLib, because the user in this case was able to install the module once I had removed Devel::CheckLib. I would strongly prefer to have extremely detailed and explicit debugging information, including file and line number of Devel::CheckLib, for example I would prefer to know exactly what it thinks the compiler is. In the following code: ------------ my @ccflags = grep { length } quotewords('\s+', 1, $Config_ccflags||''); my @ldflags = grep { length } quotewords('\s+', 1, @Config_ldflags); my @paths = split(/$Config{path_sep}/, $ENV{PATH}); my @cc = split(/\s+/, $Config{cc}); return ( [ @cc, @ccflags ], \@ldflags ) if -x $cc[0]; foreach my $path (@paths) { my $compiler = File::Spec->catfile($path, $cc[0]) . ($^O eq 'cygwin' ? '' : $Config{_exe}); return ([ $compiler, @cc[1 .. $#cc], @ccflags ], \@ldflags) if -x $compiler; next if ! length $Config{_exe}; $compiler = File::Spec->catfile($path, $cc[0]); return ([ $compiler, @cc[1 .. $#cc], @ccflags ], \@ldflags) if -x $compiler; } -------- there should be a "debug" option where it tells me exactly what it thinks the compiler is before it returns a value, and preferably with a line number, something like this: https://github.com/benkasminbullock/p5-Devel-CheckLib/commit/5b0d4a54dbc42958db157ac9151820d205791ef0
Agree that adding some debuggery would help. The underlying problem would probably be fixed by changing at least some of the -x checks in _findcc to check -f and -x. That's because directories can match -x but obviously aren't compilers.
CC: bkb [...] cpan.org
Subject: Re: [rt.cpan.org #108495] Cannot debug what is happening with this error
Date: Thu, 12 Nov 2015 13:58:46 +0900
To: bug-Devel-CheckLib [...] rt.cpan.org
From: Ben Bullock <benkasminbullock [...] gmail.com>
I've put a pull request here: https://github.com/mattn/p5-Devel-CheckLib/pull/15 This also removes the duplicate removal of the object file. This doesn't contain all of the elements of the previous request.