Closed Bug 1510786 Opened 6 years ago Closed 5 years ago

ppc64/ppc64le/s390x arches not recognized by dav1d?

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: dan, Assigned: achronop)

References

Details

Attachments

(3 files)

build of current trunk with default config fails with

...
 1:34.46 media/libdav1d
 1:34.46 /usr/bin/gcc -std=gnu99 -o cdf.o -c  -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/system_wrappers -include /mnt/dan/firefox.git/config/gcc_hidden.h -DDEBUG=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/mnt/dan/firefox.git/media/libdav1d -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/media/libdav1d -I/mnt/dan/firefox.git/third_party/dav1d -I/mnt/dan/firefox.git/third_party/dav1d/include -I/mnt/dan/firefox.git/third_party/dav1d/include/dav1d -I/mnt/dan/firefox.git/third_party/dav1d/include/compat/gcc -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nspr -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nss -fPIC -include /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/mozilla-config.h -DMOZILLA_CLIENT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fno-math-errno -pthread -pipe -g -Og -fno-omit-frame-pointer -funwind-tables -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wduplicated-cond -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=multistatement-macros -Wno-error=class-memaccess -Wformat -Wformat-overflow=2  -MD -MP -MF .deps/cdf.o.pp  -fdiagnostics-color  /mnt/dan/firefox.git/third_party/dav1d/src/cdf.c
 1:34.48 /mnt/dan/firefox.git/third_party/dav1d/src/cdf.c:28:10: fatal error: config.h: No such file or directory
 1:34.48  #include "config.h"
 1:34.48           ^~~~~~~~~~
 1:34.48 compilation terminated.

I haven't looked yet if it's a build system issue or if dav1d upstream doesn't support non-x86/non-arm arches at all.
dav1d supports all platforms via C interface.  asm is x86 and arm only.

awilcox on gwyn [pts/5 Wed 28 17:59] build: meson 
The Meson build system
Version: 0.47.2
Source dir: /home/awilcox/Code/contrib/dav1d
Build dir: /home/awilcox/Code/contrib/dav1d/build
Build type: native build
Project name: dav1d
Project version: 0.0.1
Native C compiler: cc (gcc 6.4.0 "cc (Adelie 6.4.0) 6.4.0")
Build machine cpu family: ppc64
Build machine cpu: ppc64
Dependency threads found: YES
Check usable header "stdatomic.h": YES
Check usable header "unistd.h": YES
Checking for function "getopt_long" : YES
Checking for function "posix_memalign" : YES
Compiler for C supports arguments -fvisibility=hidden: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -Wno-maybe-uninitialized -Wmaybe-uninitialized: YES
Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -fomit-frame-pointer: YES
Compiler for C supports arguments -ffast-math: YES
Configuring config.h using configuration
Program doxygen found: NO
Build targets in project: 8
Found ninja-1.8.2 at /usr/bin/ninja
awilcox on gwyn [pts/5 Wed 28 17:59] build: ninja  
[63/63] Linking target tools/dav1d.
awilcox on gwyn [pts/5 Wed 28 17:59] build: ninja test
zsh: correct 'test' to 'tests' [nyae]? n
[1/2] Running all tests.
No tests defined.
awilcox on gwyn [pts/5 Wed 28 17:59] build:
What's missing is config files for non x86/x86-64/arm/arm64 systems.
https://hg.mozilla.org/mozilla-central/file/f2915d3ee5f8/media/libdav1d/moz.build#l15
Can you please build dav1d alone, in those platforms, and provide the config.h file found in the build directory. Dav1d can be found in [1].

[1] https://code.videolan.org/videolan/dav1d
Attached file config.h
config.h - identical for ppc64, ppc64le and s390x arches, produced on Fedora
It feels like we could reasonably merge all those config.h files and use appropriate ifdefs.
(In reply to Mike Hommey [:glandium] from comment #5)
> It feels like we could reasonably merge all those config.h files and use
> appropriate ifdefs.

I mean, including the ones already in the tree.
I would be happy to make something more elegant with those files. Can you please elaborate more with your idea.

My idea is to create the content of the file in a string variable, and then create the config file using the GENERATED_FILES[] (plus generation attributes).
Could you please check if this patch fixes you builds?
Flags: needinfo?(dan)
there is a missing colon at the end of the "elif" line, but with that added it builds again and runs
Flags: needinfo?(dan)
Thank you Dan!
Assignee: nobody → achronop
Status: UNCONFIRMED → NEW
Rank: 15
Component: Audio/Video → Audio/Video: Playback
Ever confirmed: true
Priority: -- → P2
See Also: → 1511263
For the record - I can build FF on ppc64/ppc64le/s390x with the last fix.
Pushed by achronopoulos@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6e6e269d09d
Add configuration header for ppc64 and s390x. r=TD-Linux
https://hg.mozilla.org/mozilla-central/rev/e6e6e269d09d
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: