Closed Yesterday17 closed 3 years ago
Hi there @Yesterday17 !
I can't really say about this one, since I used this plugin on Ubuntu Linux. And in my case when I installed libVLC using the apt command, the shared libraries were present under the directory. This stackexchange forum speaks a little about this. I cannot say anything about it, as I have never used Manjaro or Arch. It is an issue with shared libraries, so make sure those are discoverable by Flutter engine.
All I can say is, please install equivalent of
sudo apt install libvlc-dev
Thanks.
I'm trying to find how that goes for Arch. Let us know, if you find a solution for this category of distro.
Maybe you can try this.
On my laptop, CMAKE_INSTALL_LIBDIR
is lib
, so I guess it would be lib/x86_64-linux-gnu
on ubuntu?
I tested it with the following CMakeList.txt
:
project(test)
include(GNUInstallDirs)
message(STATUS ${CMAKE_INSTALL_LIBDIR})
@Yesterday17, were you able to get it working on your Manjaro?
I made the following patch:
include(GNUInstallDirs)
target_link_libraries(${PLUGIN_NAME} PRIVATE
flutter
PkgConfig::GTK
"/usr/${CMAKE_INSTALL_LIBDIR}/libvlc.so"
)
On my laptop, CMAKE_INSTALL_LIBDIR
is lib
, so this patch works for me.
@Yesterday17 , may you please make a pull request with the same. 🙂
@Yesterday17 , may you please make a pull request with the same.
I've not tested on other distributions because I don't have much free space on my laptop. I can make a pull request, but further tests are needed.
@Yesterday17 . Thankyou I'll test it.
Yes, libvlc.so is in usr/lib/ in archlinux
I have the same issue on Fedora, and the libvlc.so.5 is in /usr/lib64/
@stonega you may change the location inside CMakeLists.txt
for the time being.
@stonega you may change the location inside
CMakeLists.txt
for the time being.
Yes, I have changed it, and everything works as expected 😃
Simply having -lvlc
as clang flag actually works fine. So, I've completely removed the file path and replaced it with just vlc
. Should work fine for all Linux breeds.
My
libvlc.so
is located in/usr/lib
directly without the sub direcotory.System info
Operating System: Manjaro Linux KDE Plasma Version: 5.21.3 KDE Frameworks Version: 5.80.0 Qt Version: 5.15.2 Kernel Version: 5.9.16-1-MANJARO OS Type: 64-bit Graphics Platform: X11 Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz Memory: 15.5 GiB of RAM Graphics Processor: GeForce GTX 1070 with Max-Q Design/PCIe/SSE2