All of lore.kernel.org
 help / color / mirror / Atom feed
* Error building libvirt with pcap development files installed.
@ 2015-04-08  5:14 Michael Matera
  2015-04-08 17:24 ` Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Matera @ 2015-04-08  5:14 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 1859 bytes --]

Hello folks!

This is my first post so I'll try to make it a good one. I ran into some
trouble building kvm-image-minimal on Ubuntu 14.04 I suspect because I have
the libpcap0.80-dev package installed on my build host. Here's some details:

BB_VERSION        = "1.24.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "genericx86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.7.1"
TUNE_FEATURES     = "m64 core2"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "dizzy:ec75238f6cc2d2d8d40e0268f6d2acc070cbe9a4"
meta-virtualization = "dizzy:8ec8270017fbeae8fcb8c2d82a60a9f5116b0cf2"
meta-python
meta-oe
meta-networking
meta-filesystems  = "dizzy:2ebb8752f378c9987b0ece5a14915d703b872c1d"

Looking in the log I see:

  /usr/lib/x86_64-linux-gnu/libdevmapper.so: undefined reference to
`matchpathcon'

It seems that the compiler already warned me about this:

  warning: library search path "/usr/lib/x86_64-linux-gnu" is unsafe for
cross-compilation

Going back to log.do_configure, I see:

  configure:     pcap: -I/usr/include -L/usr/lib/x86_64-linux-gnu  -lpcap

This is clearly not right and it shows me that libvirt needs to be
configured with a specific location for libpcap. My fix, if you can call it
that, is to pass --without-pcap to configure. I did that by adding the
following line to libvirt_1.2.8.bb:

PACKAGECONFIG[libpcap] =
"--with-libpcap=MIKEKNOWSNOT,--without-libpcap,libpcap,"

I'm new to Yocto so I haven't read the 2,000 page reference manual closely
enough to properly formulate a better PACKAGECONFIG line. Perhaps you could
help me with that. :-) In any case, libvirt compiles fine without libpcap
and kvm-image-minimal is now built. I'm looking forward to testing it.

Cheers
./m

[-- Attachment #2: Type: text/html, Size: 2675 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error building libvirt with pcap development files installed.
  2015-04-08  5:14 Error building libvirt with pcap development files installed Michael Matera
@ 2015-04-08 17:24 ` Bruce Ashfield
  2015-04-08 20:54   ` Michael Matera
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2015-04-08 17:24 UTC (permalink / raw)
  To: Michael Matera; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 3349 bytes --]

On Wed, Apr 8, 2015 at 1:14 AM, Michael Matera
<matera@lifealgorithmic.com> wrote:
> Hello folks!
>
> This is my first post so I'll try to make it a good one. I ran into some

:). welcome!

> trouble building kvm-image-minimal on Ubuntu 14.04 I suspect because I have
> the libpcap0.80-dev package installed on my build host. Here's some details:
>
> BB_VERSION        = "1.24.0"
> BUILD_SYS         = "x86_64-linux"
> NATIVELSBSTRING   = "Ubuntu-14.04"
> TARGET_SYS        = "x86_64-poky-linux"
> MACHINE           = "genericx86-64"
> DISTRO            = "poky"
> DISTRO_VERSION    = "1.7.1"
> TUNE_FEATURES     = "m64 core2"
> TARGET_FPU        = ""
> meta
> meta-yocto
> meta-yocto-bsp    = "dizzy:ec75238f6cc2d2d8d40e0268f6d2acc070cbe9a4"
> meta-virtualization = "dizzy:8ec8270017fbeae8fcb8c2d82a60a9f5116b0cf2"
> meta-python
> meta-oe
> meta-networking
> meta-filesystems  = "dizzy:2ebb8752f378c9987b0ece5a14915d703b872c1d"
>
> Looking in the log I see:
>
>   /usr/lib/x86_64-linux-gnu/libdevmapper.so: undefined reference to
> `matchpathcon'
>
> It seems that the compiler already warned me about this:
>
>   warning: library search path "/usr/lib/x86_64-linux-gnu" is unsafe for
> cross-compilation
>
> Going back to log.do_configure, I see:
>
>   configure:     pcap: -I/usr/include -L/usr/lib/x86_64-linux-gnu  -lpcap
>
> This is clearly not right and it shows me that libvirt needs to be
> configured with a specific location for libpcap. My fix, if you can call it
> that, is to pass --without-pcap to configure. I did that by adding the
> following line to libvirt_1.2.8.bb:
>
> PACKAGECONFIG[libpcap] =
> "--with-libpcap=MIKEKNOWSNOT,--without-libpcap,libpcap,"

We have libpcap as a dependency for libvirt, so while the package config
value works to disable the option, what we need is to point libvirt's
configuration
phase to the sysroot, where our target version of libpcap can be found.

That's fundamentally the same thing you are asking above, just without
packageconfig injecting it into the configuration phase.

.. I went and had a look at how libvirt deals with libpcap and that flag
doesn't do what you expect in the --with usage .. it only points to a different
location for pcap-config. pcap-config is stubbed out in our system, so that
will never work.

As it turns out, everyone has had a floating or mis identified libcap (my
config.log doesn't find it, and hence just has 'no').

I pulled together the attached patch, it allows my libpcap from the sysroot
to be found and used for the build.

I didn't do any runtime testing, but if it works for you, I'll push it
to the tree
shortly.

Cheers,

Bruce

>
> I'm new to Yocto so I haven't read the 2,000 page reference manual closely
> enough to properly formulate a better PACKAGECONFIG line. Perhaps you could
> help me with that. :-) In any case, libvirt compiles fine without libpcap
> and kvm-image-minimal is now built. I'm looking forward to testing it.
>
> Cheers
> ./m
>
>
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"

[-- Attachment #2: 0001-libvirt-use-pkg-config-to-locate-libcap.patch --]
[-- Type: text/x-patch, Size: 3561 bytes --]

From 29bca75fa656713e3ab64f6ff8d26a679f10a13c Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Wed, 8 Apr 2015 13:12:56 -0400
Subject: [PATCH] libvirt: use pkg-config to locate libcap

libvirt wants to use pcap-config to locate the exisence and location
of libpcap. oe-core stubs this script and replaces it with pkg-config,
which can lead to the host pcap-config triggering and either breaking
the build or introducing host contamination.

To fix this issue, we patch configure to use 'pkg-config libcap' to
locate the correct libraries.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 .../libvirt-use-pkg-config-to-locate-libcap.patch  | 45 ++++++++++++++++++++++
 recipes-extended/libvirt/libvirt_1.2.12.bb         |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch

diff --git a/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch b/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch
new file mode 100644
index 000000000000..65b046eea586
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch
@@ -0,0 +1,45 @@
+From 3e271f6db12ffe34843428ec2f0bca7a8fe3aa65 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Wed, 8 Apr 2015 13:03:03 -0400
+Subject: [PATCH] libvirt: use pkg-config to locate libcap
+
+libvirt wants to use pcap-config to locate the exisence and location
+of libpcap. oe-core stubs this script and replaces it with pkg-config,
+which can lead to the host pcap-config triggering and either breaking
+the build or introducing host contamination.
+
+To fix this issue, we patch configure to use 'pkg-config libcap' to
+locate the correct libraries.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f37047599b76..5f9b84363b96 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1553,7 +1553,7 @@ fi
+ AM_CONDITIONAL([HAVE_NUMAD], [test "$with_numad" != "no"])
+ 
+ dnl pcap lib
+-LIBPCAP_CONFIG="pcap-config"
++LIBPCAP_CONFIG="pkg-config libpcap"
+ LIBPCAP_CFLAGS=""
+ LIBPCAP_LIBS=""
+ LIBPCAP_FOUND="no"
+@@ -1563,8 +1563,8 @@ AC_ARG_WITH([libpcap], [AS_HELP_STRING([--with-libpcap=@<:@PFX@:>@],
+ if test "$with_qemu" = "yes"; then
+   case $with_libpcap in
+     no)     LIBPCAP_CONFIG= ;;
+-    ''|yes) LIBPCAP_CONFIG="pcap-config" ;;
+-    *)      LIBPCAP_CONFIG="$with_libpcap/bin/pcap-config" ;;
++    ''|yes) LIBPCAP_CONFIG="pkg-config libpcap" ;;
++    *)      LIBPCAP_CONFIG="$with_libpcap/bin/pkg-config libpcap" ;;
+   esac
+   AS_IF([test "x$LIBPCAP_CONFIG" != "x"], [
+     AC_MSG_CHECKING(libpcap $LIBPCAP_CONFIG >= $LIBPCAP_REQUIRED )
+-- 
+2.1.0
+
diff --git a/recipes-extended/libvirt/libvirt_1.2.12.bb b/recipes-extended/libvirt/libvirt_1.2.12.bb
index dca2d1b2fabc..5de95c361a64 100644
--- a/recipes-extended/libvirt/libvirt_1.2.12.bb
+++ b/recipes-extended/libvirt/libvirt_1.2.12.bb
@@ -31,6 +31,7 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz;name=libvirt \
            file://run-ptest \
            file://tests-allow-separated-src-and-build-dirs.patch \
            file://libvirt-Fix-cannot-symlink-cpu_map.xml-error.patch \
+           file://libvirt-use-pkg-config-to-locate-libcap.patch \
           "
 
 SRC_URI[libvirt.md5sum] = "2ae99535265ce4687d8718d744024c27"
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Error building libvirt with pcap development files installed.
  2015-04-08 17:24 ` Bruce Ashfield
