Closed Bug 1747970 Opened 2 years ago Closed 2 years ago

Move AC_CHECK_FUNC{,S} to python configure

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

No description provided.

HAVE_LCHOWN is only used in nsinstall.c, for a feature we don't use.
Moreover it would need to be tested with the host compiler/headers, but
function checks are tested with the target compiler/headers so it's not
necessarily accurate. Therefore, we just remove the check.

AC_CHECK_FUNC doesn't automatically set HAVE_$function defines
(AC_CHECK_FUNCS does, confusing much?). Which means practically
speaking, the check is not useful. There are #ifdef HAVE_FDATASYNC
in sqlite, but fdatasync is notably broken on older kernels, and while
lmdb has runtime workarounds for that, sqlite doesn't. It might be fine
to enable the sqlite code because those kernels are old, but this is
not a straightforward decision to make at the build system level, so
we'll handle that in a followup.

That's what AC_CHECK_FUNC does, and is necessary to check functions in
the C++ runtime (e.g. __cxa_demangle).

  • AC_HAVE_FUNCS is an alias to AC_CHECK_FUNCS, so it is covered.
  • Nothing uses HAVE___CXA_DEMANGLE, so we don't explictly set it,
    although we do need the result of whether __cxa_demangle is supported.
  • No moz.build uses MOZ_DEMANGLE_SYMBOLS, so we only set_define it.
  • We leave dladdr in old-configure because it needs to move along other
    dl* things.
  • The hotfix for AC_CHECK_FUNC is however not needed for dladdr, so we
    remove it.
  • We replace the forced HAVE_LOCALECONV on Windows with a check shared
    with all platforms.
Keywords: leave-open
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/290977afc973
Remove check for lchown. r=firefox-build-system-reviewers,mhentges
https://hg.mozilla.org/integration/autoland/rev/a0d55807c6b1
Remove check for fdatasync. r=firefox-build-system-reviewers,mhentges
https://hg.mozilla.org/integration/autoland/rev/356b8ae1f11f
Add `extern "C"` to symbols checks using the C++ compiler. r=firefox-build-system-reviewers,mhentges
Attachment #9257142 - Attachment is obsolete: true
Keywords: leave-open
Depends on: 1750671
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/ffdd096022f9
Move AC_CHECK_FUNC{,S} to python configure. r=firefox-build-system-reviewers,andi

Backed out for causing android build bustages.

Affected platforms Android 5.0 x86-64 opt, Android 5.0 AArch64 opt, Android 5.0 x86-64 debug, Android 5.0 x86-64 debug-isolated-process

Push with failures

Failure log

Backout link

[task 2022-01-19T00:06:05.520Z] 00:06:05     INFO -  In file included from Unified_c_external_nspr_pr2.c:74:
[task 2022-01-19T00:06:05.520Z] 00:06:05    ERROR -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:468:18: error: implicit declaration of function 'pthread_attr_setinheritsched' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
[task 2022-01-19T00:06:05.520Z] 00:06:05     INFO -              rv = pthread_attr_setinheritsched(&tattr, PTHREAD_INHERIT_SCHED);
[task 2022-01-19T00:06:05.520Z] 00:06:05     INFO -                   ^
[task 2022-01-19T00:06:05.520Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:481:37: warning: comparison of integers of different signs: 'PRInt32' (aka 'int') and 'PRUintn' (aka 'unsigned int') [-Wsign-compare]
[task 2022-01-19T00:06:05.520Z] 00:06:05     INFO -              else if (--pt_book.user == pt_book.this_many) {
[task 2022-01-19T00:06:05.520Z] 00:06:05     INFO -                       ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~
[task 2022-01-19T00:06:05.521Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:621:9: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
[task 2022-01-19T00:06:05.521Z] 00:06:05     INFO -      int rv;
[task 2022-01-19T00:06:05.521Z] 00:06:05     INFO -          ^
[task 2022-01-19T00:06:05.521Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:770:16: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
[task 2022-01-19T00:06:05.521Z] 00:06:05     INFO -          PRIntn rv;
[task 2022-01-19T00:06:05.521Z] 00:06:05     INFO -                 ^
[task 2022-01-19T00:06:05.521Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:846:9: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
[task 2022-01-19T00:06:05.522Z] 00:06:05     INFO -      int rv;
[task 2022-01-19T00:06:05.522Z] 00:06:05     INFO -          ^
[task 2022-01-19T00:06:05.522Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:1089:9: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
[task 2022-01-19T00:06:05.523Z] 00:06:05     INFO -      int rv;
[task 2022-01-19T00:06:05.523Z] 00:06:05     INFO -          ^
[task 2022-01-19T00:06:05.523Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:1124:9: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
[task 2022-01-19T00:06:05.524Z] 00:06:05     INFO -      int rv;
[task 2022-01-19T00:06:05.524Z] 00:06:05     INFO -          ^
[task 2022-01-19T00:06:05.524Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:1130:29: warning: comparison of integers of different signs: 'PRInt32' (aka 'int') and 'PRUintn' (aka 'unsigned int') [-Wsign-compare]
[task 2022-01-19T00:06:05.525Z] 00:06:05     INFO -          while (pt_book.user > pt_book.this_many) {
[task 2022-01-19T00:06:05.525Z] 00:06:05     INFO -                 ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
[task 2022-01-19T00:06:05.525Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:1242:12: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
[task 2022-01-19T00:06:05.526Z] 00:06:05     INFO -      PRIntn rv;
[task 2022-01-19T00:06:05.526Z] 00:06:05     INFO -             ^
[task 2022-01-19T00:06:05.527Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:1446:12: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
[task 2022-01-19T00:06:05.527Z] 00:06:05     INFO -      PRIntn rv;
[task 2022-01-19T00:06:05.527Z] 00:06:05     INFO -             ^
[task 2022-01-19T00:06:05.528Z] 00:06:05  WARNING -  /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:1557:9: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
[task 2022-01-19T00:06:05.528Z] 00:06:05     INFO -      int rv;
[task 2022-01-19T00:06:05.528Z] 00:06:05     INFO -          ^
[task 2022-01-19T00:06:05.528Z] 00:06:05     INFO -  60 warnings and 2 errors generated.
[task 2022-01-19T00:06:05.529Z] 00:06:05    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:580: Unified_c_external_nspr_pr2.o] Error 1
[task 2022-01-19T00:06:05.529Z] 00:06:05     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/config/external/nspr/pr'
[task 2022-01-19T00:06:05.529Z] 00:06:05    ERROR -  gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: config/external/nspr/pr/target-objects] Error 2
[task 2022-01-19T00:06:05.529Z] 00:06:05     INFO -  gmake[3]: *** Waiting for unfinished jobs....
[task 2022-01-19T00:06:05.530Z] 00:06:05     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/security/nss/lib/smime/smime_smime'
Flags: needinfo?(mh+mozilla)
Depends on: 1750893
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/b80592c70a60
Move AC_CHECK_FUNC{,S} to python configure. r=firefox-build-system-reviewers,andi
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.