FFMPEG.jl icon indicating copy to clipboard operation
FFMPEG.jl copied to clipboard

Build issue on Windows

Open jebej opened this issue 4 years ago • 9 comments

Seems similar to issue #27 but the message is not the same:

pkg> build FFMPEG
   Building FFMPEG → `C:\Users\Jeremy\.julia\packages\FFMPEG\guN1x\deps\build.log`
┌ Error: Error building `FFMPEG`:
│ ERROR: LoadError: LoadError: LibraryProduct(nothing, ["libbz2"], :libbzip2, "Prefix(C:\\Users\\Jeremy\\.julia\\packages\\FFMPEG\\guN1x\\deps\\usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│  [1] error(::String) at .\error.jl:33
│  [2] write_deps_file(::String, ::Array{LibraryProduct,1}; verbose::Bool, isolate::Bool) at C:\Users\Jeremy\.julia\packages\BinaryProvider\GeAtj\src\Products.jl:419
│  [3] top-level scope at C:\Users\Jeremy\.julia\packages\FFMPEG\guN1x\deps\build_Bzip2.v1.0.6.jl:48
│  [4] include(::Module, ::String) at .\Base.jl:377
│  [5] include(::String) at C:\Users\Jeremy\.julia\packages\FFMPEG\guN1x\deps\build.jl:44
│  [6] top-level scope at C:\Users\Jeremy\.julia\packages\FFMPEG\guN1x\deps\build.jl:45
│  [7] include(::String) at .\client.jl:439
│  [8] top-level scope at none:5
│ in expression starting at C:\Users\Jeremy\.julia\packages\FFMPEG\guN1x\deps\build_Bzip2.v1.0.6.jl:48
│ in expression starting at C:\Users\Jeremy\.julia\packages\FFMPEG\guN1x\deps\build.jl:38
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Operations.jl:892

jebej avatar May 09 '20 23:05 jebej

There might be some kind of conflict with VideoIO

jebej avatar May 09 '20 23:05 jebej

I'm also seeing a build error in Windows, not sure if its related:

ERROR: LoadError: InitError: could not load library "C:\Users\travis\.julia\artifacts\52d195e9e73e7321d06ad9980656174ac0464ed4\bin\avdevice-58.dll"
310The specified module could not be found.
311
312Stacktrace:
313 [1] #dlopen#3(::Bool, ::typeof(Libdl.dlopen), ::String, ::UInt32) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Libdl\src\Libdl.jl:109
314 [2] dlopen at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Libdl\src\Libdl.jl:109 [inlined] (repeats 2 times)
315 [3] __init__() at C:\Users\travis\.julia\packages\FFMPEG_jll\tCUYA\src\wrappers\x86_64-w64-mingw32.jl:231
316 [4] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:692
317 [5] _require_from_serialized(::String) at .\loading.jl:743
318 [6] _require(::Base.PkgId) at .\loading.jl:1034
319 [7] require(::Base.PkgId) at .\loading.jl:922
320 [8] require(::Module, ::Symbol) at .\loading.jl:917
321 [9] include at .\boot.jl:328 [inlined]
322 [10] include_relative(::Module, ::String) at .\loading.jl:1105
323 [11] include(::Module, ::String) at .\Base.jl:31
324 [12] top-level scope at none:2
325 [13] eval at .\boot.jl:330 [inlined]
326 [14] eval(::Expr) at .\client.jl:425
327 [15] top-level scope at .\none:3
328during initialization of module FFMPEG_jll
329in expression starting at C:\Users\travis\.julia\packages\FFMPEG\vocw2\src\FFMPEG.jl:3

See https://travis-ci.org/github/JuliaHolomorphic/ComplexPhasePortrait.jl/jobs/710871843

dlfivefifty avatar Jul 22 '20 19:07 dlfivefifty

I'm having the same issue with a different file.

julia> using FFMPEG
[ Info: Precompiling FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a]
ERROR: LoadError: InitError: could not load library "C:\Users\Chris\.julia\artifacts\7350a6401f1c0d38cc3518193083bc4f83adfe99\bin/avcodec-58.dll"
The specified module could not be found.
Stacktrace:
 [1] dlopen(::String, ::UInt32; throw_error::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109
 [2] dlopen(::String, ::UInt32) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109
 [3] macro expansion at C:\Users\Chris\.julia\packages\JLLWrappers\m1BKg\src\products\library_generators.jl:61 [inlined]
 [4] __init__() at C:\Users\Chris\.julia\packages\FFMPEG_jll\7oXwC\src\wrappers\x86_64-w64-mingw32.jl:41
 [5] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:697
 [6] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:782
 [7] _require(::Base.PkgId) at .\loading.jl:1007
 [8] require(::Base.PkgId) at .\loading.jl:928
 [9] require(::Module, ::Symbol) at .\loading.jl:923
 [10] include(::Function, ::Module, ::String) at .\Base.jl:380
 [11] include(::Module, ::String) at .\Base.jl:368
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:331 [inlined]
 [14] eval(::Expr) at .\client.jl:467
 [15] top-level scope at .\none:3
during initialization of module FFMPEG_jll
in expression starting at C:\Users\Chris\.julia\packages\FFMPEG\aazvf\src\FFMPEG.jl:3
ERROR: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to C:\Users\Chris\.julia\compiled\v1.5\FFMPEG\TGvga_ztj3h.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
 [3] _require(::Base.PkgId) at .\loading.jl:1030
 [4] require(::Base.PkgId) at .\loading.jl:928
 [5] require(::Module, ::Symbol) at .\loading.jl:923

Julia 1.5.2, clean .julia

ChrHorn avatar Oct 10 '20 08:10 ChrHorn

Same issue with v0.4.0 and v0.3.0 on Windows:

julia> using FFMPEG
[ Info: Precompiling FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a]
ERROR: LoadError: InitError: could not load library "E:\.julia\artifacts\7350a6401f1c0d38cc3518193083bc4f83adfe99\bin/avcodec-58.dll"
The specified module could not be found. 
Stacktrace:
 [1] dlopen(::String, ::UInt32; throw_error::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109
 [2] dlopen(::String, ::UInt32) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109
 [3] macro expansion at E:\.julia\packages\JLLWrappers\m1BKg\src\products\library_generators.jl:61 [inlined]
 [4] __init__() at E:\.julia\packages\FFMPEG_jll\7oXwC\src\wrappers\x86_64-w64-mingw32.jl:41
 [5] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:697
 [6] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:782
 [7] _require(::Base.PkgId) at .\loading.jl:1007
 [8] require(::Base.PkgId) at .\loading.jl:928
 [9] require(::Module, ::Symbol) at .\loading.jl:923
 [10] include(::Function, ::Module, ::String) at .\Base.jl:380
 [11] include(::Module, ::String) at .\Base.jl:368
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:331 [inlined]
 [14] eval(::Expr) at .\client.jl:467
 [15] top-level scope at .\none:3
during initialization of module FFMPEG_jll
in expression starting at E:\.julia\packages\FFMPEG\vocw2\src\FFMPEG.jl:3
ERROR: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to E:\.julia\compiled\v1.5\FFMPEG\TGvga_LUT1c.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
 [3] _require(::Base.PkgId) at .\loading.jl:1030
 [4] require(::Base.PkgId) at .\loading.jl:928
 [5] require(::Module, ::Symbol) at .\loading.jl:923

I have to downgrade to v0.2.4 and it finally worked. In v0.2.4, FFMPEG is locally builded when installing by Pkg, so I would presume that a broken 'artifact` is uploaded.

islent avatar Oct 10 '20 09:10 islent

Please update the registry, it should work now

giordano avatar Oct 10 '20 11:10 giordano

@dlfivefifty FFMPEG cannot possibly work on Travis due their installation of Windows lacking audio/video system libraries: https://github.com/JuliaIO/FFMPEG.jl/issues/14#issuecomment-537288621. There is nothing we can do, the only solution is to test packages involving FFMPEG on Windows on other CI services, like AppVeyor or GitHub Actions

giordano avatar Oct 10 '20 11:10 giordano

Many thanks. Now the LoadError is gone ! 😄

islent avatar Oct 11 '20 12:10 islent

I'm experiencing this same issue. I'm using v0.4.1. This is on a Windows VM machine. On my host Windows machine FFMPEG v0.4.1 works fine. Note: This is Windows 10 Pro N, the N means media parts are not installed as I understand. Maybe I'm missing some critical media dll that is needed?

julia> using FFMPEG
[ Info: Precompiling FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a]
ERROR: LoadError: InitError: could not load library "C:\Users\0191204\.julia\artifacts\e2bc28a38e71d07d41a27f8d4b3132c5d1b5a22d\bin\avcodec-58.dll"
The specified module could not be found.

bradcarman avatar Jun 29 '23 16:06 bradcarman

I discovered the solution. I suspected some codecs were missing, so I installed the Media Features Pack in Windows and now it's working!

bradcarman avatar Jun 29 '23 17:06 bradcarman