2.2.1 new build error

Andrew Hughes ahughes at redhat.com
Wed Jun 13 12:29:30 PDT 2012


----- Original Message -----
> I'm getting this new build error in ArchLinux with gcc4.7:
> 
> In file included from /usr/include/string.h:642:0,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:35,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp:33,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/utilities/debug.hpp:29,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/runtime/globals.hpp:28,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/memory/allocation.hpp:28,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/memory/iterator.hpp:28,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/oops/klass.hpp:28,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/runtime/handles.hpp:28,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/code/oopRecorder.hpp:28,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/asm/assembler.hpp:28,
>                  from
>                  /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
> In function 'void* memset(void*, int, size_t)',
>     inlined from 'void
>     G1BlockOffsetSharedArray::_ZN24G1BlockOffsetSharedArray16set_offset_arrayEmmh.isra.72(unsigned
>     char*, size_t, size_t, unsigned char)' at
>     /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp:169:52,
>     inlined from 'void
>     G1BlockOffsetArray::set_remainder_to_point_to_start_incl(size_t,
>     size_t)' at
>     /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp:195:67,
>     inlined from 'void
>     G1BlockOffsetArray::_ZN18G1BlockOffsetArray31set_remainder_to_point_to_startEP8HeapWordS1_.part.81(HeapWord*,
>     HeapWord*)' at
>     /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp:168:61,
>     inlined from 'void
>     G1BlockOffsetArray::set_remainder_to_point_to_start(HeapWord*,
>     HeapWord*)' at
>     /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp:369:1,
>     inlined from 'void
>     G1BlockOffsetArray::alloc_block_work2(HeapWord**, size_t*,
>     HeapWord*, HeapWord*)' at
>     /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp:510:53,
>     inlined from 'HeapWord*
>     G1BlockOffsetArray::forward_to_block_containing_addr_slow(HeapWord*,
>     HeapWord*, const void*)' at
>     /build/src/icedtea-2.2.1/openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp:394:59:
> /usr/include/bits/string3.h:82:32: error: call to
> '__warn_memset_zero_len' declared with attribute warning: memset
> used with constant zero length parameter; this could be due to
> transposed parameters [-Werror]
> /usr/include/bits/string3.h:82:32: error: call to
> '__warn_memset_zero_len' declared with attribute warning: memset
> used with constant zero length parameter; this could be due to
> transposed parameters [-Werror]
> /usr/include/bits/string3.h:82:32: error: call to
> '__warn_memset_zero_len' declared with attribute warning: memset
> used with constant zero length parameter; this could be due to
> transposed parameters [-Werror]
> /usr/include/bits/string3.h:82:32: error: call to
> '__warn_memset_zero_len' declared with attribute warning: memset
> used with constant zero length parameter; this could be due to
> transposed parameters [-Werror]
> /usr/include/bits/string3.h:82:32: error: call to
> '__warn_memset_zero_len' declared with attribute warning: memset
> used with constant zero length parameter; this could be due to
> transposed parameters [-Werror]
> /usr/include/bits/string3.h:82:32: error: call to
> '__warn_memset_zero_len' declared with attribute warning: memset
> used with constant zero length parameter; this could be due to
> transposed parameters [-Werror]
> cc1plus: all warnings being treated as errors
> make[7]: *** [g1BlockOffsetTable.o] Error 1
> 
> 
> Any idea for a quick fix?
> 
> -Andy
> 

I built all the releases with 4.7 and I didn't see anything like this.
What's the command that produces this?

A quick fix would be to remove -Werror.  The culprit is:

../hotspot/make/linux/makefiles/gcc.make:WARNINGS_ARE_ERRORS = -Werror

but I'd like to know what's causing this, as I don't see it and have -Werror
enabled.

Maybe it's worth considering turning -Werror off by default and just encouraging
developers to turn it on?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




More information about the distro-pkg-dev mailing list