You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bundlex creates symbolic links for the plugins to the precompiled libraries. However the link is pointing to non-existing folder if the project has a priv directory. Elixir uses symlink for the priv directory inside _build which leads to errors like this
Bundlex: Building natives: decoder, encoder
** (File.LinkError) could not create symlink from "../../../../bundlex/priv/shared/precompiled/httpsgithub.comBtbNFFmpeg-Buildsreleasesdownloadlatestffmpeg-n6.1-latest-linux64-gpl-shared-6.1.tar.xz/lib" to "/home/xxxxx/p/OpenSourceProjects/elixir/membrane/membrane_h264_ffmpeg_plugin/_build/dev/lib/membrane_h264_ffmpeg_plugin/priv/bundlex/nif/httpsgithub.comBtbNFFmpeg-Buildsreleasesdownloadlatestffmpeg-n6.1-latest-linux64-gpl-shared-6.1.tar.xz": file already exists
(elixir 1.15.4) lib/file.ex:666: File.ln_s!/2
(bundlex 1.4.5) lib/bundlex/toolchain/common/unix/os_deps.ex:266: Bundlex.Toolchain.Common.Unix.OSDeps.create_relative_symlink/3
(bundlex 1.4.5) lib/bundlex/toolchain/common/unix/os_deps.ex:137: Bundlex.Toolchain.Common.Unix.OSDeps.get_precompiled_libs_flags/4
(bundlex 1.4.5) lib/bundlex/toolchain/common/unix/os_deps.ex:129: Bundlex.Toolchain.Common.Unix.OSDeps.resolve_os_dep_provider/3
(bundlex 1.4.5) lib/bundlex/toolchain/common/unix/os_deps.ex:84: Bundlex.Toolchain.Common.Unix.OSDeps.resolve_os_dep/5
(elixir 1.15.4) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2
(bundlex 1.4.5) lib/bundlex/toolchain/common/unix/os_deps.ex:12: Bundlex.Toolchain.Common.Unix.OSDeps.resolve_os_deps/1
(bundlex 1.4.5) lib/bundlex/native.ex:115: Bundlex.Native.resolve_native/4
Or
Bundlex: Building natives: decoder
Compiling 5 files (.ex)
00:35:57.082 [error] Bundlex cannot load nif :decoder of app :membrane_h264_ffmpeg_plugin
from "/home/xxxxx/p/OpenSourceProjects/elixir/membrane/membrane_h264_ffmpeg_plugin/_build/dev/lib/membrane_h264_ffmpeg_plugin/priv/bundlex/nif/decoder", check bundlex.exs file for information about nifs.
Reason: :load_failed, Failed to load NIF library /home/xxxx/p/OpenSourceProjects/elixir/membrane/membrane_h264_ffmpeg_plugin/_build/dev/lib/membrane_h264_ffmpeg_plugin/priv/bundlex/nif/decoder: 'libavcodec.so.60: cannot open shared object file: No such file or directory'
The text was updated successfully, but these errors were encountered:
After this fix, there's no issue on building a project with priv folder, however when creating a release there's an error when trying to copy the content of the wrong symlink generated by bundlex since Elixir doesn't seem to copy the content of the symlink but where the symlink points
16:51:00.018 [error] Task #PID<0.22827.0> started from #PID<0.99.0> terminating
** (File.CopyError) could not copy recursively from "/xxxx/_build/dev/lib/native/priv" to "/xxx/_build/dev/rel/project/lib/native-0.9.1/priv". /xxx/apps/bundlex/priv/shared/precompiled/httpsgithub.comBtbNFFmpeg-Buildsreleasesdownloadlatestffmpeg-n6.1-latest-linux64-gpl-shared-6.1.tar.xz/lib: no such file or directory
(elixir 1.15.4) lib/file.ex:949: File.cp_r!/3
(mix 1.15.4) lib/mix/release.ex:828: anonymous fn/4 in Mix.Release.copy_app/2
(elixir 1.15.4) lib/enum.ex:2510: Enum."-reduce/3-lists^foldl/2-0-"/3
(mix 1.15.4) lib/mix/release.ex:825: Mix.Release.copy_app/2
(elixir 1.15.4) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
(elixir 1.15.4) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: &:erlang.apply/2
Args: [#Function<0.65334452/1 in Mix.Tasks.Release.assemble/1>, [:native]]
Bundlex creates symbolic links for the plugins to the precompiled libraries. However the link is pointing to non-existing folder if the project has a
priv
directory. Elixir uses symlink for thepriv
directory inside_build
which leads to errors like thisOr
The text was updated successfully, but these errors were encountered: