All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] strace: add netlink/netlink-compat.h in configure.ac
@ 2010-12-21 17:39 Víctor Manuel Jáquez Leal
  2010-12-21 18:52 ` Tom Rini
  2010-12-21 19:00 ` Khem Raj
  0 siblings, 2 replies; 5+ messages in thread
From: Víctor Manuel Jáquez Leal @ 2010-12-21 17:39 UTC (permalink / raw)
  To: openembedded-devel

I found, compiling an console-image for omap4330-panda machine, that strace
compilation broke because the netlink.h wasn't included. It was not included
because the AC_CHECK_HEADERS failed. If failed because sa_family_t wasn't
defined, even though linux/socket.h is supposed to define it.

This patch modifies the configure.ac in order to include
netlink/netlink-compat.h in the AC_CHECK_HEADER macro, so the header is
detected correctly.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
---
 recipes/strace/strace-4.5.14/netlink.patch |   16 ++++++++++++++++
 recipes/strace/strace_4.5.14.bb            |    3 ++-
 2 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 recipes/strace/strace-4.5.14/netlink.patch

diff --git a/recipes/strace/strace-4.5.14/netlink.patch b/recipes/strace/strace-4.5.14/netlink.patch
new file mode 100644
index 0000000..ba89a10
--- /dev/null
+++ b/recipes/strace/strace-4.5.14/netlink.patch
@@ -0,0 +1,16 @@
+Index: strace-4.5.14/configure.ac
+===================================================================
+--- strace-4.5.14.orig/configure.ac
++++ strace-4.5.14/configure.ac
+@@ -194,7 +194,10 @@ fi
+ AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname)
+ AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h  poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h], [], [])
+ AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
+-                 [], [], [#include <linux/socket.h>])
++                 [], [], [
++#include <netlink/netlink-compat.h>
++#include <linux/socket.h>
++])
+ AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
+ AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
+ 
diff --git a/recipes/strace/strace_4.5.14.bb b/recipes/strace/strace_4.5.14.bb
index 33a44ad..a4a0981 100644
--- a/recipes/strace/strace_4.5.14.bb
+++ b/recipes/strace/strace_4.5.14.bb
@@ -1,7 +1,7 @@
 DESCRIPTION = "strace is a system call tracing tool."
 SECTION = "console/utils"
 LICENSE = "BSD"
-PR = "r9"
+PR = "r10"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
            file://glibc-2.5.patch \
@@ -13,6 +13,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
            file://strace-arm-no-cachectl.patch \
            file://strace-dont-include-linux-dirent-h.patch \
            file://mips-sigcontext.patch \
+           file://netlink.patch \
           "
 
 # The strace-4.5.14-avr32.patch conflicts with some other patches.
-- 
1.7.2.3




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

* Re: [RFC] strace: add netlink/netlink-compat.h in configure.ac
  2010-12-21 17:39 [RFC] strace: add netlink/netlink-compat.h in configure.ac Víctor Manuel Jáquez Leal
@ 2010-12-21 18:52 ` Tom Rini
  2010-12-21 19:13   ` Víctor M. Jáquez L.
  2010-12-21 19:00 ` Khem Raj
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Rini @ 2010-12-21 18:52 UTC (permalink / raw)
  To: openembedded-devel

On 12/21/2010 10:39 AM, Víctor Manuel Jáquez Leal wrote:
> I found, compiling an console-image for omap4330-panda machine, that strace
> compilation broke because the netlink.h wasn't included. It was not included
> because the AC_CHECK_HEADERS failed. If failed because sa_family_t wasn't
> defined, even though linux/socket.h is supposed to define it.
>
> This patch modifies the configure.ac in order to include
> netlink/netlink-compat.h in the AC_CHECK_HEADER macro, so the header is
> detected correctly.

Is this fixed upstream or in 4.5.20 by chance?

-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [RFC] strace: add netlink/netlink-compat.h in configure.ac
  2010-12-21 17:39 [RFC] strace: add netlink/netlink-compat.h in configure.ac Víctor Manuel Jáquez Leal
  2010-12-21 18:52 ` Tom Rini
@ 2010-12-21 19:00 ` Khem Raj
  2010-12-21 19:18   ` Víctor M. Jáquez L.
  1 sibling, 1 reply; 5+ messages in thread
From: Khem Raj @ 2010-12-21 19:00 UTC (permalink / raw)
  To: openembedded-devel

2010/12/21 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>:
> I found, compiling an console-image for omap4330-panda machine, that strace
> compilation broke because the netlink.h wasn't included. It was not included
> because the AC_CHECK_HEADERS failed. If failed because sa_family_t wasn't
> defined, even though linux/socket.h is supposed to define it.
>
> This patch modifies the configure.ac in order to include
> netlink/netlink-compat.h in the AC_CHECK_HEADER macro, so the header is
> detected correctly.
>

it happens after
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9c501935a3cdcf6b1d35aaee3aa11c7a7051a305
see this message
http://lkml.indiana.edu/hypermail/linux/kernel/1001.1/02281.html
I fixed it differently for kernel headers see

recipes/linux-libc-headers/linux-libc-headers-2.6.32/export_sa_family_t.patch

since this might break more packages than strace the fix in kernel
headers sounded better.

> Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
> ---
>  recipes/strace/strace-4.5.14/netlink.patch |   16 ++++++++++++++++
>  recipes/strace/strace_4.5.14.bb            |    3 ++-
>  2 files changed, 18 insertions(+), 1 deletions(-)
>  create mode 100644 recipes/strace/strace-4.5.14/netlink.patch
>
> diff --git a/recipes/strace/strace-4.5.14/netlink.patch b/recipes/strace/strace-4.5.14/netlink.patch
> new file mode 100644
> index 0000000..ba89a10
> --- /dev/null
> +++ b/recipes/strace/strace-4.5.14/netlink.patch
> @@ -0,0 +1,16 @@
> +Index: strace-4.5.14/configure.ac
> +===================================================================
> +--- strace-4.5.14.orig/configure.ac
> ++++ strace-4.5.14/configure.ac
> +@@ -194,7 +194,10 @@ fi
> + AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname)
> + AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h  poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h], [], [])
> + AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
> +-                 [], [], [#include <linux/socket.h>])
> ++                 [], [], [
> ++#include <netlink/netlink-compat.h>
> ++#include <linux/socket.h>
> ++])
> + AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
> + AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
> +
> diff --git a/recipes/strace/strace_4.5.14.bb b/recipes/strace/strace_4.5.14.bb
> index 33a44ad..a4a0981 100644
> --- a/recipes/strace/strace_4.5.14.bb
> +++ b/recipes/strace/strace_4.5.14.bb
> @@ -1,7 +1,7 @@
>  DESCRIPTION = "strace is a system call tracing tool."
>  SECTION = "console/utils"
>  LICENSE = "BSD"
> -PR = "r9"
> +PR = "r10"
>
>  SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
>            file://glibc-2.5.patch \
> @@ -13,6 +13,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
>            file://strace-arm-no-cachectl.patch \
>            file://strace-dont-include-linux-dirent-h.patch \
>            file://mips-sigcontext.patch \
> +           file://netlink.patch \
>           "
>
>  # The strace-4.5.14-avr32.patch conflicts with some other patches.
> --
> 1.7.2.3
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [RFC] strace: add netlink/netlink-compat.h in configure.ac
  2010-12-21 18:52 ` Tom Rini
@ 2010-12-21 19:13   ` Víctor M. Jáquez L.
  0 siblings, 0 replies; 5+ messages in thread
From: Víctor M. Jáquez L. @ 2010-12-21 19:13 UTC (permalink / raw)
  To: openembedded-devel

On Tue, Dec 21, 2010 at 11:52:01AM -0700, Tom Rini wrote:
> On 12/21/2010 10:39 AM, Víctor Manuel Jáquez Leal wrote:
> >I found, compiling an console-image for omap4330-panda machine, that strace
> >compilation broke because the netlink.h wasn't included. It was not included
> >because the AC_CHECK_HEADERS failed. If failed because sa_family_t wasn't
> >defined, even though linux/socket.h is supposed to define it.
> >
> >This patch modifies the configure.ac in order to include
> >netlink/netlink-compat.h in the AC_CHECK_HEADER macro, so the header is
> >detected correctly.
> 
> Is this fixed upstream or in 4.5.20 by chance?

