The default bug view has changed. See this FAQ.

Failed to build at config/elf-dynstr-gc.c and nsTraceMalloc.c

RESOLVED FIXED

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: masayuki, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
When I build a debug build on Ubuntu 11.10 (x86), I got following error:

> config/elf-dynstr-gc.c:1237:12: エラー: warn_unused_result 属性付きで宣言されている ‘ftruncate’ の戻り値を無視しています [-Werror=unused-result]

It said, result value of "ftruncate" is ignored but it's defined with "warn_unused_result".

If I add "--enable-trace-malloc" to my .mozconfig, the file is never compiled, but I can see same error at nsTraceMalloc.c.

> /tools/trace-malloc/lib/nsTraceMalloc.c:1352:5: エラー: warn_unused_result 属性付きで宣言されている ‘write’ の戻り値を無視しています [-Werror=unused-result]
> /tools/trace-malloc/lib/nsTraceMalloc.c:1353:5: エラー: warn_unused_result 属性付きで宣言されている ‘write’ の戻り値を無視しています [-Werror=unused-result]

I guess that bug 736501 could cause this bug because the file hasn't been changed and I couldn't see this build error last month.

my .mozconfig file is:

ac_add_options --enable-debug
ac_add_options --enable-tests
ac_add_options --enable-logging
ac_add_options --disable-installer
ac_add_options --disable-crashreporter
(Reporter)

Comment 1

5 years ago
My gcc version is 4.6.1-9ubuntu3.
Me too.  I tried fixing that specific call, but then I got more errors:

/mnt/extra/checkouts/mozilla-central/memory/jemalloc/jemalloc.c:1530:7: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
/mnt/extra/checkouts/mozilla-central/memory/jemalloc/jemalloc.c:1531:7: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
/mnt/extra/checkouts/mozilla-central/memory/jemalloc/jemalloc.c:1532:7: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
/mnt/extra/checkouts/mozilla-central/memory/jemalloc/jemalloc.c:1533:7: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]

I think this needs to be backed out, or made conditional somehow.  Given that this is like the second time in a week that a checkin broke the build on Ubuntu, it would be really nice if we could invest in some Ubuntu tinderboxen for at least compile-testing, even if we don't run all tests on them . . .
Backing out the commit (hg backout 6a7bfd84596e) results in a successful compile.
The patch in bug 754198 covers this bustage as well, although it tried to wallpaper over an actual error, so I'm opposed to backing the error out.
fixed in bug 754198
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.