Dav1d: compilation error when disabling jemalloc
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | fixed |
People
(Reporter: jya, Assigned: achronop)
Details
Attachments
(1 file)
this is my mozconfig:
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-ff-dbg
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
#ac_add_options --enable-debug
ac_add_options --enable-debug-symbols
ac_add_options --enable-eme=widevine
ac_add_options --enable-rust-debug
#disable jemalloc for debugging memory overwrite
ac_add_options --disable-jemalloc
ac_add_options --disable-launcher-process
#remove if too slow
ac_add_options --disable-optimize
mk_add_options 'export CARGO_INCREMENTAL=1'
export CC="/c/Users/jyavenard/.mozbuild/clang/bin/clang-cl.exe"
export CXX="/c/Users/jyavenard/.mozbuild/clang/bin/clang-cl.exe"
export LINKER=lld-link
When disabling jemalloc (required for asan build), dav1d compilation with fail with:
10:54.05 toolkit/library/xul.dll
10:56.88 lld-link.exe: error: undefined symbol: posix_memalign
10:56.88 >>> referenced by c:\Users\jyavenard\Work\Mozilla\mozilla-central\third_party\dav1d\include\common\mem.h:46
10:56.88 >>> ....\media\libdav1d\decode.obj:(dav1d_alloc_aligned)
10:56.88 lld-link.exe: error: undefined symbol: posix_memalign
10:56.88 >>> referenced by c:\Users\jyavenard\Work\Mozilla\mozilla-central\third_party\dav1d\include\common\mem.h:46
10:56.88 >>> ....\media\libdav1d\lib.obj:(dav1d_alloc_aligned)
10:56.88 lld-link.exe: error: undefined symbol: posix_memalign
10:56.88 >>> referenced by c:\Users\jyavenard\Work\Mozilla\mozilla-central\third_party\dav1d\include\common\mem.h:46
10:56.88 >>> ....\media\libdav1d\picture.obj:(dav1d_alloc_aligned)
10:56.89 lld-link.exe: error: undefined symbol: posix_memalign
10:56.89 >>> referenced by c:\Users\jyavenard\Work\Mozilla\mozilla-central\third_party\dav1d\include\common\mem.h:46
10:56.89 >>> ....\media\libdav1d\ref.obj:(dav1d_alloc_aligned)
10:57.15 mozmake.EXE[4]: *** [c:/Users/jyavenard/Work/Mozilla/mozilla-central/config/rules.mk:690: xul.dll] Error 1
10:57.15 mozmake.EXE[3]: *** [c:/Users/jyavenard/Work/Mozilla/mozilla-central/config/recurse.mk:74: toolkit/library/target] Error 2
10:57.16 mozmake.EXE[2]: *** [c:/Users/jyavenard/Work/Mozilla/mozilla-central/config/recurse.mk:34: compile] Error 2
10:57.17 mozmake.EXE[1]: *** [c:/Users/jyavenard/Work/Mozilla/mozilla-central/config/rules.mk:415: default] Error 2
10:57.18 mozmake.EXE: *** [client.mk:125: build] Error 2
10:57.22 291 compiler warnings present.
| Assignee | ||
Comment 1•7 years ago
|
||
Could you please try with the following patch on [1]. Building on Windows locally lasts ~75 mins and I am using it today ...
[1] https://hg.mozilla.org/try/raw-rev/39761ebe0bccaf2c5f0c8c3ada48d9511c39222f
Updated•7 years ago
|
| Assignee | ||
Comment 2•7 years ago
|
||
The problem here is that HAVE_ALIGNED_MALLOC should have been defined instead of HAVE_POSIX_MEMALIGN. I have verified that on a local build using the patch in comment 1.
Discussing this issue on IRC with jya, I found out that those macros are set globally and it is better to avoid redefining in a library configuration file. However, HAVE_ALIGNED_MALLOC is not set at all in global macros. I have created a patch to add it there. Patch gives me a green try [1] and solves this issue.
[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=a19e2ff6a986a332d1347aa3dd07e596bf049318
| Assignee | ||
Comment 3•7 years ago
|
||
Comment 5•7 years ago
|
||
| bugherder | ||
Updated•7 years ago
|
Description
•