|
From: Martin B. <mar...@bt...> - 2005-02-20 14:45:46
|
Hello all, I have been trying to get valgrind 2.2.0 compiled on a Mandrake 10.1 machine for a while now. I searched through the mailing list archive and found the email below. I tried to carry out the instructions but they did not work for me. Here is what coregrind/vg_unsafe.h looks like now line 48 line 49 #define _LINUX_IF_H_ #include <linux/mii.h> #include <linux/if.h> /* for struct ifreq et al */ line 53 line 54. Could someone let me know what I'm doing wrong. Are there going to be future versions of valgrind produced? (I hope so) It seems to be a while since 2.2.0 came out. thanks, Martin ************************************************************************************ The details of my machine are. Mandrake 10.1 gcc --version gcc (GCC) 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk) /lib/libc.so.6 GNU C Library stable release version 2.3.3, by Roland McGrath et al. Copyright (C) 2004 Free Software Foundation, Inc. uname -a Linux martin.p.bradley.net 2.6.9 #16 Thu Nov 18 20:09:30 GMT 2004 i686 AMD Athlon(tm) Processor unknown GNU/Linux (Its a custom kernel build in case that matters) ************************************************************************************ From: Sefer Tov <sefer <at> hotmail.com> Subject: Valgrind BUG (and a patch) Newsgroups: gmane.comp.debugging.valgrind Date: Thu, 14 Oct 2004 09:16:39 +0000 Hi, There is a certain bug in Valgrind, ranging from Valgrind 2.2.0 and throughout the HEAD cvs branch. It's a result of redefinition of certain structures (on certain architectures, like the newest Mandrake distribution 10.1 and possibly others). The file "vg_unsafe.h" includes both <linux/mii.h> and <net/if.h> however, it appears that mii.h also includes <linux/if.h> (which conflicts with <net/if.h> because they define the structures but use different preprocessor defines to exclude their reprocessing - _LINUX_IF_H_ and _LINUX_NET_H_) There are a few obvious solutions to this, like: First, change in "vg_unsafe.h" the include from <net/if.h> to <linux/if.h> Second, add in "vg_unsafe.h" just before (to make sure that the second if.h version is included): #define _LINUX_IF_H_ include <linux/mii.h> Both seems to work and make valgrind compile and work just fine. Can you please add one of these solution to the cvs head, so that the upcoming releases would compile on newer Linux distros? Thanks, Sefer. Here is the error I was getting consistently for the past couple of weeks. if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../coregrind -I../coregrind -I../coregrind/x86 -I../coregrind/x86-linux -I../include -I../include -I../include/x86 -DVG_LIBDIR="\"/opt/valgrind/lib/valgrind"\" -I./demangle -DKICKSTART_BASE=0xb0000000 -DVG_PLATFORM="\"x86-linux"\" -Winline -Wall -Wshadow -O -fno-omit-frame-pointer -mpreferred-stack-boundary=2 -g -DELFSZ=32 -MT vg_syscalls.o -MD -MP -MF ".deps/vg_syscalls.Tpo" \ -c -o vg_syscalls.o `test -f 'vg_syscalls.c' || echo './'`vg_syscalls.c; \ then mv -f ".deps/vg_syscalls.Tpo" ".deps/vg_syscalls.Po"; \ else rm -f ".deps/vg_syscalls.Tpo"; exit 1; \ fi In file included from /usr/include/linux/msg.h:5, from vg_unsafe.h:57, from vg_syscalls.c:35: /usr/include/linux/list.h:685:2: warning: #warning "don't include kernel headers in userspace" In file included from /usr/include/linux/mii.h:12, from vg_unsafe.h:77, from vg_syscalls.c:35: /usr/include/linux/if.h:95: error: redefinition of `struct ifmap' /usr/include/linux/if.h:131: error: redefinition of `struct ifreq' /usr/include/linux/if.h:181: error: redefinition of `struct ifconf' make[4]: *** [vg_syscalls.o] Error 1 make[4]: Leaving directory `/home/sefer/t/valgrind/coregrind' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/sefer/t/valgrind/coregrind' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/sefer/t/valgrind/coregrind' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/sefer/t/valgrind' make: *** [all] Error 2 |
|
From: Nicholas N. <nj...@cs...> - 2005-02-20 16:26:51
|
On Mon, 21 Feb 2005, Martin Bradley wrote: > I have been trying to get valgrind 2.2.0 compiled on a Mandrake 10.1 machine > for a while now. I searched through the mailing list archive and found the > email below. I tried to carry out the instructions but they did not work for > me. > Here is what coregrind/vg_unsafe.h looks like now > > line 48 > line 49 > #define _LINUX_IF_H_ > #include <linux/mii.h> > #include <linux/if.h> /* for struct ifreq et al */ > line 53 > line 54. > > Could someone let me know what I'm doing wrong. It's not your fault; kernel headers are broken on lots of machines, and in lots of different ways. > Are there going to be future versions of valgrind produced? (I hope so) > It seems to be a while since 2.2.0 came out. Yes, there will be. The problem above is fixed in the CVS HEAD, and so will also be fixed in the next release. N |
|
From: Martin B. <mar...@bt...> - 2005-02-20 19:08:37
|
How do I get the autogen.sh to run? [martin@martin valgrind]$ ./autogen.sh running: aclocal aclocal: configure.in: 14: macro `AM_PROG_CC_C_O' not found in library error: while running 'aclocal' The archive contains the following part of a message. From: Erik Thiele <erik <at> thiele-hydraulik.de> Subject: Re: Please report this bug at: valgrind.kde.org Newsgroups: gmane.comp.debugging.valgrind Date: Tue, 09 Nov 2004 13:36:01 +0100 On Tue, 9 Nov 2004 13:16:56 +0100 Erik Thiele <erik <at> thiele-hydraulik.de> wrote: > > goofy valgrind # ./autogen.sh > running: aclocal > aclocal: configure.in: 14: macro `AM_PROG_CC_C_O' not found in library okok i fixed that one. ?? How did he fix it. thanks, Martin. On Sunday 20 February 2005 16:26, Nicholas Nethercote wrote: > On Mon, 21 Feb 2005, Martin Bradley wrote: > > I have been trying to get valgrind 2.2.0 compiled on a Mandrake 10.1 > > machine for a while now. I searched through the mailing list archive and > > found the email below. I tried to carry out the instructions but they > > did not work for me. > > Here is what coregrind/vg_unsafe.h looks like now > > > > line 48 > > line 49 > > #define _LINUX_IF_H_ > > #include <linux/mii.h> > > #include <linux/if.h> /* for struct ifreq et al */ > > line 53 > > line 54. > > > > Could someone let me know what I'm doing wrong. > > It's not your fault; kernel headers are broken on lots of machines, and > in lots of different ways. > > > Are there going to be future versions of valgrind produced? (I hope so) > > It seems to be a while since 2.2.0 came out. > > Yes, there will be. The problem above is fixed in the CVS HEAD, and so > will also be fixed in the next release. > > N > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Nicholas N. <nj...@cs...> - 2005-02-20 19:11:35
|
On Mon, 21 Feb 2005, Martin Bradley wrote: > How do I get the autogen.sh to run? > > [martin@martin valgrind]$ ./autogen.sh > running: aclocal > aclocal: configure.in: 14: macro `AM_PROG_CC_C_O' not found in library > error: while running 'aclocal' You need a more recent version of automake. N |
|
From: Martin B. <mar...@bt...> - 2005-02-20 20:01:24
|
Thanks very much Nicholas, that sorted it out for me. Valgrind is running now Martin. On Sunday 20 February 2005 19:11, Nicholas Nethercote wrote: > On Mon, 21 Feb 2005, Martin Bradley wrote: > > How do I get the autogen.sh to run? > > > > [martin@martin valgrind]$ ./autogen.sh > > running: aclocal > > aclocal: configure.in: 14: macro `AM_PROG_CC_C_O' not found in library > > error: while running 'aclocal' > > You need a more recent version of automake. > > N > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users |