Closed Bug 1352236 Opened 5 years ago Closed 5 years ago
Build error on other architectures: value not declared in scope
Building Firefox 52.0.0 ESR on ppc64le and s390x architectures causes compiler error compiling js/src/jsmath.cpp: [ 3174s] /home/abuild/rpmbuild/BUILD/mozilla/js/src/jsmath.cpp: In function 'uint64_t js::GenerateRandomSeed()': [ 3174s] /home/abuild/rpmbuild/BUILD/mozilla/js/src/jsmath.cpp:82:25: error: 'GETRANDOM_NR' was not declared in this scope [ 3174s] # define SYS_getrandom GETRANDOM_NR [ 3174s] ^ [ 3174s] /home/abuild/rpmbuild/BUILD/mozilla/js/src/jsmath.cpp:728:23: note: in expansion of macro 'SYS_getrandom' [ 3174s] int ret = syscall(SYS_getrandom, &seed, sizeof(seed), GRND_NONBLOCK); [ 3174s] ^ [ 3175s] /home/abuild/rpmbuild/BUILD/mozilla/config/rules.mk:951: recipe for target 'jsmath.o' failed [ 3175s] make: *** [jsmath.o] Error 1 When looking at the code it shows 'GETRANDOM_NR' is only declared for x86_64, i386, and arm procs. We have a case where we build against the older GLIBC (v2.19) which does not define 'SYS_getrandom' so this code fails to build. See bug 995069. I have attached a suggested patch (which works for us).
Severity: blocker → normal
Product: Firefox → Core
This probably needs help to land - Luke, does this need a trypush? If yes, can you do one, if no, can you set checkin-needed? Thanks!
This shouldn't affect any tier-1 builds, so I think it's ready to check in.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/18e8f6994472 Work around missing GETRANDOM_NR when building against older versions of glibc. r=luke
You need to log in before you can comment on or make changes to this bug.