I grabbed the git version and it cross-compile fine. The configure.ac
includes <stddef.h> instead of <linux/socket.h> - I saw that after sending the
rfc/patch.

vmjl



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

* Re: [RFC] strace: add netlink/netlink-compat.h in configure.ac
  2010-12-21 19:00 ` Khem Raj
@ 2010-12-21 19:18   ` Víctor M. Jáquez L.
  0 siblings, 0 replies; 5+ messages in thread
From: Víctor M. Jáquez L. @ 2010-12-21 19:18 UTC (permalink / raw)
  To: openembedded-devel

On Tue, Dec 21, 2010 at 11:00:25AM -0800, Khem Raj wrote:
> 2010/12/21 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>:
> > I found, compiling an console-image for omap4330-panda machine, that strace
> > compilation broke because the netlink.h wasn't included. It was not included
> > because the AC_CHECK_HEADERS failed. If failed because sa_family_t wasn't
> > defined, even though linux/socket.h is supposed to define it.
> >
> > This patch modifies the configure.ac in order to include
> > netlink/netlink-compat.h in the AC_CHECK_HEADER macro, so the header is
> > detected correctly.
> >
> 
> it happens after
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9c501935a3cdcf6b1d35aaee3aa11c7a7051a305
> see this message
> http://lkml.indiana.edu/hypermail/linux/kernel/1001.1/02281.html
> I fixed it differently for kernel headers see
> 
> recipes/linux-libc-headers/linux-libc-headers-2.6.32/export_sa_family_t.patch
> 
> since this might break more packages than strace the fix in kernel
> headers sounded better.

That looks like a nice backport hack.

vmjl

> 
> > Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
> > ---
> >  recipes/strace/strace-4.5.14/netlink.patch |   16 ++++++++++++++++
> >  recipes/strace/strace_4.5.14.bb            |    3 ++-
> >  2 files changed, 18 insertions(+), 1 deletions(-)
> >  create mode 100644 recipes/strace/strace-4.5.14/netlink.patch
> >
> > diff --git a/recipes/strace/strace-4.5.14/netlink.patch b/recipes/strace/strace-4.5.14/netlink.patch
> > new file mode 100644
> > index 0000000..ba89a10
> > --- /dev/null
> > +++ b/recipes/strace/strace-4.5.14/netlink.patch
> > @@ -0,0 +1,16 @@
> > +Index: strace-4.5.14/configure.ac
> > +===================================================================
> > +--- strace-4.5.14.orig/configure.ac
> > ++++ strace-4.5.14/configure.ac
> > +@@ -194,7 +194,10 @@ fi
> > + AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname)
> > + AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h  poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h], [], [])
> > + AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
> > +-                 [], [], [#include <linux/socket.h>])
> > ++                 [], [], [
> > ++#include <netlink/netlink-compat.h>
> > ++#include <linux/socket.h>
> > ++])
> > + AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
> > + AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
> > +
> > diff --git a/recipes/strace/strace_4.5.14.bb b/recipes/strace/strace_4.5.14.bb
> > index 33a44ad..a4a0981 100644
> > --- a/recipes/strace/strace_4.5.14.bb
> > +++ b/recipes/strace/strace_4.5.14.bb
> > @@ -1,7 +1,7 @@
> >  DESCRIPTION = "strace is a system call tracing tool."
> >  SECTION = "console/utils"
> >  LICENSE = "BSD"
> > -PR = "r9"
> > +PR = "r10"
> >
> >  SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
> >            file://glibc-2.5.patch \
> > @@ -13,6 +13,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
> >            file://strace-arm-no-cachectl.patch \
> >            file://strace-dont-include-linux-dirent-h.patch \
> >            file://mips-sigcontext.patch \
> > +           file://netlink.patch \
> >           "
> >
> >  # The strace-4.5.14-avr32.patch conflicts with some other patches.
> > --
> > 1.7.2.3
> >
> >
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> >
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

end of thread, other threads:[~2010-12-21 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21 17:39 [RFC] strace: add netlink/netlink-compat.h in configure.ac Víctor Manuel Jáquez Leal
2010-12-21 18:52 ` Tom Rini
2010-12-21 19:13   ` Víctor M. Jáquez L.
2010-12-21 19:00 ` Khem Raj
2010-12-21 19:18   ` Víctor M. Jáquez L.

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.