@ 2015-04-08 20:54   ` Michael Matera
  2015-04-09 12:27     ` Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Matera @ 2015-04-08 20:54 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 4151 bytes --]

Hi Bruce,

Thanks for the patch. I'm having trouble getting it compiled. Can you tell
me what versions you're using? I switched to the master branch but now I'm
getting unrelated errors. Here's what I'm using:

meta
meta-yocto
meta-yocto-bsp    = "master:d6d2dd5c9e06c54ff336b44d54f01b4fe24903ed"
meta-virtualization = "master:40dcc06946b0ef46286ae8982565cfa72c972d07"
meta-python
meta-oe
meta-networking
meta-filesystems  = "master:f3092a6766a3004a6fc9e2eef937a40508e97c44"

Cheers
./m


On Wed, Apr 8, 2015 at 10:24 AM, Bruce Ashfield <bruce.ashfield@gmail.com>
wrote:

> On Wed, Apr 8, 2015 at 1:14 AM, Michael Matera
> <matera@lifealgorithmic.com> wrote:
> > Hello folks!
> >
> > This is my first post so I'll try to make it a good one. I ran into some
>
> :). welcome!
>
> > trouble building kvm-image-minimal on Ubuntu 14.04 I suspect because I
> have
> > the libpcap0.80-dev package installed on my build host. Here's some
> details:
> >
> > BB_VERSION        = "1.24.0"
> > BUILD_SYS         = "x86_64-linux"
> > NATIVELSBSTRING   = "Ubuntu-14.04"
> > TARGET_SYS        = "x86_64-poky-linux"
> > MACHINE           = "genericx86-64"
> > DISTRO            = "poky"
> > DISTRO_VERSION    = "1.7.1"
> > TUNE_FEATURES     = "m64 core2"
> > TARGET_FPU        = ""
> > meta
> > meta-yocto
> > meta-yocto-bsp    = "dizzy:ec75238f6cc2d2d8d40e0268f6d2acc070cbe9a4"
> > meta-virtualization = "dizzy:8ec8270017fbeae8fcb8c2d82a60a9f5116b0cf2"
> > meta-python
> > meta-oe
> > meta-networking
> > meta-filesystems  = "dizzy:2ebb8752f378c9987b0ece5a14915d703b872c1d"
> >
> > Looking in the log I see:
> >
> >   /usr/lib/x86_64-linux-gnu/libdevmapper.so: undefined reference to
> > `matchpathcon'
> >
> > It seems that the compiler already warned me about this:
> >
> >   warning: library search path "/usr/lib/x86_64-linux-gnu" is unsafe for
> > cross-compilation
> >
> > Going back to log.do_configure, I see:
> >
> >   configure:     pcap: -I/usr/include -L/usr/lib/x86_64-linux-gnu  -lpcap
> >
> > This is clearly not right and it shows me that libvirt needs to be
> > configured with a specific location for libpcap. My fix, if you can call
> it
> > that, is to pass --without-pcap to configure. I did that by adding the
> > following line to libvirt_1.2.8.bb:
> >
> > PACKAGECONFIG[libpcap] =
> > "--with-libpcap=MIKEKNOWSNOT,--without-libpcap,libpcap,"
>
> We have libpcap as a dependency for libvirt, so while the package config
> value works to disable the option, what we need is to point libvirt's
> configuration
> phase to the sysroot, where our target version of libpcap can be found.
>
> That's fundamentally the same thing you are asking above, just without
> packageconfig injecting it into the configuration phase.
>
> .. I went and had a look at how libvirt deals with libpcap and that flag
> doesn't do what you expect in the --with usage .. it only points to a
> different
> location for pcap-config. pcap-config is stubbed out in our system, so that
> will never work.
>
> As it turns out, everyone has had a floating or mis identified libcap (my
> config.log doesn't find it, and hence just has 'no').
>
> I pulled together the attached patch, it allows my libpcap from the sysroot
> to be found and used for the build.
>
> I didn't do any runtime testing, but if it works for you, I'll push it
> to the tree
> shortly.
>
> Cheers,
>
> Bruce
>
> >
> > I'm new to Yocto so I haven't read the 2,000 page reference manual
> closely
> > enough to properly formulate a better PACKAGECONFIG line. Perhaps you
> could
> > help me with that. :-) In any case, libvirt compiles fine without libpcap
> > and kvm-image-minimal is now built. I'm looking forward to testing it.
> >
> > Cheers
> > ./m
> >
> >
> >
> > --
> > _______________________________________________
> > meta-virtualization mailing list
> > meta-virtualization@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-virtualization
> >
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
>

[-- Attachment #2: Type: text/html, Size: 5780 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error building libvirt with pcap development files installed.
  2015-04-08 20:54   ` Michael Matera
@ 2015-04-09 12:27     ` Bruce Ashfield
  2015-04-09 20:40       ` Michael Matera
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2015-04-09 12:27 UTC (permalink / raw)
  To: Michael Matera; +Cc: meta-virtualization

On Wed, Apr 8, 2015 at 4:54 PM, Michael Matera
<matera@lifealgorithmic.com> wrote:
> Hi Bruce,
>
> Thanks for the patch. I'm having trouble getting it compiled. Can you tell
> me what versions you're using? I switched to the master branch but now I'm
> getting unrelated errors. Here's what I'm using:

I'm always working from master (unless otherwise stated). What exact error
did you see ? No compilation issues here!

Bruce

>
> meta
> meta-yocto
> meta-yocto-bsp    = "master:d6d2dd5c9e06c54ff336b44d54f01b4fe24903ed"
> meta-virtualization = "master:40dcc06946b0ef46286ae8982565cfa72c972d07"
> meta-python
> meta-oe
> meta-networking
> meta-filesystems  = "master:f3092a6766a3004a6fc9e2eef937a40508e97c44"
>
> Cheers
> ./m
>
>
> On Wed, Apr 8, 2015 at 10:24 AM, Bruce Ashfield <bruce.ashfield@gmail.com>
> wrote:
>>
>> On Wed, Apr 8, 2015 at 1:14 AM, Michael Matera
>> <matera@lifealgorithmic.com> wrote:
>> > Hello folks!
>> >
>> > This is my first post so I'll try to make it a good one. I ran into some
>>
>> :). welcome!
>>
>> > trouble building kvm-image-minimal on Ubuntu 14.04 I suspect because I
>> > have
>> > the libpcap0.80-dev package installed on my build host. Here's some
>> > details:
>> >
>> > BB_VERSION        = "1.24.0"
>> > BUILD_SYS         = "x86_64-linux"
>> > NATIVELSBSTRING   = "Ubuntu-14.04"
>> > TARGET_SYS        = "x86_64-poky-linux"
>> > MACHINE           = "genericx86-64"
>> > DISTRO            = "poky"
>> > DISTRO_VERSION    = "1.7.1"
>> > TUNE_FEATURES     = "m64 core2"
>> > TARGET_FPU        = ""
>> > meta
>> > meta-yocto
>> > meta-yocto-bsp    = "dizzy:ec75238f6cc2d2d8d40e0268f6d2acc070cbe9a4"
>> > meta-virtualization = "dizzy:8ec8270017fbeae8fcb8c2d82a60a9f5116b0cf2"
>> > meta-python
>> > meta-oe
>> > meta-networking
>> > meta-filesystems  = "dizzy:2ebb8752f378c9987b0ece5a14915d703b872c1d"
>> >
>> > Looking in the log I see:
>> >
>> >   /usr/lib/x86_64-linux-gnu/libdevmapper.so: undefined reference to
>> > `matchpathcon'
>> >
>> > It seems that the compiler already warned me about this:
>> >
>> >   warning: library search path "/usr/lib/x86_64-linux-gnu" is unsafe for
>> > cross-compilation
>> >
>> > Going back to log.do_configure, I see:
>> >
>> >   configure:     pcap: -I/usr/include -L/usr/lib/x86_64-linux-gnu
>> > -lpcap
>> >
>> > This is clearly not right and it shows me that libvirt needs to be
>> > configured with a specific location for libpcap. My fix, if you can call
>> > it
>> > that, is to pass --without-pcap to configure. I did that by adding the
>> > following line to libvirt_1.2.8.bb:
>> >
>> > PACKAGECONFIG[libpcap] =
>> > "--with-libpcap=MIKEKNOWSNOT,--without-libpcap,libpcap,"
>>
>> We have libpcap as a dependency for libvirt, so while the package config
>> value works to disable the option, what we need is to point libvirt's
>> configuration
>> phase to the sysroot, where our target version of libpcap can be found.
>>
>> That's fundamentally the same thing you are asking above, just without
>> packageconfig injecting it into the configuration phase.
>>
>> .. I went and had a look at how libvirt deals with libpcap and that flag
>> doesn't do what you expect in the --with usage .. it only points to a
>> different
>> location for pcap-config. pcap-config is stubbed out in our system, so
>> that
>> will never work.
>>
>> As it turns out, everyone has had a floating or mis identified libcap (my
>> config.log doesn't find it, and hence just has 'no').
>>
>> I pulled together the attached patch, it allows my libpcap from the
>> sysroot
>> to be found and used for the build.
>>
>> I didn't do any runtime testing, but if it works for you, I'll push it
>> to the tree
>> shortly.
>>
>> Cheers,
>>
>> Bruce
>>
>> >
>> > I'm new to Yocto so I haven't read the 2,000 page reference manual
>> > closely
>> > enough to properly formulate a better PACKAGECONFIG line. Perhaps you
>> > could
>> > help me with that. :-) In any case, libvirt compiles fine without
>> > libpcap
>> > and kvm-image-minimal is now built. I'm looking forward to testing it.
>> >
>> > Cheers
>> > ./m
>> >
>> >
>> >
>> > --
>> > _______________________________________________
>> > meta-virtualization mailing list
>> > meta-virtualization@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/meta-virtualization
>> >
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end"
>
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error building libvirt with pcap development files installed.
  2015-04-09 12:27     ` Bruce Ashfield
@ 2015-04-09 20:40       ` Michael Matera
  2015-04-10 16:21         ` Michael Matera
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Matera @ 2015-04-09 20:40 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 5290 bytes --]

Hi,

That's what I assumed too. Again, I'm new to Yocto so let me make
absolutely sure that my setup is sane and I'll let you know. It'll probably
be tomorrow (when I have time for fun!) because I teach two classes today.

Cheers
./m

On Thu, Apr 9, 2015 at 5:27 AM, Bruce Ashfield <bruce.ashfield@gmail.com>
wrote:

> On Wed, Apr 8, 2015 at 4:54 PM, Michael Matera
> <matera@lifealgorithmic.com> wrote:
> > Hi Bruce,
> >
> > Thanks for the patch. I'm having trouble getting it compiled. Can you
> tell
> > me what versions you're using? I switched to the master branch but now
> I'm
> > getting unrelated errors. Here's what I'm using:
>
> I'm always working from master (unless otherwise stated). What exact error
> did you see ? No compilation issues here!
>
> Bruce
>
> >
> > meta
> > meta-yocto
> > meta-yocto-bsp    = "master:d6d2dd5c9e06c54ff336b44d54f01b4fe24903ed"
> > meta-virtualization = "master:40dcc06946b0ef46286ae8982565cfa72c972d07"
> > meta-python
> > meta-oe
> > meta-networking
> > meta-filesystems  = "master:f3092a6766a3004a6fc9e2eef937a40508e97c44"
> >
> > Cheers
> > ./m
> >
> >
> > On Wed, Apr 8, 2015 at 10:24 AM, Bruce Ashfield <
> bruce.ashfield@gmail.com>
> > wrote:
> >>
> >> On Wed, Apr 8, 2015 at 1:14 AM, Michael Matera
> >> <matera@lifealgorithmic.com> wrote:
> >> > Hello folks!
> >> >
> >> > This is my first post so I'll try to make it a good one. I ran into
> some
> >>
> >> :). welcome!
> >>
> >> > trouble building kvm-image-minimal on Ubuntu 14.04 I suspect because I
> >> > have
> >> > the libpcap0.80-dev package installed on my build host. Here's some
> >> > details:
> >> >
> >> > BB_VERSION        = "1.24.0"
> >> > BUILD_SYS         = "x86_64-linux"
> >> > NATIVELSBSTRING   = "Ubuntu-14.04"
> >> > TARGET_SYS        = "x86_64-poky-linux"
> >> > MACHINE           = "genericx86-64"
> >> > DISTRO            = "poky"
> >> > DISTRO_VERSION    = "1.7.1"
> >> > TUNE_FEATURES     = "m64 core2"
> >> > TARGET_FPU        = ""
> >> > meta
> >> > meta-yocto
> >> > meta-yocto-bsp    = "dizzy:ec75238f6cc2d2d8d40e0268f6d2acc070cbe9a4"
> >> > meta-virtualization = "dizzy:8ec8270017fbeae8fcb8c2d82a60a9f5116b0cf2"
> >> > meta-python
> >> > meta-oe
> >> > meta-networking
> >> > meta-filesystems  = "dizzy:2ebb8752f378c9987b0ece5a14915d703b872c1d"
> >> >
> >> > Looking in the log I see:
> >> >
> >> >   /usr/lib/x86_64-linux-gnu/libdevmapper.so: undefined reference to
> >> > `matchpathcon'
> >> >
> >> > It seems that the compiler already warned me about this:
> >> >
> >> >   warning: library search path "/usr/lib/x86_64-linux-gnu" is unsafe
> for
> >> > cross-compilation
> >> >
> >> > Going back to log.do_configure, I see:
> >> >
> >> >   configure:     pcap: -I/usr/include -L/usr/lib/x86_64-linux-gnu
> >> > -lpcap
> >> >
> >> > This is clearly not right and it shows me that libvirt needs to be
> >> > configured with a specific location for libpcap. My fix, if you can
> call
> >> > it
> >> > that, is to pass --without-pcap to configure. I did that by adding the
> >> > following line to libvirt_1.2.8.bb:
> >> >
> >> > PACKAGECONFIG[libpcap] =
> >> > "--with-libpcap=MIKEKNOWSNOT,--without-libpcap,libpcap,"
> >>
> >> We have libpcap as a dependency for libvirt, so while the package config
> >> value works to disable the option, what we need is to point libvirt's
> >> configuration
> >> phase to the sysroot, where our target version of libpcap can be found.
> >>
> >> That's fundamentally the same thing you are asking above, just without
> >> packageconfig injecting it into the configuration phase.
> >>
> >> .. I went and had a look at how libvirt deals with libpcap and that flag
> >> doesn't do what you expect in the --with usage .. it only points to a
> >> different
> >> location for pcap-config. pcap-config is stubbed out in our system, so
> >> that
> >> will never work.
> >>
> >> As it turns out, everyone has had a floating or mis identified libcap
> (my
> >> config.log doesn't find it, and hence just has 'no').
> >>
> >> I pulled together the attached patch, it allows my libpcap from the
> >> sysroot
> >> to be found and used for the build.
> >>
> >> I didn't do any runtime testing, but if it works for you, I'll push it
> >> to the tree
> >> shortly.
> >>
> >> Cheers,
> >>
> >> Bruce
> >>
> >> >
> >> > I'm new to Yocto so I haven't read the 2,000 page reference manual
> >> > closely
> >> > enough to properly formulate a better PACKAGECONFIG line. Perhaps you
> >> > could
> >> > help me with that. :-) In any case, libvirt compiles fine without
> >> > libpcap
> >> > and kvm-image-minimal is now built. I'm looking forward to testing it.
> >> >
> >> > Cheers
> >> > ./m
> >> >
> >> >
> >> >
> >> > --
> >> > _______________________________________________
> >> > meta-virtualization mailing list
> >> > meta-virtualization@yoctoproject.org
> >> > https://lists.yoctoproject.org/listinfo/meta-virtualization
> >> >
> >>
> >>
> >>
> >> --
> >> "Thou shalt not follow the NULL pointer, for chaos and madness await
> >> thee at its end"
> >
> >
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
>

[-- Attachment #2: Type: text/html, Size: 7692 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error building libvirt with pcap development files installed.
  2015-04-09 20:40       ` Michael Matera
