-
Notifications
You must be signed in to change notification settings - Fork 104
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
cross-compile ffms2 not quite working, need advice #415
Comments
This issue is fixed, looked at mabs which has a patch and a sed :) |
However, it does not cross-compile to a .dll :( If anyone has advice on that, it would be much appreciated |
Use --enable-shared instead of the bolded. The sed modification has nothing to do with building FFMS2 as a dll, but for things trying to link to a static FFMS2 (like x264). AFAIK, nothing inside of FFMS2 relies on reading the .pc file for itself, so that's entirely for external use. Although I'll note that if you're trying to build the AviSynth plugin, the autotools build system is not going to produce what you expect (even if you do specify --enable-avisynth to configure) when cross-compiling with MinGW-w64/GCC. |
OK, Thanks. Vapoursynth only at this point.
It eventually yields an error, which I'll look at in a day or three (life intervenes). Something to do with posix threads by the looks (with which I am unfamiliar), so again any advice would be appreciated. Once finally resolved (well, if) perhaps I'd better post the final successful steps so that some other novice could learn from them, since detailed cross-compilation steps with results are not available even after fairly extensive goggling.
|
Ah.
yielded
Advice greatly appreciated. |
Why is this? Is there any way to fix it? |
MSVC and GCC use incompatible C++ ABIs. Any way to 'fix' it at a deep level would break compatibility with existing C++ plugins, requiring them all to be rebuilt or fixed against the newer version. The AviSynth core and the C++ plugin must be built with the same C++ ABI. So MSVC-built AviSynth+ (the standard, official builds) can only use C++ plugins built by MSVC or clang-cl (aka Clang in MSVC mode). Likewise, MinGW-w64/GCC-built AviSynth+ can only use C++ plugins built by GCC or Clang. Or ignore the issue entirely and develop more plugins using the C interface, because the same C interface plugin .dll can be used by either MSVC-built or GCC-built AviSynth+ (and the C interface was intended for using GCC anyway). FFMS2 already has one; development moved to another repository many years ago (the changes there are almost entirely isolated to the C-plugin code, so it gets the same updates for the core, C++ plugin, and VapourSynth plugin when it syncs against upstream every so often). It doesn't use autotools, though; either a custom configure script/GNUmakefile (old), or meson (new). |
But MSVC-built Vapoursynth can load GCC-built ffms2? |
VapourSynth uses a C API, so yes. That has nothing to do with me saying that --enable-avisynth doesn't do what people think it does with MinGW-w64 cross-compiles. |
Sure, I wasn't making objection, just I don't have in-depth knowledge of them but I'm curious. |
Hello, I hope to cross-compile ffms2 (mingw64 under ubunto for target Win11x64) linking with the latest ffmpeg however I am a tad stuck.
Having built successfully cross-compiled ffmpeg and some of its dependencies static, I hoped it would be a case of running the ffms2 configure/make process and it linking to the static libraries to create ffms2.dll
(the ffmpeg build process is a script which auto-inserts -I -L etc to configures and variables like LDFLAGS etc)
However, the ffms2 build process yields a
undefined reference to
WinMain'` and I'm not sure what to do about it.(I'm a vanilla user, not a linix person nor a real programmer)
Any advice on how to fix it would be greatly appreciated.
A snippet showing the error:
Full log below, showing the configure/make and log (process based on a successful ffmpeg static cross-compile):
The text was updated successfully, but these errors were encountered: