[FFmpeg-trac] #349(undetermined:open): MingW32 Cross Compile of FFMPEG Fails
FFmpeg
trac at avcodec.org
Wed Jul 25 12:34:57 CEST 2012
#349: MingW32 Cross Compile of FFMPEG Fails
-------------------------------------+-------------------------------------
Reporter: jlsantiago0 | Owner:
Type: defect | Status: open
Priority: important | Component:
Version: unspecified | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by stump):
I'm running into this problem too, on current git master.
As an observation, libav switched to the `dlltool` line in
[http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=ec10a9ab commit
ec10a9ab] and ffmpeg later reverted that in
[http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=85c9365d commit
85c9365d], saying "this was requested by the windows experts / seems
dlltool causes alot of problems".
This makes me think that an import library output by `dlltool` will still
be incompatible with MSVC. Last time I tried linking to a MinGW-generated
implib with MSVC, bad things happened (I'm not currently in a position to
retry).
To work around this, in the script from which I cross-build ffmpeg, I
hackishly patch `library.mak` (will attach patch for reference) to ignore
the error installing the `.lib` file, just as the failure to invoke
`lib.exe` is already ignored during `make`. (I don't consider `make -k
install` to be a satisfactory solution, as that could hide real problems.)
It looks like the mechanism I'm modifying is intended to be more general,
but it looks like it's not used for anything other than installing the
MSVC-compatible implibs for a mingw32 build. I think that if this import
library incompatibility still exists, the right thing to do is probably to
just ignore the error during install (or condition installation on the
file's pre-existence).
(As another observation, if the binutils were indeed capable of making
MSVC-compatible implibs, it would be possible to just pass `-Wl,--out-
implib,foo.lib` while linking the DLLs and satisfy both MinGW and MSVC, as
one of the expansions MinGW tries for `-lfoo` is `foo.lib`.)
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/349#comment:9>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list