Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Image Fails to Configure FFMPEG on x64 Platforms #2902

Open
caseycarroll opened this issue May 16, 2023 · 9 comments
Open

Docker Image Fails to Configure FFMPEG on x64 Platforms #2902

caseycarroll opened this issue May 16, 2023 · 9 comments
Labels
Type: Bug An issue or pull request relating to a bug in WebPageTest

Comments

@caseycarroll
Copy link

Description

When using docker-compose up on a Windows or Linux machine, the build fails at line https://github.com/WPO-Foundation/webpagetest/blob/master/docker/local/Dockerfile-php#L45.

It builds successfully after removing the --enable-librav1e flag. I did some digging and it appears the error is:

ERROR: rav1e >= 0.1.0 not found using pkg-config

This is odd because it appears that lib gets added on this line: https://github.com/WPO-Foundation/webpagetest/blob/master/docker/local/Dockerfile-php#L35

To make it weirder, this build error does not occur when running docker-compose up on an M1 Macbook.

Steps to reproduce

  1. Use a non ARM system
  2. Run docker-compose up from the root of the project
  3. Observe error:
failed to solve: process "/bin/sh -c ./configure     --enable-version3     --enable-gpl     --enable-nonfree     --enable-small     --enable-libmp3lame     --enable-libx264     --enable-libx265     --enable-libvpx     --enable-libtheora     --enable-libvorbis     --enable-libopus     --enable-libfdk-aac     --enable-libass     --enable-libwebp     --enable-librtmp     --enable-librav1e     --enable-postproc     --enable-avresample     --enable-libfreetype     --enable-filter=scale     --enable-filter=decimate     --enable-openssl     --disable-debug     --disable-doc     --disable-ffplay     --extra-cflags=\"-I${PREFIX}/include\"     --extra-ldflags=\"-L${PREFIX}/lib\"     --extra-libs=\"-lpthread -lm\"     --prefix=\"${PREFIX}\"     && make     && make install     && make distclean" did not complete successfully: exit code: 1

Expected result

Docker build step completes successfully.

Actual result

Docker build step fails

Related issues?

May be related to #2865

@caseycarroll caseycarroll added the Type: Bug An issue or pull request relating to a bug in WebPageTest label May 16, 2023
@caseycarroll
Copy link
Author

Reproducible on M1 MacBook if you set the following environment variable: export DOCKER_DEFAULT_PLATFORM=linux/amd64

@caseycarroll caseycarroll changed the title Docker Image Fails to Configure FFMPEG on x64 Systems Docker Image Fails to Configure FFMPEG on x64 Platforms May 16, 2023
@anthonymunene
Copy link

Can confirm that our docker builds are also failing as a result @caseycarroll have you managed to find a workaround?

@caseycarroll
Copy link
Author

@anthonymunene Sorry, I've yet to find a workaround. I've tried removing the --enable-librav1e flag to get it to build, but that in turn breaks WPT at runtime. When I run a test, I get invalid results. I assume this is because WPT doesn't have a video to gather data from.

@dreadedhamish
Copy link

Issue persists - running linux (Manjaro)

@Baachi
Copy link

Baachi commented Aug 21, 2023

We upgraded our alpine image to alpine:3.18 which solves this issue.

@dreadedhamish
Copy link

dreadedhamish commented Aug 21, 2023

We upgraded our alpine image to alpine:3.18 which solves this issue.

was that your only change? I played with upgrading alpine, FFMPEG, and php-fpm-alpine and managed to progres much further but not all the way - but I may not have updated only alpine.

EDIT: actually the current dockerfile already uses 3.18

@caseycarroll
Copy link
Author

Dockerfile-PHP uses Alpine 3.13. https://github.com/WPO-Foundation/webpagetest/blob/master/docker/local/Dockerfile-php#L1

I can't test bumping it at the moment due to my work firewall blocking Alpine repo connections. @dreadedhamish Can you try bumping 3.13 to 3.18 and report back?

@Baachi
Copy link

Baachi commented Aug 23, 2023

Not the running php stage needs 3.18, the build stage needs to be alpine:3.18. So yes @caseycarroll is correct :)

@dreadedhamish
Copy link

dreadedhamish commented Aug 25, 2023

I just did a fresh pull of the repo and changed only the alpine version in Dockerfile-php, and received this error:
failed to solve: failed to compute cache key: failed to calculate checksum of ref f5514354-d284-4298-b675-fab6238118ef::syi5dmgclhoymgb5u57g8f6dg: "/usr/lib/libx265.so.192": not found

From the look of it the dockerfile is calling versioned libraries, but the apt-get would get the most current?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug An issue or pull request relating to a bug in WebPageTest
Projects
None yet
Development

No branches or pull requests

4 participants