Build process stops in Unified_c_src_third_party0.c
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr102 fixed, firefox105 fixed)
People
(Reporter: fredbezies, Assigned: glandium)
References
Details
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr102+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr102+
|
Details | Review |
Hello.
When I tried to build Firefox from trunk code, build process stops in Unified_c_src_third_party0.c
Here is the log I have:
24:00.02 In file included from Unified_c_src_third_party0.c:128:
24:00.02 In file included from /home/fred/logs/fox/src/ipc/chromium/src/third_party/libevent/evutil_rand.c:134:
24:00.02 /home/fred/logs/fox/src/ipc/chromium/src/third_party/libevent/./arc4random.c:488:1: error: static declaration of 'arc4random_buf' follows non-static declaration
24:00.02 arc4random_buf(void *buf_, size_t n)
24:00.02 ^
24:00.02 /usr/include/stdlib.h:542:13: note: previous declaration is here
24:00.02 extern void arc4random_buf (void *__buf, size_t __size)
24:00.02 ^
24:00.02 1 error generated.
24:00.02 make[4]: *** [/home/fred/logs/fox/src/config/rules.mk:590: Unified_c_src_third_party0.o] Error 1
I'm using Archlinux with Gnome.
Clang version:
clang --version
clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
And here is my mozconfig:
#mk_add_options PYTHON=/usr/bin/python2
mk_add_options AUTOCONF=autoconf-2.13
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options ENABLE_CLANG_PLUGIN=1
mk_add_options MOZ_STDCXX_COMPAT=1
mk_add_options MOZ_OBJDIR=/home/fred/logs/fox/objdir-fx
export CC=clang
export CXX=clang++
export AR=llvm-ar
export NM=llvm-nm
export RANLIB=llvm-ranlib
export MACH_USE_SYSTEM_PYTHON=1
#mk_add_options MOZ_MAKE_FLAGS="-j1"
ac_add_options --enable-application=browser
ac_add_options --enable-optimize
ac_add_options --with-ccache=sccache
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-warnings-as-errors
ac_add_options --disable-debug-symbols
ac_add_options --enable-rust-simd
ac_add_options --with-branding=browser/branding/nightly
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
ac_add_options --disable-updater
ac_add_options --disable-bootstrap
ac_add_options --without-wasm-sandboxed-libraries
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Can you check whether the attached patch works?
Reporter | ||
Comment 3•2 years ago
•
|
||
(In reply to Mike Hommey [:glandium] from comment #2)
Can you check whether the attached patch works?
Patch applied and build launched. Will report asap.
There is progress. I got the same type of error, but later, related to toolkit/crashreporter/client/ping.cpp:56:3:
62:13.65 In file included from Unified_cpp_client0.cpp:47:
62:13.65 /home/fred/logs/fox/src/toolkit/crashreporter/client/ping.cpp:56:3: error: no matching function for call to 'arc4random_buf'
62:13.65 arc4random_buf(id, sizeof(UUID));
62:13.65 ^~~~~~~~~~~~~~
Comment 4•2 years ago
|
||
(In reply to Frederic Bezies from comment #3)
There is progress. I got the same type of error, but later, related to toolkit/crashreporter/client/ping.cpp:56:3:
Doing what the compiler suggests and replacing id
with &id
works. I don't think the prototype on Android or BSD would be significantly different, so I wonder if this code has never been used before?
Assignee | ||
Comment 5•2 years ago
|
||
The code was probably never built before glibc 2.36, because before
that, only Android and some BSDs have them, but none of those actually
build this code.
Reporter | ||
Comment 6•2 years ago
|
||
Some feedback: applying both patches fixes all the building issue I saw before.
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/970ebbe54477 Avoid build bustage when building against glibc 2.36 or newer. r=RyanVM https://hg.mozilla.org/integration/autoland/rev/a61813bd9f0a Fix use of arc4random_buf use in ping.cpp. r=gsvelto
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/970ebbe54477
https://hg.mozilla.org/mozilla-central/rev/a61813bd9f0a
Assignee | ||
Comment 9•2 years ago
|
||
Comment on attachment 9288440 [details]
Bug 1782988 - Avoid build bustage when building against glibc 2.36 or newer.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Build failure on downstreams that have glibc >= 2.37
- User impact if declined: See above
- Fix Landed on Version: 105
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): No change when building with glibc < 2.37
Assignee | ||
Updated•2 years ago
|
Comment 10•1 year ago
|
||
Comment on attachment 9288440 [details]
Bug 1782988 - Avoid build bustage when building against glibc 2.36 or newer.
Approved for 102.6esr.
Updated•1 year ago
|
Comment 11•1 year ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-esr102/rev/c72aa6841930
https://hg.mozilla.org/releases/mozilla-esr102/rev/d138cc8a7eef
Description
•