[opensuse-programming] perl expert needed
All,
I've spent several hours on this, but it is apparently more involved
than I can handle.
=
I have a perl app I want to send to factory, but it depends on perl(Net::Pcap).
Which means I need to push perl-Net-Pcap to factory first.
As it turns out perl(Net::Pcap) fails to build for i586 for both 12.1
and Factory. I'm looking for help (or a new volunteer maintainer) in
getting it to build.
Note the package builds fine for 64-bit, and it builds fine for older
versions of openSUSE. It's just newer 32-bit versions that fail.
For the original package see
https://build.opensuse.org/package/show?package=perl-Net-Pcap&project=devel%3Alanguages%3Aperl
I branched it to see if I could figure it out. In particular in my
local spec file I added a couple "ls" commands just before Makefile.PL
is called in the specfile.
And the results look right to me:
==============
+ ls -l /usr/lib/libpcap*
-rw-r--r-- 1 root root 350862 Dec 16 01:43 /usr/lib/libpcap.a
lrwxrwxrwx 1 root root 12 Dec 16 01:49 /usr/lib/libpcap.so -> libpcap.so.1
lrwxrwxrwx 1 root root 16 Dec 16 01:49 /usr/lib/libpcap.so.1 ->
libpcap.so.1.2.0
-rwxr-xr-x 1 root root 262144 Dec 16 01:43 /usr/lib/libpcap.so.1.2.0
+ ls -l /usr/include/pcap*
-rw-r--r-- 1 root root 2393 Dec 16 01:43 /usr/include/pcap-bpf.h
-rw-r--r-- 1 root root 2125 Dec 16 01:43 /usr/include/pcap-namedb.h
-rw-r--r-- 1 root root 2320 Dec 16 01:43 /usr/include/pcap.h
/usr/include/pcap:
total 88
-rw-r--r-- 1 root root 2016 Dec 16 01:43 bluetooth.h
-rw-r--r-- 1 root root 35591 Dec 16 01:43 bpf.h
-rw-r--r-- 1 root root 2272 Dec 16 01:43 ipnet.h
-rw-r--r-- 1 root root 3421 Dec 16 01:43 namedb.h
-rw-r--r-- 1 root root 16920 Dec 16 01:43 pcap.h
-rw-r--r-- 1 root root 5563 Dec 16 01:43 sll.h
-rw-r--r-- 1 root root 4659 Dec 16 01:43 usb.h
-rw-r--r-- 1 root root 2151 Dec 16 01:43 vlan.h
===============
But immediately following that I get:
===========
+ /usr/bin/perl Makefile.PL PREFIX=/usr
looking for -lpcap... - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
You appear to lack the pcap(3) library.
If it is installed in a non-standard location, please try setting the LIBS
and INC values on the command line.
Or get the sources and install the pcap library from http://www.tcpdump.org/
If you install the pcap library using a system package, make sure to also
install the corresponding -devel package, which contains the C headers needed
to compile this module.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
============================
Looking at Makefile.PL, the problem seems to be in:
================================================
sub have_library {
my ($lib, $func, $header) = (@_, 'blank', 'blank');
printf("checking for %s() in -l%s... ", $func, $lib) if $func ne 'blank';
printf("looking for -l%s... ", $lib) if $func eq 'blank';
$header = $lib if $header eq 'blank';
my $result;
# try to find a specific function in the library
if ($func ne 'blank') {
my $libs = $is_Win32 ? " $lib.lib " : "-l$lib";
if ($is_Win32) {
$result = try_link(<<"SRC",undef );
#ifdef _CYGWIN
#include
Greg Freemyer wrote:
=========== + /usr/bin/perl Makefile.PL PREFIX=/usr looking for -lpcap... You appear to lack the pcap(3) library.
[snip]
============================
Looking at Makefile.PL, the problem seems to be in:
================================================
sub have_library {
I'm guessing try_link() is a local subroutine that attempts to compile and link the source code generated. Normally when that is done, you should be able to find the log from the failed attempt. With autoconf, you'd be looking at config.log, but with perl, I don't know where to look. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org
Greg Freemyer wrote:
All,
I've spent several hours on this, but it is apparently more involved than I can handle.
Hi Greg I've just noticed this in the bug queue: https://bugzilla.novell.com/show_bug.cgi?id=711611 Seems it might be related. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org
Per Jessen
Greg Freemyer wrote:
All,
I've spent several hours on this, but it is apparently more involved than I can handle.
Hi Greg
I've just noticed this in the bug queue:
https://bugzilla.novell.com/show_bug.cgi?id=711611
Seems it might be related.
/Per Jessen, Zürich
-- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org
Per, You may have noticed I created that bugzilla months ago, and I added a link to this thread last night. Even better, Pascal Blesser took pity on me overnight and fixed the package! (See bugzilla for details.) Thanks to you and David for trying to help me out. Greg -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org
Greg Freemyer wrote:
Per Jessen
wrote: Greg Freemyer wrote:
All,
I've spent several hours on this, but it is apparently more involved than I can handle.
Hi Greg
I've just noticed this in the bug queue:
https://bugzilla.novell.com/show_bug.cgi?id=711611
Seems it might be related.
/Per Jessen, Zürich
-- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org
Per,
You may have noticed I created that bugzilla months ago,
Haha, no, I only read the update on opensuse-bugs. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org
Hello, On Fri, 16 Dec 2011, Greg Freemyer wrote:
Per Jessen
wrote: Greg Freemyer wrote: I've just noticed this in the bug queue:
https://bugzilla.novell.com/show_bug.cgi?id=711611
Seems it might be related. [..] You may have noticed I created that bugzilla months ago, and I added a link to this thread last night.
Even better, Pascal Blesser took pity on me overnight and fixed the package! (See bugzilla for details.)
Weird though, even with just '-Wall' the problem remains. ==== + /usr/bin/sed -i -e '/^auto_install/d' -e 's/'\''-Wall -Wwrite-strings'\''/'\'' Wall'\''/' Makefile.PL + grep CCFLAGS Makefile.PL $options{CCFLAGS} = '-Wall' if $Config{ccname} eq 'gcc' and $] >= 5.006; [..] + /usr/bin/perl Makefile.PL PREFIX=/usr looking for -lpcap... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - You appear to lack the pcap(3) library. ==== I'd really like to know what's happening there ...
Thanks to you and David for trying to help me out.
You're welcome. -dnh -- Wash: "[..] this landings is gonna get pretty interesting" Mal: "Define 'interesting.'" Wash: "Oh, God, oh, God, we're all gonna die?" -- Firefly Serenity -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org
Hello, On Thu, 15 Dec 2011, Greg Freemyer wrote:
+ /usr/bin/perl Makefile.PL PREFIX=/usr looking for -lpcap... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - You appear to lack the pcap(3) library.
I've narrowed it down a bit, while testing for the lib it fails loading the Conftest.so: # Using Test.pm version 1.25_02 DynaLoader.pm loaded (blib/lib blib/arch /usr/lib/perl5/site_perl/5.14.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/vendor_perl/5.14.2/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.14.2 /usr/lib/perl5/5.14.2/i586-linux-thread-multi /usr/lib/perl5/5.14.2 /usr/lib/perl5/site_perl/5.14.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/site_perl ., /lib /usr/lib /usr/local/lib) DynaLoader::bootstrap for Conftest (auto/Conftest/Conftest.so) Not a CODE reference at /usr/lib/perl5/5.14.2/i586-linux-thread-multi/DynaLoader.pm line 213. That line in dynaloader might be misleading (see comments in DynaLoader.pm). I couldn't figure out what is failing there. But patching Makefile.PL so it ignores the failed test, Net::Pcap builds ok and also the test for the libpcap version works, i.e. the test files (Net/Pcap.so) could be loaded and access libpcap.so: [..] # libpcap version 1.1.1 t/17-lib_version.t ......... 1..2 ok 1 - lib_version() ok 2 - - checking version string (libpcap version 1.1.1) ok [..] Also, most tests requiring root are ok (patched /etc/sudoers in the buildroot and using sudo in the .spec). Stuff requiring a device still fail obviously. So, maybe "just build it" and find someone on a 12.1/32bit install to test it. Have a look: https://build.opensuse.org/package/show?package=perl-Net-Pcap&project=home%3Adnh%3Abranches%3Ahome%3Agregfreemyer%3Abranches%3Adevel%3Alanguages%3Aperl FWIW & HTH, -dnh -- The two most common things in the universe are hydrogen and stupidity. -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org
participants (3)
-
David Haller
-
Greg Freemyer
-
Per Jessen