Open denglerchr opened 4 months ago
the problem doesn't appear to be finding libasound_module_pcm_a52.so
, it's that that library seems to be dependent on libavcodec.so.58
, which it's not finding.
what version of alsa_jll
, alsa_plugins_jll
, libportaudio_jll
, and FFMPEG_jll
do you have installed? In particular, that libasound
module is provided by alsa_plugins_jll
, and the libavcodec
should be provided by FFMPEG_jll
.
It looks like the latest version of FFMPEG_jll builds libavcodec.so.60
, so maybe alsa_plugins_jll
needs to be updated to match.
I'm pretty out of touch with how the binary build system works these days, so it may be worth filing an issue on the Yggdrasil repo, they may have a better idea.
It happens on a completely new project with only PortAudio added. Attached also the Manifest.toml in a Zip.
Under Windows, with the same versions of packages, PortAudio works well.
I have the same problem on Ubuntu 24.04.
There appears to be a number of libraries missing:
$ ldd /home/tp_test/.julia/artifacts/d587f48a6815c72dec4b083bf297caec7a8e3f4b/lib/alsa-lib/libasound_module_pcm_a52.so
linux-vdso.so.1 (0x00007ffe53518000)
libavcodec.so.58 => not found
libavutil.so.56 => not found
libavresample.so.4 => not found
libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007577d15de000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007577d14f5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007577d14ee000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007577d14e9000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007577d14e4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007577d0e00000)
/lib64/ld-linux-x86-64.so.2 (0x00007577d1703000)
The versions installed on my system are:
/lib/x86_64-linux-gnu/libavcodec.so.60
/lib/x86_64-linux-gnu/libavutil.so.58
/lib/x86_64-linux-gnu/libswresample.so.4
(the last one is the closest I could find).
But I do not know how to fix it :-(
I managed to build alsa_plugin locally by restricting the number of architectures and pinning FFMPEG to version 4.4: https://github.com/JuliaPackaging/Yggdrasil/pull/8863
This is not enough to make PortAudio install, but if I explicitly use FFMPEG_jll@4.4.0 it works.
So I suppose if we go this route, we need to add a compat of FFMPEG_jll to restrict it to ~4.4.
However, on my host system (Ubuntu 20.24) I have a copy of libasound_module_pcm_a52.so
that links to libavcodec.so.60
, so there does not seem to be a reason we can not build alsa_plugin using the newer libraries.
Oh, there is a new version of alsa-plugins: 1.2.7.1. That builds with the current version of FFMPEG. I'll update my PR.
I just wanted to add that I also ran into this issue just now in a fresh environment under julia 10.4.
Same problem on GNU/Linux Debian (sid):
PkgPrecompileError: The following 1 direct dependency failed to precompile:
PortAudio [80ea8bcb-4634-5cb3-8ee8-a132660d1d2d]
Failed to precompile PortAudio [80ea8bcb-4634-5cb3-8ee8-a132660d1d2d] to "/home/mateusz/.julia/compiled/v1.10/PortAudio/jl_1GnANP".
ERROR: LoadError: InitError: could not load library "/home/mateusz/.julia/artifacts/d587f48a6815c72dec4b083bf297caec7a8e3f4b/lib/alsa-lib/libasound_module_pcm_a52.so"
/lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: hb_ot_color_has_paint
Stacktrace:
[1] dlopen(s::String, flags::UInt32; throw_error::Bool)
@ Base.Libc.Libdl ./libdl.jl:117
[2] dlopen(s::String, flags::UInt32)
@ Base.Libc.Libdl ./libdl.jl:116
[3] macro expansion
@ ~/.julia/packages/JLLWrappers/pG9bm/src/products/library_generators.jl:63 [inlined]
[4] __init__()
@ alsa_plugins_jll ~/.julia/packages/alsa_plugins_jll/hnVoe/src/wrappers/x86_64-linux-gnu.jl:49
[5] run_module_init(mod::Module, i::Int64)
@ Base ./loading.jl:1134
[6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1122
[7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
@ Base ./loading.jl:1067
[8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
@ Base ./loading.jl:1581
[9] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1938
[10] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1812
[11] #invoke_in_world#3
@ ./essentials.jl:926 [inlined]
[12] invoke_in_world
@ ./essentials.jl:923 [inlined]
[13] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1803
[14] macro expansion
@ ./loading.jl:1790 [inlined]
[15] macro expansion
@ ./lock.jl:267 [inlined]
[16] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1753
[17] #invoke_in_world#3
@ ./essentials.jl:926 [inlined]
[18] invoke_in_world
@ ./essentials.jl:923 [inlined]
[19] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1746
[20] include
@ ./Base.jl:495 [inlined]
[21] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2222
[22] top-level scope
@ stdin:3
during initialization of module alsa_plugins_jll
in expression starting at /home/mateusz/.julia/packages/PortAudio/HNBv4/src/PortAudio.jl:1
in expression starting at stdin:
This is Julia 1.10.4 and clean Pkg.generate("mwe")
environment with just PortAudio package.
Portaudio libraries on the system are
ii libportaudio2:amd64 19.6.0-1.2+b2 amd64 Portable audio I/O - shared library
ii libportaudiocpp0:amd64 19.6.0-1.2+b2 amd64 Portable audio I/O C++ bindings - shared library
ii portaudio19-dev:amd64 19.6.0-1.2+b2 amd64 Portable audio I/O - development files
Looks like this Julia package is completely broken, are there any alternatives for Julia to read sound device ?
Thanks
I'm hoping PortAudio.jl can support PipeWire systems as well since that's a popular choice for the Linux audio server. It was suggested
to build Pipewire with binary builder and then make alsa-plugins aware of it:
JuliaPackaging/Yggdrasil@master/A/alsa_plugins/build_tarballs.jl
I am having an error during precompilation on Linux x86 on two different PCs.
versioninfo()
:The error appears as soon as the package (v1.3.0) is added. What is weird,
isfile(raw"/home/christiand/.julia/artifacts/d587f48a6815c72dec4b083bf297caec7a8e3f4b/lib/alsa-lib/libasound_module_pcm_a52.so")
returnstrue
...