|
From: Maynard J. <may...@us...> - 2011-09-16 20:13:22
|
On 09/16/2011 10:10 AM, Rich Coe wrote:
> The nightly build runs on opensuse-11.4 and doesn't see the error.
> opensuse is similar to but not the same as SLES.
>
> Can you run the following and track down the header reference?
> cd memcheck/tests/x86-linux
> gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../.. -I../../../include \
> -I../../../coregrind -I../../../include -I../../../VEX/pub -DVGA_amd64=1 \
> -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -Winline -Wall \
> -Wshadow -g -m32 -mmmx -msse -Wno-long-long -Wno-pointer-sign \
> -fno-stack-protector -MT scalar.o -MD -MP -MF ".deps/scalar.Tpo" \
> -E -o scalar.e scalar.c
>
> Then look at scalar.e and see what header is defining struct timespec and
> struct timeval in ahead of time.h ???
Rich,
Firstly, I want to add that apparently this is *not* a new problem. I pulled
down 3.6.1 today and am seeing the same problem there. I hacked the
memcheck/tests/Makefile.am so the 'make check' won't even try to build
x86-linux, so I got the build to complete and ran 'make regtest'. My main
reason for running on this platform was just for comparison purposes to the
ppc64 platform I'm working on. So this problem is not critical for me.
Nevertheless, I ran the above command you suggested, but it did not complete
successfully -- no scalar.e was produced. Here's the output:
---------------------------------------
mpj@elm3b21:~/valg_svn_09.15.2011/memcheck/tests/x86-linux> gcc -DHAVE_CONFIG_H
-I. -I. -I../../.. -I../../.. -I../../../include -I../../../coregrind
-I../../../include -I../../../VEX/pub -DVGA_amd64=1 -DVGO_linux=1
-DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -Winline -Wall -Wshadow -g
-m32 -mmmx -msse -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT
scalar.o -MD -MP -MF ".deps/scalar.Tpo" -E -o scalar.e scalar.c
In file included from /usr/include/linux/sched.h:12,
from /usr/include/linux/mm.h:4,
from /usr/include/linux/mman.h:5,
from scalar.h:12,
from scalar.c:4:
/usr/include/linux/jiffies.h:250:47: error: division by zero in #if
/usr/include/linux/jiffies.h:261:47: error: division by zero in #if
/usr/include/linux/jiffies.h:274:47: error: division by zero in #if
/usr/include/linux/jiffies.h:287:47: error: division by zero in #if
/usr/include/linux/jiffies.h:379:41: error: division by zero in #if
/usr/include/linux/jiffies.h:379:42: error: division by zero in #if
/usr/include/linux/jiffies.h:390:18: error: division by zero in #if
/usr/include/linux/jiffies.h:410:41: error: division by zero in #if
/usr/include/linux/jiffies.h:410:42: error: division by zero in #if
/usr/include/linux/jiffies.h:426:28: error: division by zero in #if
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:28,
from /usr/include/linux/mm.h:4,
from /usr/include/linux/mman.h:5,
from scalar.h:12,
from scalar.c:4:
/usr/include/linux/list.h:814:2: warning: #warning "don't include kernel headers
in userspace"
---------------------------------------
The source code for the first "division by zero" error at line 250 of jiffies.h is:
#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
It seems all of these errors are either for MSEC_PER_SEC or USEC_PER_SEC not
defined. The only place I see them defined is in /usr/include/linux/time.h
within an #ifdef __kernel__ block.
Regards,
-Maynard
>
> The start of each header will be in the output on line starting with '#'.
>
> Rich
>
> On Thu, 15 Sep 2011 17:53:40 -0500
> Maynard Johnson<may...@us...> wrote:
>> Hi,
>> I don't often build and run valgrind on x86 platforms, but today I checked out
>> the latest valgrind code on an Intel Xeon processor running SLES 10 SP2. The
>> valgrind code itself builds fine, but 'make check' fails in
>> memcheck/tests/x86-linux with the following error:
>>
>> make[1]: Entering directory `/home/mpj/vg-09.12.2011/memcheck/tests/x86-linux'
>> make[1]: `bug133694' is up to date.
>> make[1]: `int3-x86' is up to date.
>> if gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../.. -I../../../include
>> -I../../../coregrind -I../../../include -I../../../VEX/pub -DVGA_amd64=1
>> -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -Winline -Wall
>> -Wshadow -g -m32 -mmmx -msse -Wno-long-long -Wno-pointer-sign
>> -fno-stack-protector -MT scalar.o -MD -MP -MF ".deps/scalar.Tpo" -c -o scalar.o
>> scalar.c; \
>> then mv -f ".deps/scalar.Tpo" ".deps/scalar.Po"; else rm -f ".deps/scalar.Tpo";
>> exit 1; fi
>> In file included from /usr/include/linux/timex.h:58,
>> from /usr/include/linux/sched.h:11,
>> from /usr/include/linux/mm.h:4,
>> from /usr/include/linux/mman.h:5,
>> from scalar.h:12,
>> from scalar.c:4:
>> /usr/include/linux/time.h:12: error: redefinition of ?struct timespec?
>> /usr/include/linux/time.h:18: error: redefinition of ?struct timeval?
>> In file included from /usr/include/asm/timex.h:6,
>> from /usr/include/linux/timex.h:61,
>> blah, blah, blah -- ad nauseum
>>
>>
>> Is this a known problem? I don't have any build problems on other platforms
>> (ppc64, amd64). I don't have another x86 system available with a newer distro
>> to see if I would have the same problem. Anyone else out there seeing this?
>>
>> -Maynard
>>
>>
>> ------------------------------------------------------------------------------
>> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
>> http://p.sf.net/sfu/rim-devcon-copy2
>> _______________________________________________
>> Valgrind-developers mailing list
>> Val...@li...
>> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
>
>
|