Last Comment Bug 754171 - Failed to build at config/elf-dynstr-gc.c and nsTraceMalloc.c
: Failed to build at config/elf-dynstr-gc.c and nsTraceMalloc.c
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: 736501
  Show dependency treegraph
 
Reported: 2012-05-10 21:57 PDT by Masayuki Nakano [:masayuki] (Mozilla Japan)
Modified: 2012-05-11 12:38 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-05-10 21:57:07 PDT
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
Comment 1 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-05-10 22:42:56 PDT
My gcc version is 4.6.1-9ubuntu3.
Comment 2 :Aryeh Gregor (away until August 15) 2012-05-11 00:13:57 PDT
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 . . .
Comment 3 :Aryeh Gregor (away until August 15) 2012-05-11 00:28:45 PDT
Backing out the commit (hg backout 6a7bfd84596e) results in a successful compile.
Comment 4 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2012-05-11 08:16:33 PDT
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.
Comment 5 [:fabrice] Fabrice Desré 2012-05-11 12:38:06 PDT
fixed in bug 754198

Note You need to log in before you can comment on or make changes to this bug.