Closed Bug 1782988 Opened 2 years ago Closed 2 years ago

Build process stops in Unified_c_src_third_party0.c

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect

Tracking

(firefox-esr102 fixed, firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox-esr102 --- fixed
firefox105 --- fixed

People

(Reporter: fredbezies, Assigned: glandium)

References

Details

Attachments

(2 files)

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: nobody → mh+mozilla
Status: NEW → ASSIGNED

Can you check whether the attached patch works?

Flags: needinfo?(fredbezies)

(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   ^~~~~~~~~~~~~~
Flags: needinfo?(fredbezies)

(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?

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.

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
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch

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
Attachment #9288440 - Flags: approval-mozilla-esr102?
Attachment #9288935 - Flags: approval-mozilla-esr102?

Comment on attachment 9288440 [details]
Bug 1782988 - Avoid build bustage when building against glibc 2.36 or newer.

Approved for 102.6esr.

Attachment #9288440 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+
Attachment #9288935 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: