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

failed to compile ffmpeg wrap on linux container #123

Open
0tkl opened this issue Apr 4, 2024 · 0 comments
Open

failed to compile ffmpeg wrap on linux container #123

0tkl opened this issue Apr 4, 2024 · 0 comments

Comments

@0tkl
Copy link

0tkl commented Apr 4, 2024

The WIP CI failed on every distros that need to build ffmpeg 6.1 by ourselves, log:

[260/2836] Generating subprojects/ffmpeg/postproc-def with a custom command (wrapped by meson to capture output)
FAILED: subprojects/ffmpeg/postproc.def 
/usr/bin/meson --internal exe --capture subprojects/ffmpeg/postproc.def -- /usr/bin/python3 /__w/Aegisub/Aegisub/subprojects/ffmpeg/compat/windows/makedef.py --nm /usr/bin/nm --prefix '' --vscript subprojects/ffmpeg/libpostproc/libpostproc.ver subprojects/ffmpeg/libpostproc-static.a
--- stderr ---
usage: makedef.py [-h] [--prefix PREFIX]
                  (--nm NM_PATH | --dumpbin DUMPBIN_PATH | --list)
                  (--regex REGEX [REGEX ...] | --vscript VERSION_SCRIPT) --os
                  {win,linux,darwin}
                  FILE
makedef.py: error: the following arguments are required: --os
[270/2836] Generating subprojects/ffmpeg/avutil-def with a custom command (wrapped by meson to capture output)
FAILED: subprojects/ffmpeg/avutil.def 
/usr/local/bin/meson --internal exe --capture subprojects/ffmpeg/avutil.def -- /usr/bin/python3 /__w/Aegisub/Aegisub/subprojects/ffmpeg/compat/windows/makedef.py --nm /usr/bin/nm --prefix '' --vscript subprojects/ffmpeg/libavutil/libavutil.ver subprojects/ffmpeg/libavutil-static.a
--- stderr ---
usage: makedef.py [-h] [--prefix PREFIX]
                  (--nm NM_PATH | --dumpbin DUMPBIN_PATH | --list)
                  (--regex REGEX [REGEX ...] | --vscript VERSION_SCRIPT) --os
                  {win,linux,darwin}
                  FILE
makedef.py: error: the following arguments are required: --os

Upstream meson.build, Line 2979-2983:

if host_machine.system() == 'windows'
  makedef_args += ['--os', 'win']
elif host_machine.system() in ['darwin', 'ios']
  makedef_args += ['--os', 'darwin']
endif

Upstream makedef.py, Line 64-66:

arg_parser.add_argument('--os', type=str, choices=('win', 'linux', 'darwin'),
                        default='linux', required=True,
                        help='Target operating system for the exports file (win = MSVC module definition file, linux = version script, darwin = exported symbols list)')

I haven't figured out why the default value did not take effect… Anyway, a quick patch can be applied:

if host_machine.system() == 'windows'
  makedef_args += ['--os', 'win']
elif host_machine.system() in ['darwin', 'ios']
  makedef_args += ['--os', 'darwin']
+else
+  makedef_args += ['--os', 'linux']
endif
@0tkl 0tkl changed the title failed to compile ffmpeg wrap on linux failed to compile ffmpeg wrap on linux container May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant