Hilko Bengen
2014-Feb-13 17:56 UTC
[Libguestfs] [PATCH 1/2] nbdkit: Work around what seems like an bug in automake 1.14
"AM_INIT_AUTOMAKE(foreign) dnl ..." seems to trigger Debian bug#738716 --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ee9d377..df31014 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,8 @@ AC_CONFIG_MACRO_DIR([m4]) AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE -AM_INIT_AUTOMAKE(foreign) dnl NB: Do not [quote] this parameter. +dnl NB: Do not [quote] this parameter. +AM_INIT_AUTOMAKE(foreign) LT_INIT dnl Check for basic C environment. -- 1.9.0.rc3
Hilko Bengen
2014-Feb-13 17:56 UTC
[Libguestfs] [PATCH 2/2] nbdkit: Retrieve libperl linking information from ExtUtils::Embed
perl -MConfig -e 'print $Config{ldflags}' gave me
-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
with Perl 5.18 as configured on Debian/unstable.
---
configure.ac | 15 +++++----------
plugins/perl/Makefile.am | 4 +---
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/configure.ac b/configure.ac
index df31014..d129d5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,7 +132,7 @@ AS_IF([test "x$PERL" != "xno" &&
test "x$enable_perl" != "xno"],[
dnl Check for Perl CFLAGS.
AC_MSG_CHECKING([for Perl embed CFLAGS])
- PERL_CFLAGS="$($PERL -MConfig -e 'print
$Config{ccflags}')"
+ PERL_CFLAGS="$($PERL -MExtUtils::Embed -e 'ccflags')"
AS_IF([ test -n "$PERL_CFLAGS" ],[
AC_MSG_RESULT([$PERL_CFLAGS])
],[
@@ -140,21 +140,16 @@ AS_IF([test "x$PERL" != "xno"
&& test "x$enable_perl" != "xno"],[
enable_perl=no
])
- dnl Check for Perl LIBS.
- AC_MSG_CHECKING([for Perl embed LIBS])
- PERL_LIBS="$($PERL -MConfig -e 'print $Config{libs}')"
-
- dnl Check for Perl LDFLAGS.
- AC_MSG_CHECKING([for Perl embed LDFLAGS])
- PERL_LDFLAGS="$($PERL -MConfig -e 'print
$Config{ldflags}')"
+ dnl Check for Perl LDOPTS.
+ AC_MSG_CHECKING([for Perl embed LDOPTS])
+ PERL_LDOPTS="$($PERL -MExtUtils::Embed -e 'ldopts')"
dnl XXX Could check these actually work.
])
AM_CONDITIONAL([HAVE_PERL],[test "x$enable_perl" != "xno"
&& test "x$PERL" != "xno"])
AC_SUBST([PERL_ARCHLIB])
AC_SUBST([PERL_CFLAGS])
-AC_SUBST([PERL_LIBS])
-AC_SUBST([PERL_LDFLAGS])
+AC_SUBST([PERL_LDOPTS])
dnl Check for libvirt (only if you want to compile the libvirt plugin).
AC_ARG_WITH([libvirt],[
diff --git a/plugins/perl/Makefile.am b/plugins/perl/Makefile.am
index a68db5d..70a7683 100644
--- a/plugins/perl/Makefile.am
+++ b/plugins/perl/Makefile.am
@@ -50,11 +50,9 @@ nbdkit_perl_plugin_la_CFLAGS = \
$(WARNINGS_CFLAGS) \
$(PERL_CFLAGS) \
-I$(PERL_ARCHLIB)/CORE
-nbdkit_perl_plugin_la_LIBADD = \
- -lperl $(PERL_LIBS)
nbdkit_perl_plugin_la_LDFLAGS = \
-module -avoid-version -shared \
- $(PERL_LDFLAGS)
+ $(PERL_LDOPTS)
if HAVE_POD2MAN
--
1.9.0.rc3
Richard W.M. Jones
2014-Feb-14 12:31 UTC
Re: [Libguestfs] [PATCH 1/2] nbdkit: Work around what seems like an bug in automake 1.14
On Thu, Feb 13, 2014 at 06:56:38PM +0100, Hilko Bengen wrote:> "AM_INIT_AUTOMAKE(foreign) dnl ..." seems to trigger Debian bug#738716 > --- > configure.ac | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index ee9d377..df31014 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -35,7 +35,8 @@ AC_CONFIG_MACRO_DIR([m4]) > AC_USE_SYSTEM_EXTENSIONS > AC_SYS_LARGEFILE > > -AM_INIT_AUTOMAKE(foreign) dnl NB: Do not [quote] this parameter. > +dnl NB: Do not [quote] this parameter. > +AM_INIT_AUTOMAKE(foreign) > LT_INIT > > dnl Check for basic C environment. > -- > 1.9.0.rc3ACK. I have added you to the ACL for nbdkit, so you should be able to push this. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Richard W.M. Jones
2014-Feb-14 12:33 UTC
Re: [Libguestfs] [PATCH 2/2] nbdkit: Retrieve libperl linking information from ExtUtils::Embed
On Thu, Feb 13, 2014 at 06:56:39PM +0100, Hilko Bengen wrote:> perl -MConfig -e 'print $Config{ldflags}' gave me > > -lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt > > with Perl 5.18 as configured on Debian/unstable. > --- > configure.ac | 15 +++++---------- > plugins/perl/Makefile.am | 4 +--- > 2 files changed, 6 insertions(+), 13 deletions(-) > > diff --git a/configure.ac b/configure.ac > index df31014..d129d5a 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -132,7 +132,7 @@ AS_IF([test "x$PERL" != "xno" && test "x$enable_perl" != "xno"],[ > > dnl Check for Perl CFLAGS. > AC_MSG_CHECKING([for Perl embed CFLAGS]) > - PERL_CFLAGS="$($PERL -MConfig -e 'print $Config{ccflags}')" > + PERL_CFLAGS="$($PERL -MExtUtils::Embed -e 'ccflags')" > AS_IF([ test -n "$PERL_CFLAGS" ],[ > AC_MSG_RESULT([$PERL_CFLAGS]) > ],[ > @@ -140,21 +140,16 @@ AS_IF([test "x$PERL" != "xno" && test "x$enable_perl" != "xno"],[ > enable_perl=no > ]) > > - dnl Check for Perl LIBS. > - AC_MSG_CHECKING([for Perl embed LIBS]) > - PERL_LIBS="$($PERL -MConfig -e 'print $Config{libs}')" > - > - dnl Check for Perl LDFLAGS. > - AC_MSG_CHECKING([for Perl embed LDFLAGS]) > - PERL_LDFLAGS="$($PERL -MConfig -e 'print $Config{ldflags}')" > + dnl Check for Perl LDOPTS. > + AC_MSG_CHECKING([for Perl embed LDOPTS]) > + PERL_LDOPTS="$($PERL -MExtUtils::Embed -e 'ldopts')" > > dnl XXX Could check these actually work. > ]) > AM_CONDITIONAL([HAVE_PERL],[test "x$enable_perl" != "xno" && test "x$PERL" != "xno"]) > AC_SUBST([PERL_ARCHLIB]) > AC_SUBST([PERL_CFLAGS]) > -AC_SUBST([PERL_LIBS]) > -AC_SUBST([PERL_LDFLAGS]) > +AC_SUBST([PERL_LDOPTS]) > > dnl Check for libvirt (only if you want to compile the libvirt plugin). > AC_ARG_WITH([libvirt],[ > diff --git a/plugins/perl/Makefile.am b/plugins/perl/Makefile.am > index a68db5d..70a7683 100644 > --- a/plugins/perl/Makefile.am > +++ b/plugins/perl/Makefile.am > @@ -50,11 +50,9 @@ nbdkit_perl_plugin_la_CFLAGS = \ > $(WARNINGS_CFLAGS) \ > $(PERL_CFLAGS) \ > -I$(PERL_ARCHLIB)/CORE > -nbdkit_perl_plugin_la_LIBADD = \ > - -lperl $(PERL_LIBS) > nbdkit_perl_plugin_la_LDFLAGS = \ > -module -avoid-version -shared \ > - $(PERL_LDFLAGS) > + $(PERL_LDOPTS)I checked the equivalent settings on Fedora, and it all seems sensible, so ACK. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
Richard W.M. Jones
2014-Feb-15 11:16 UTC
[Libguestfs] OT: nbdkit packaging in debian (was: Re: [PATCH 1/2] nbdkit: Work around what seems like an bug in automake 1.14)
Hilko, I was looking at this bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725504 There's a related issue with the Debian packaging, which is that the package as a whole requires big dependencies (eg. libguestfs0). However these are not needed by the base package, just by plugins. In Fedora we package the plugins as sub-packages, so if you install the base package you don't require the extra dependencies. If you install any plugin, it pulls in the base package. Here is the Fedora spec file: http://pkgs.fedoraproject.org/cgit/nbdkit.git/tree/nbdkit.spec and how that translates to packages: http://koji.fedoraproject.org/koji/buildinfo?buildID=498452 (If you click "info" next to each RPM you can see the runtime Requires). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
* Richard W.M. Jones:> I was looking at this bug: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725504 > > There's a related issue with the Debian packaging, which is that the > package as a whole requires big dependencies (eg. libguestfs0). > However these are not needed by the base package, just by plugins.That bug resulted in most of the plugins not being built at all.> In Fedora we package the plugins as sub-packages, so if you install > the base package you don't require the extra dependencies. If you > install any plugin, it pulls in the base package.That's a good idea. I think I am going to split the package up. Cheers, -Hilko