Closed
Bug 1695293
Opened 3 years ago
Closed 3 years ago
Building `--enable-application=memory` fails on macOS
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(firefox88 fixed)
RESOLVED
FIXED
88 Branch
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: nalexander, Assigned: sheehan)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
On macOS with central 8708c121e21c0c6a179ac782960b2f5a92de7ba8
, I can no longer build the memory
project. My mozconfig
is:
mk_add_options AUTOCLOBBER=1
ac_add_options --enable-application=memory
mk_add_options MOZ_OBJDIR="../objdirs/objdir-memory-compile"
The build fails with:
$ env MOZCONFIG=mozconfig-memory-compile ./mach build -v
0:01.05 Clobber not needed.
0:01.08 Adding make options from /Users/nalexander/Mozilla/gecko/mozconfig-memory-compile
AUTOCLOBBER=1
MOZ_OBJDIR=/Users/nalexander/Mozilla/objdirs/objdir-memory-compile
OBJDIR=/Users/nalexander/Mozilla/objdirs/objdir-memory-compile
FOUND_MOZCONFIG=/Users/nalexander/Mozilla/gecko/mozconfig-memory-compile
export FOUND_MOZCONFIG
0:01.09 /usr/bin/make -f client.mk
0:01.14 /Applications/Xcode.app/Contents/Developer/usr/bin/make -j12 -C /Users/nalexander/Mozilla/objdirs/objdir-memory-compile
0:01.17 /Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_pre-export
0:01.18 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.process_install_manifest --track install_dist_include.track dist/include _build_manifests/install/dist_include
0:01.18 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.process_install_manifest --track install_dist_public.track dist/public _build_manifests/install/dist_public
0:01.18 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.process_install_manifest --track install_dist_private.track dist/private _build_manifests/install/dist_private
0:01.18 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.process_install_manifest --track install__tests.track _tests _build_manifests/install/_tests
0:01.18 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.process_install_manifest --track install_dist_bin.track dist/bin _build_manifests/install/dist_bin
0:01.29 Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:01.29 Elapsed: 0.00s; From dist/bin: Kept 3 existing; Added/updated 0; Removed 0 files and 0 directories.
0:01.29 Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:01.29 Elapsed: 0.01s; From dist/include: Kept 125 existing; Added/updated 0; Removed 0 files and 0 directories.
0:01.41 Elapsed: 0.13s; From _tests: Kept 609 existing; Added/updated 0; Removed 0 files and 0 directories.
0:01.44 ./buildid.h.stub
0:01.44 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.file_generate /Users/nalexander/Mozilla/gecko/build/variables.py buildid_header buildid.h .deps/buildid.h.pp .deps/buildid.h.stub
0:01.44 ./source-repo.h.stub
0:01.44 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.file_generate /Users/nalexander/Mozilla/gecko/build/variables.py source_repo_header source-repo.h .deps/source-repo.h.pp .deps/source-repo.h.stub
0:01.57 ./config/nsinstall -L /Users/nalexander/Mozilla/objdirs/objdir-memory-compile -m 644 'buildid.h' 'dist/include'
0:02.02 /Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_export
0:02.03 ./application.ini.stub
0:02.03 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.file_generate /Users/nalexander/Mozilla/gecko/python/mozbuild/mozbuild/action/preprocessor.py generate build/application.ini build/.deps/application.ini.pp build/.deps/application.ini.stub /Users/nalexander/Mozilla/gecko/build/application.ini.in -DGRE_MILESTONE=88.0a1 -DMAR_CHANNEL_ID= -DMOZ_APPUPDATE_HOST=aus5.mozilla.org -DMOZ_APP_BASENAME=Firefox -DMOZ_APP_DISPLAYNAME= -DMOZ_APP_ID= -DMOZ_APP_REMOTINGNAME=None -DMOZ_APP_VENDOR= -DMOZ_APP_VERSION=88.0a1 -DMOZ_CRASHREPORTER=1 -DMOZ_CRASHREPORTER_URL=None -DTOPOBJDIR=/Users/nalexander/Mozilla/objdirs/objdir-memory-compile
0:02.04 make[4]: Nothing to be done for `host-objects'.
0:02.05 make[4]: Nothing to be done for `host'.
0:02.05 make[4]: Nothing to be done for `export'.
0:02.06 make[4]: Nothing to be done for `export'.
0:02.06 make[4]: Nothing to be done for `export'.
0:02.17 ./application.ini.h.stub
0:02.17 /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/_virtualenvs/init_py3/bin/python -m mozbuild.action.file_generate /Users/nalexander/Mozilla/gecko/build/appini_header.py main build/application.ini.h build/.deps/application.ini.h.pp build/.deps/application.ini.h.stub build/application.ini
0:02.28 make[4]: Nothing to be done for `export'.
0:02.30 /Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_compile
0:02.31 make[4]: Nothing to be done for `host-objects'.
0:02.31 memory/replace/logalloc/LogAlloc.o
0:02.31 /Users/nalexander/.mozbuild/clang/bin/clang++ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -std=gnu++17 -o LogAlloc.o -c -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DMOZ_NO_MOZALLOC -I/Users/nalexander/Mozilla/gecko/memory/replace/logalloc -I/Users/nalexander/Mozilla/objdirs/objdir-memory-compile/memory/replace/logalloc -I/Users/nalexander/Mozilla/gecko/memory/build -I/Users/nalexander/Mozilla/objdirs/objdir-memory-compile/dist/include -fPIC -DMOZILLA_CLIENT -include /Users/nalexander/Mozilla/objdirs/objdir-memory-compile/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -stdlib=libc++ -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -O3 -fomit-frame-pointer -funwind-tables -MD -MP -MF .deps/LogAlloc.o.pp /Users/nalexander/Mozilla/gecko/memory/replace/logalloc/LogAlloc.cpp
0:02.32 make[4]: Nothing to be done for `target-objects'.
0:02.32 make[4]: Nothing to be done for `target-objects'.
0:02.32 make[4]: Nothing to be done for `host'.
0:02.32 make[4]: Nothing to be done for `target-objects'.
0:02.32 make[4]: Nothing to be done for `target-objects'.
0:02.33 memory/mozjemalloc_info/mozjemalloc-info
0:02.33 /Users/nalexander/.mozbuild/clang/bin/clang++ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -std=gnu++17 -o ../../dist/bin/mozjemalloc-info -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -stdlib=libc++ -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -O3 -fomit-frame-pointer -funwind-tables -Wl,-filelist,/Users/nalexander/Mozilla/objdirs/objdir-memory-compile/memory/mozjemalloc_info/mozjemalloc-info.list -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -lobjc -framework ExceptionHandling -fstack-protector-strong -Wl,-executable_path,/Users/nalexander/Mozilla/objdirs/objdir-memory-compile/dist/bin -Wl,-dead_strip -pie
0:02.33 make[4]: Nothing to be done for `target'.
0:02.39 Undefined symbols for architecture x86_64:
0:02.39 "_replace_init", referenced from:
0:02.39 __ZL4initv in Unified_cpp_memory_build0.o
0:02.39 ld: symbol(s) not found for architecture x86_64
0:02.39 clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
0:02.39 make[4]: *** [../../dist/bin/mozjemalloc-info] Error 1
0:02.39 make[3]: *** [memory/mozjemalloc_info/target] Error 2
0:02.39 make[3]: *** Waiting for unfinished jobs....
0:02.40 In file included from /Users/nalexander/Mozilla/gecko/memory/replace/logalloc/LogAlloc.cpp:22:
0:02.40 /Users/nalexander/Mozilla/gecko/memory/build/Mutex.h:27:3: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
0:02.40 OSSpinLock mMutex;
0:02.40 ^
0:02.40 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
0:02.40 typedef int32_t OSSpinLock OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock);
0:02.40 ^
0:02.40 In file included from /Users/nalexander/Mozilla/gecko/memory/replace/logalloc/LogAlloc.cpp:22:
0:02.40 /Users/nalexander/Mozilla/gecko/memory/build/Mutex.h:63:5: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
0:02.40 OSSpinLockLock(&mMutex);
0:02.40 ^
0:02.40 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
0:02.40 void OSSpinLockLock( volatile OSSpinLock *__lock );
0:02.40 ^
0:02.40 In file included from /Users/nalexander/Mozilla/gecko/memory/replace/logalloc/LogAlloc.cpp:22:
0:02.40 /Users/nalexander/Mozilla/gecko/memory/build/Mutex.h:73:5: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
0:02.40 OSSpinLockUnlock(&mMutex);
0:02.40 ^
0:02.40 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
0:02.41 void OSSpinLockUnlock( volatile OSSpinLock *__lock );
0:02.41 ^
0:02.46 3 warnings generated.
0:02.46 make[2]: *** [compile] Error 2
0:02.46 make[1]: *** [default] Error 2
0:02.46 make: *** [build] Error 2
0:02.48 3 compiler warnings present.
I find that:
$ nm ../objdirs/objdir-memory-compile/memory/replace/logalloc/LogAlloc.o
U _OSSpinLockLock
U _OSSpinLockUnlock
U __Z8FdPrintflPKcz
0000000000008230 b __ZGVZ12replace_initE6bridge
0000000000000330 t __ZL12replace_freePv
0000000000000230 t __ZL14replace_callocmm
00000000000001c0 t __ZL14replace_mallocm
0000000000000590 t __ZL14replace_vallocm
00000000000002b0 t __ZL15replace_reallocPvm
0000000000008208 b __ZL15sStdoutOrStderr
00000000000003a0 t __ZL16replace_memalignmm
0000000000000510 t __ZL21replace_aligned_allocmm
0000000000000420 t __ZL22replace_jemalloc_statsP16jemalloc_stats_tP20jemalloc_bin_stats_t
0000000000000480 t __ZL22replace_posix_memalignPPvmm
0000000000008210 b __ZL3sFd
0000000000008238 b __ZL6sFuncs
0000000000008218 b __ZL6sMutex
0000000000000600 t __ZL7preforkv
0000000000000610 t __ZL8postforkv
0000000000000630 T __ZN14LogAllocBridge11InitDebugFdERN7mozilla15DebugFdRegistryE
0000000000000620 T __ZN19ReplaceMallocBridge11GetDMDFuncsEv
0000000000000650 T __ZN19ReplaceMallocBridge12RegisterHookEPKcPK14malloc_table_tPK19malloc_hook_table_t
0000000000000660 T __ZN19ReplaceMallocBridge15IsPHCAllocationEPKvPN7mozilla3phc8AddrInfoE
0000000000000670 T __ZN19ReplaceMallocBridge25DisablePHCOnCurrentThreadEv
0000000000000680 T __ZN19ReplaceMallocBridge26ReenablePHCOnCurrentThreadEv
0000000000000690 T __ZN19ReplaceMallocBridge27IsPHCEnabledOnCurrentThreadEv
00000000000007b0 S __ZTV14LogAllocBridge
0000000000008220 b __ZZ12replace_initE6bridge
U ___cxa_guard_acquire
U ___cxa_guard_release
U _getenv
U _getpid
U _memcpy
U _open
U _pthread_atfork
U _pthread_self
0000000000000000 T _replace_init
But I don't know how to go any further.
Reporter | ||
Comment 1•3 years ago
|
||
:glandium: have you thoughts on this? There's clearly some special handling for the _replace_init
symbol, perhaps something has changed with newer clang versions?
Flags: needinfo?(mh+mozilla)
Comment 2•3 years ago
|
||
We need https://searchfox.org/mozilla-central/rev/002023eb262be9db3479142355e1675645d52d52/memory/replace/logalloc/replay/moz.build#69
in https://searchfox.org/mozilla-central/source/memory/mozjemalloc_info/moz.build
Flags: needinfo?(mh+mozilla)
Regressed by: 1670188
Updated•3 years ago
|
Has Regression Range: --- → yes
Assignee | ||
Updated•3 years ago
|
Priority: -- → P3
Assignee | ||
Comment 3•3 years ago
|
||
The memory project needs this file to avoid hitting linker errors.
Updated•3 years ago
|
Assignee: nobody → sheehan
Status: NEW → ASSIGNED
Pushed by cosheehan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0a1cf19780ec include `replace_malloc.mozbuild` in mozbuild file for `mozjemalloc_info` r=firefox-build-system-reviewers,mhentges,nalexander
Comment 5•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox88:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Updated•3 years ago
|
Keywords: regression
You need to log in
before you can comment on or make changes to this bug.
Description
•