Bug#718280: libev-perl: forcing of EV_EPOLL=1 leads to FTBFS on non-linux architectures

gregor herrmann gregoa at debian.org
Mon Jul 29 17:21:40 UTC 2013


On Mon, 29 Jul 2013 18:04:22 +0200, Petr Salinger wrote:

> the current version fails to build on GNU/kFreeBSD.

Oh :/

> It is due to forcing:
> override_dh_auto_configure:
>        EV_EPOLL=1 dh_auto_configure
> Please drop this override or limit it only for linux architectures.

I've started with limiting to set the variable in debian/rules but
after taking a closer look, the multiarch path problem also affects
other features:

% grep can_ Makefile.PL       
my $can_epoll = -e "/usr/include/sys/epoll.h";
$can_epoll = $ENV{EV_EPOLL} if exists $ENV{EV_EPOLL};
$DEFINE .= " -DEV_USE_EPOLL=" . (0 + (prompt ("Enable epoll backend (y/n)?", $can_epoll ? "y" : "n") =~ /[yY]/));
my $can_kqueue = -e "/usr/include/sys/event.h";
$can_kqueue = $ENV{EV_KQUEUE} if exists $ENV{EV_KQUEUE};
$DEFINE .= " -DEV_USE_KQUEUE=" . (0 + (prompt ("Enable kqueue backend (y/n)?", $can_kqueue ? "y" : "n") =~ /[yY]/));
my $can_inotify = -e "/usr/include/sys/inotify.h";
$can_inotify = $ENV{EV_INOTIFY} if exists $ENV{EV_INOTIFY};
$DEFINE .= " -DEV_USE_INOTIFY=" . (0 + (prompt ("Enable inotify support (y/n)?", $can_inotify ? "y" : "n") =~ /[yY]/));
my $can_eventfd = -e "/usr/include/sys/eventfd.h";
$can_eventfd = $ENV{EV_EVENTFD} if exists $ENV{EV_EVENTFD};
$DEFINE .= " -DEV_USE_EVENTFD=" . (0 + (prompt ("Enable linux eventfd support (y/n)?", $can_eventfd ? "y" : "n") =~ /[yY]/));
my $can_signalfd = -e "/usr/include/sys/signalfd.h";
$can_signalfd = $ENV{EV_SIGNALFD} if exists $ENV{EV_SIGNALFD};
$DEFINE .= " -DEV_USE_SIGNALFD=" . (0 + (prompt ("Enable linux signalfd support (y/n)?", $can_signalfd ? "y" : "n") =~ /[yY]/));

I think we need a more generic solution here …
 
> Or better fix #716928, i.e. by changing
> Makefile.PL:my $can_epoll = -e "/usr/include/sys/epoll.h";
> into testing return value of something like
>   echo "#include <sys/epoll.h>" | gcc -E - >/dev/null

Thanks for this idea! 


I've now played around with 2 patches, one using this approach, the
other using Devel::CheckLib. Both lead to the same result and work
(on linux/amd64).


I'm attaching them for review.

Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Rolling Stones: Melody
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiarch-checklib.patch
Type: text/x-diff
Size: 1803 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20130729/f69f72fb/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiarch-paths.patch
Type: text/x-diff
Size: 1799 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20130729/f69f72fb/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20130729/f69f72fb/attachment-0001.sig>


More information about the pkg-perl-maintainers mailing list