@ 2015-04-10 16:21         ` Michael Matera
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Matera @ 2015-04-10 16:21 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 5691 bytes --]

Hi Bruce,

Doing a git pull and turning off systemd fixed me. The patch works. Thanks!

Cheers
./m

On Thu, Apr 9, 2015 at 1:40 PM, Michael Matera <matera@lifealgorithmic.com>
wrote:

> Hi,
>
> That's what I assumed too. Again, I'm new to Yocto so let me make
> absolutely sure that my setup is sane and I'll let you know. It'll probably
> be tomorrow (when I have time for fun!) because I teach two classes today.
>
> Cheers
> ./m
>
> On Thu, Apr 9, 2015 at 5:27 AM, Bruce Ashfield <bruce.ashfield@gmail.com>
> wrote:
>
>> On Wed, Apr 8, 2015 at 4:54 PM, Michael Matera
>> <matera@lifealgorithmic.com> wrote:
>> > Hi Bruce,
>> >
>> > Thanks for the patch. I'm having trouble getting it compiled. Can you
>> tell
>> > me what versions you're using? I switched to the master branch but now
>> I'm
>> > getting unrelated errors. Here's what I'm using:
>>
>> I'm always working from master (unless otherwise stated). What exact error
>> did you see ? No compilation issues here!
>>
>> Bruce
>>
>> >
>> > meta
>> > meta-yocto
>> > meta-yocto-bsp    = "master:d6d2dd5c9e06c54ff336b44d54f01b4fe24903ed"
>> > meta-virtualization = "master:40dcc06946b0ef46286ae8982565cfa72c972d07"
>> > meta-python
>> > meta-oe
>> > meta-networking
>> > meta-filesystems  = "master:f3092a6766a3004a6fc9e2eef937a40508e97c44"
>> >
>> > Cheers
>> > ./m
>> >
>> >
>> > On Wed, Apr 8, 2015 at 10:24 AM, Bruce Ashfield <
>> bruce.ashfield@gmail.com>
>> > wrote:
>> >>
>> >> On Wed, Apr 8, 2015 at 1:14 AM, Michael Matera
>> >> <matera@lifealgorithmic.com> wrote:
>> >> > Hello folks!
>> >> >
>> >> > This is my first post so I'll try to make it a good one. I ran into
>> some
>> >>
>> >> :). welcome!
>> >>
>> >> > trouble building kvm-image-minimal on Ubuntu 14.04 I suspect because
>> I
>> >> > have
>> >> > the libpcap0.80-dev package installed on my build host. Here's some
>> >> > details:
>> >> >
>> >> > BB_VERSION        = "1.24.0"
>> >> > BUILD_SYS         = "x86_64-linux"
>> >> > NATIVELSBSTRING   = "Ubuntu-14.04"
>> >> > TARGET_SYS        = "x86_64-poky-linux"
>> >> > MACHINE           = "genericx86-64"
>> >> > DISTRO            = "poky"
>> >> > DISTRO_VERSION    = "1.7.1"
>> >> > TUNE_FEATURES     = "m64 core2"
>> >> > TARGET_FPU        = ""
>> >> > meta
>> >> > meta-yocto
>> >> > meta-yocto-bsp    = "dizzy:ec75238f6cc2d2d8d40e0268f6d2acc070cbe9a4"
>> >> > meta-virtualization =
>> "dizzy:8ec8270017fbeae8fcb8c2d82a60a9f5116b0cf2"
>> >> > meta-python
>> >> > meta-oe
>> >> > meta-networking
>> >> > meta-filesystems  = "dizzy:2ebb8752f378c9987b0ece5a14915d703b872c1d"
>> >> >
>> >> > Looking in the log I see:
>> >> >
>> >> >   /usr/lib/x86_64-linux-gnu/libdevmapper.so: undefined reference to
>> >> > `matchpathcon'
>> >> >
>> >> > It seems that the compiler already warned me about this:
>> >> >
>> >> >   warning: library search path "/usr/lib/x86_64-linux-gnu" is unsafe
>> for
>> >> > cross-compilation
>> >> >
>> >> > Going back to log.do_configure, I see:
>> >> >
>> >> >   configure:     pcap: -I/usr/include -L/usr/lib/x86_64-linux-gnu
>> >> > -lpcap
>> >> >
>> >> > This is clearly not right and it shows me that libvirt needs to be
>> >> > configured with a specific location for libpcap. My fix, if you can
>> call
>> >> > it
>> >> > that, is to pass --without-pcap to configure. I did that by adding
>> the
>> >> > following line to libvirt_1.2.8.bb:
>> >> >
>> >> > PACKAGECONFIG[libpcap] =
>> >> > "--with-libpcap=MIKEKNOWSNOT,--without-libpcap,libpcap,"
>> >>
>> >> We have libpcap as a dependency for libvirt, so while the package
>> config
>> >> value works to disable the option, what we need is to point libvirt's
>> >> configuration
>> >> phase to the sysroot, where our target version of libpcap can be found.
>> >>
>> >> That's fundamentally the same thing you are asking above, just without
>> >> packageconfig injecting it into the configuration phase.
>> >>
>> >> .. I went and had a look at how libvirt deals with libpcap and that
>> flag
>> >> doesn't do what you expect in the --with usage .. it only points to a
>> >> different
>> >> location for pcap-config. pcap-config is stubbed out in our system, so
>> >> that
>> >> will never work.
>> >>
>> >> As it turns out, everyone has had a floating or mis identified libcap
>> (my
>> >> config.log doesn't find it, and hence just has 'no').
>> >>
>> >> I pulled together the attached patch, it allows my libpcap from the
>> >> sysroot
>> >> to be found and used for the build.
>> >>
>> >> I didn't do any runtime testing, but if it works for you, I'll push it
>> >> to the tree
>> >> shortly.
>> >>
>> >> Cheers,
>> >>
>> >> Bruce
>> >>
>> >> >
>> >> > I'm new to Yocto so I haven't read the 2,000 page reference manual
>> >> > closely
>> >> > enough to properly formulate a better PACKAGECONFIG line. Perhaps you
>> >> > could
>> >> > help me with that. :-) In any case, libvirt compiles fine without
>> >> > libpcap
>> >> > and kvm-image-minimal is now built. I'm looking forward to testing
>> it.
>> >> >
>> >> > Cheers
>> >> > ./m
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > _______________________________________________
>> >> > meta-virtualization mailing list
>> >> > meta-virtualization@yoctoproject.org
>> >> > https://lists.yoctoproject.org/listinfo/meta-virtualization
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> >> thee at its end"
>> >
>> >
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end"
>>
>
>

[-- Attachment #2: Type: text/html, Size: 8356 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-10 16:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08  5:14 Error building libvirt with pcap development files installed Michael Matera
2015-04-08 17:24 ` Bruce Ashfield
2015-04-08 20:54   ` Michael Matera
2015-04-09 12:27     ` Bruce Ashfield
2015-04-09 20:40       ` Michael Matera
2015-04-10 16:21         ` Michael Matera

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.