|
From: Matthias A. <gu...@un...> - 2014-09-15 15:17:38
|
Hello,
here are the details:
valgrind-3.10.0> uname -a
Linux sisis 2.6.16.60-0.83.2-smp #1 SMP Fri Sep 2 13:49:16 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
valgrind-3.10.0> ./configure --enable-only32bit
...
config.status: config.h is unchanged
config.status: executing depfiles commands
Maximum build arch: amd64
Primary build arch: x86
Secondary build arch:
Build OS: linux
Primary build target: X86_LINUX
Secondary build target:
Platform variant: vanilla
Primary -DVGPV string: -DVGPV_x86_linux_vanilla=1
Default supp files: exp-sgcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.4.supp
valgrind-3.10.0> make
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVGPV_x86_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/usr/local/lib/valgrind"\" -DVG_PLATFORM="\"x86-linux\"" -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -fomit-frame-pointer -Wno-long-long -fno-stack-protector -MT vgdb-vgdb-invoker-ptrace.o -MD -MP -MF .deps/vgdb-vgdb-invoker-ptrace.Tpo -c -o vgdb-vgdb-invoker-ptrace.o `test -f 'vgdb-invoker-ptrace.c' || echo './'`vgdb-invoker-ptrace.c
vgdb-invoker-ptrace.c: In function 'waitstopped':
vgdb-invoker-ptrace.c:319: error: 'PTRACE_GETSIGINFO' undeclared (first use in this function)
vgdb-invoker-ptrace.c:319: error: (Each undeclared identifier is reported only once
vgdb-invoker-ptrace.c:319: error: for each function it appears in.)
make[3]: *** [vgdb-vgdb-invoker-ptrace.o] Error 1
make[3]: Leaving directory `/home/sisis/guru/valgrind-3.10.0/coregrind'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/sisis/guru/valgrind-3.10.0/coregrind'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sisis/guru/valgrind-3.10.0'
make: *** [all] Error 2
if I do the ./configure w/o any args as:
Maximum build arch: amd64
Primary build arch: amd64
Secondary build arch: x86
Build OS: linux
Primary build target: AMD64_LINUX
Secondary build target: X86_LINUX
Platform variant: vanilla
Primary -DVGPV string: -DVGPV_amd64_linux_vanilla=1
Default supp files: exp-sgcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.4.supp
the compilation stops at:
...
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: warning: i386 architecture of input file `valgrind-m_debuglog.o' is incompatible with i386:x86-64 output
valgrind-m_debuglog.o: In function `myvprintf_int64':
/home/sisis/guru/valgrind-3.10.0/coregrind/m_debuglog.c:685: undefined reference to `__umoddi3'
/home/sisis/guru/valgrind-3.10.0/coregrind/m_debuglog.c:686: undefined reference to `__udivdi3'
collect2: ld returned 1 exit status
make[3]: *** [valgrind] Error 1
make[3]: Leaving directory `/home/sisis/guru/valgrind-3.10.0/coregrind'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/sisis/guru/valgrind-3.10.0/coregrind'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sisis/guru/valgrind-3.10.0'
make: *** [all] Error 2
Any ideas? Let me know if you need more information from this host.
--
Matthias Apitz | /"\ ASCII Ribbon Campaign:
E-mail: gu...@un... | \ / - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ | X - No proprietary attachments
phone: +49-170-4527211 | / \ - Respect for open standards
| en.wikipedia.org/wiki/ASCII_Ribbon_Campaign
|
|
From: Philippe W. <phi...@sk...> - 2014-09-15 19:59:02
|
On Mon, 2014-09-15 at 16:44 +0200, Matthias Apitz wrote: > vgdb-invoker-ptrace.c:319: error: 'PTRACE_GETSIGINFO' undeclared (first use in this function) A similar compilation error was encountered on s390x/RHEL5/glibc 2.3.4, as this glibc version does not define PTRACE_GETSIGINFO. Ptrace manual describes that PTRACE_GETSIGINFO is available since Linux 2.3.99-pre6) so your kernel (2.6.16) should support PTRACE_GETSIGINFO. Which glibc version do you have ? The easy fix to try is to define PTRACE_GETSIGINFO as for s390x, e.g. by just removing the #if defined(VGA_s390x) in the following extract of vgdb-invoker-ptrace.c: #if defined(VGA_s390x) /* RHEL 5 uses glibc 2.3.4 which does not define PTRACE_GETSIGINFO */ # ifndef PTRACE_GETSIGINFO # define PTRACE_GETSIGINFO 0x4202 # endif #endif > ... > /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: warning: i386 architecture of input file `valgrind-m_debuglog.o' is incompatible with i386:x86-64 output > valgrind-m_debuglog.o: In function `myvprintf_int64': > /home/sisis/guru/valgrind-3.10.0/coregrind/m_debuglog.c:685: undefined reference to `__umoddi3' > /home/sisis/guru/valgrind-3.10.0/coregrind/m_debuglog.c:686: undefined reference to `__udivdi3' This is strange. Lines 685 and 686 have not changed since 2005. But seeing the first error msg, it looks like you might have a leftover of the '32 bits only' causing a problem. To test with only 64 bits, it might be better to start from a clean source tree. Philippe |
|
From: Patrick J. L. <lop...@gm...> - 2014-09-15 23:00:40
|
PTRACE_GETSIGINFO definitely exists on SLES10 SP3 64-bit: suse10$ cat /etc/issue Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64) - Kernel \r (\l). suse10$ find /usr/include -type f | xargs grep PTRACE_GETSIGINFO /usr/include/linux/ptrace.h:#define PTRACE_GETSIGINFO 0x4202 suse10$ rpm -qf /usr/include/linux/ptrace.h glibc-devel-2.4-31.77.76.1 This is on a testing system I have lying around... No time to try compiling Valgrind there at the moment, though. Does Valgrind #include <linux/ptrace.h> ? A quick scan of the headers on SLES10 suggests <sys/ptrace.h> is not sufficient to pick up this #define... - Pat On Mon, Sep 15, 2014 at 12:59 PM, Philippe Waroquiers <phi...@sk...> wrote: > On Mon, 2014-09-15 at 16:44 +0200, Matthias Apitz wrote: > >> vgdb-invoker-ptrace.c:319: error: 'PTRACE_GETSIGINFO' undeclared (first use in this function) > A similar compilation error was encountered on s390x/RHEL5/glibc 2.3.4, > as this glibc version does not define PTRACE_GETSIGINFO. > Ptrace manual describes that PTRACE_GETSIGINFO is available since Linux > 2.3.99-pre6) so your kernel (2.6.16) should support PTRACE_GETSIGINFO. > > Which glibc version do you have ? > The easy fix to try is to define PTRACE_GETSIGINFO as for s390x, > e.g. by just removing the #if defined(VGA_s390x) in the following > extract of vgdb-invoker-ptrace.c: > #if defined(VGA_s390x) > /* RHEL 5 uses glibc 2.3.4 which does not define PTRACE_GETSIGINFO */ > # ifndef PTRACE_GETSIGINFO > # define PTRACE_GETSIGINFO 0x4202 > # endif > #endif > >> ... >> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: warning: i386 architecture of input file `valgrind-m_debuglog.o' is incompatible with i386:x86-64 output >> valgrind-m_debuglog.o: In function `myvprintf_int64': >> /home/sisis/guru/valgrind-3.10.0/coregrind/m_debuglog.c:685: undefined reference to `__umoddi3' >> /home/sisis/guru/valgrind-3.10.0/coregrind/m_debuglog.c:686: undefined reference to `__udivdi3' > This is strange. Lines 685 and 686 have not changed since 2005. > But seeing the first error msg, it looks like you might have a leftover > of the '32 bits only' causing a problem. > To test with only 64 bits, it might be better to start from a clean > source tree. > > Philippe > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Tom H. <to...@co...> - 2014-09-15 23:53:01
|
On 16/09/14 00:00, Patrick J. LoPresti wrote: > PTRACE_GETSIGINFO definitely exists on SLES10 SP3 64-bit: > > suse10$ cat /etc/issue > > Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64) - Kernel \r (\l). > > suse10$ find /usr/include -type f | xargs grep PTRACE_GETSIGINFO > /usr/include/linux/ptrace.h:#define PTRACE_GETSIGINFO 0x4202 > suse10$ rpm -qf /usr/include/linux/ptrace.h > glibc-devel-2.4-31.77.76.1 > > > This is on a testing system I have lying around... No time to try > compiling Valgrind there at the moment, though. > > Does Valgrind #include <linux/ptrace.h> ? A quick scan of the headers > on SLES10 suggests <sys/ptrace.h> is not sufficient to pick up this > #define... As a general rule nothing in userspace should be including things from the linux directory - those are the kernel interfaces not the C library interfaces so would only be appropriate if you were going to invoke the system call directly. Yes, most of the time it doesn't make any difference because the C library will just pass flags through to the system call, but it's really up to the C library to know that and to arrange to pass the definitions through. So I think the original diagnosis stands, that the C library is too old to know about this flag. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: Patrick J. L. <lop...@gm...> - 2014-09-16 00:27:25
|
On Mon, Sep 15, 2014 at 4:52 PM, Tom Hughes <to...@co...> wrote: > > So I think the original diagnosis stands, that the C library is too old to > know about this flag. Fair enough. In which case Valgrind's conditional should perhaps be on __GLIBC__ / __GLIBC_MINOR__ rather than VGA_s390x? I can confirm PTRACE_GETSIGINFO and PTRACE_SETSIGINFO are present in sys/ptrace.h for all architectures (including s390) as of glibc 2.5 but not 2.4. Well, except for ia64, where they were added a little earlier (2.3). Since Valgrind does not (yet) support ia64, (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 4) -- suitably negated -- should do the trick... - Pat |
|
From: Florian K. <fl...@ei...> - 2014-09-24 19:14:15
|
On 16.09.2014 02:27, Patrick J. LoPresti wrote: > > I can confirm PTRACE_GETSIGINFO and PTRACE_SETSIGINFO are present in > sys/ptrace.h for all architectures (including s390) as of glibc 2.5 > but not 2.4. Well, except for ia64, where they were added a little > earlier (2.3). > > Since Valgrind does not (yet) support ia64, (__GLIBC__ > 2) || > (__GLIBC__ == 2 && __GLIBC_MINOR__ > 4) -- suitably negated -- should > do the trick... Thanks. I've changed this in r14565. Florian |
|
From: Matthias A. <gu...@un...> - 2014-09-16 06:43:25
|
El día Monday, September 15, 2014 a las 09:59:05PM +0200, Philippe Waroquiers escribió: > On Mon, 2014-09-15 at 16:44 +0200, Matthias Apitz wrote: > > > vgdb-invoker-ptrace.c:319: error: 'PTRACE_GETSIGINFO' undeclared (first use in this function) > A similar compilation error was encountered on s390x/RHEL5/glibc 2.3.4, > as this glibc version does not define PTRACE_GETSIGINFO. > Ptrace manual describes that PTRACE_GETSIGINFO is available since Linux > 2.3.99-pre6) so your kernel (2.6.16) should support PTRACE_GETSIGINFO. PTRACE_GETSIGINFO is only defined for the kernel in /usr/include/linux, not for userland; > Which glibc version do you have ? 2.4 > The easy fix to try is to define PTRACE_GETSIGINFO as for s390x, > e.g. by just removing the #if defined(VGA_s390x) in the following > extract of vgdb-invoker-ptrace.c: > #if defined(VGA_s390x) > /* RHEL 5 uses glibc 2.3.4 which does not define PTRACE_GETSIGINFO */ > # ifndef PTRACE_GETSIGINFO > # define PTRACE_GETSIGINFO 0x4202 > # endif > #endif Thanks, this make it compile fine. matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: E-mail: gu...@un... | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X - No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign |