When building strace-4.5.14 using CodeSourcery 2011.06-70 for ARM
(gcc-4.6.1) it fails with:
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/arm -I./linux/arm -Ilinux
-I./linux -Wall -g -O2 -MT net.o -MD -MP -MF ".deps/net.Tpo" -c -o
net.o net.c; \
then mv -f ".deps/net.Tpo" ".deps/net.Po"; else rm -f
".deps/net.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/arm -I./linux/arm -Ilinux
-I./linux -Wall -g -O2 -MT process.o -MD -MP -MF ".deps/process.Tpo"
-c -o process.o process.c; \
then mv -f ".deps/process.Tpo" ".deps/process.Po"; else rm -f
".deps/process.Tpo"; exit 1; fi
net.c: In function 'printsock':
net.c:957:22: error: field 'nl' has incomplete type
make[1]: *** [net.o] Error 1
make[1]: *** Waiting for unfinished jobs....
This is due to configured errantly using <linux/socket.h> instead of
<sys/socket.h>; details at:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560516
The attached patch fixes this issue (and still builds on CodeSourcery
2009q1-203 (gcc-4.3.3))...
--
Peter Barada
[email protected]
Index: dist/lfs-5.1/strace/strace.spec
===================================================================
--- dist/lfs-5.1/strace/strace.spec (revision 26818)
+++ dist/lfs-5.1/strace/strace.spec (working copy)
@@ -16,6 +16,7 @@
Patch4 : strace-4.4.98-1155222257.patch
Patch5 : strace-4.5.14-linux-dirent.patch
Patch6 : strace-arm-no-cachectl.patch
+Patch7 : strace-4.5.14-linux_socket.patch
BuildRoot : %{_tmppath}/%{name}
Prefix : %{pfx}
@@ -31,6 +32,7 @@
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
%Build
# Note strace-4.4.98-1155222257.patch and ac_cv_header_asm_sigcontext_h=yes
Index: LTIB-added-package-pool/strace-4.5.14-linux_socket.patch.md5
===================================================================
--- LTIB-added-package-pool/strace-4.5.14-linux_socket.patch.md5 (revision 0)
+++ LTIB-added-package-pool/strace-4.5.14-linux_socket.patch.md5 (revision 0)
@@ -0,0 +1 @@
+7129a81d970f09432f391900aee78ce3 strace-4.5.14-linux_socket.patch
Index: LTIB-added-package-pool/strace-4.5.14-linux_socket.patch
===================================================================
--- LTIB-added-package-pool/strace-4.5.14-linux_socket.patch (revision 0)
+++ LTIB-added-package-pool/strace-4.5.14-linux_socket.patch (revision 0)
@@ -0,0 +1,24 @@
+diff --exclude CVS --exclude .git -uNr strace-4.5.14/configure strace-4.5.14.modified/configure
+--- strace-4.5.14/configure 2006-01-12 06:20:14.000000000 -0500
++++ strace-4.5.14.modified/configure 2012-02-27 13:37:18.202207609 -0500
+@@ -6945,7 +6945,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-#include <linux/socket.h>
++#include <sys/socket.h>
+
+ #include <$ac_header>
+ _ACEOF
+diff --exclude CVS --exclude .git -uNr strace-4.5.14/configure.ac strace-4.5.14.modified/configure.ac
+--- strace-4.5.14/configure.ac 2006-01-12 06:18:27.000000000 -0500
++++ strace-4.5.14.modified/configure.ac 2012-02-27 13:40:46.054214461 -0500
+@@ -194,7 +194,7 @@
+ 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 <sys/socket.h>])
+ AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
+ AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
+
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib