alexmercerind / dart_vlc

Flutter bindings to libVLC.
GNU Lesser General Public License v2.1
510 stars 136 forks source link

Manjaro: Missing '/usr/lib/x86_64-linux-gnu/libvlc.so' #2

Closed Yesterday17 closed 3 years ago

Yesterday17 commented 3 years ago

My libvlc.so is located in /usr/lib directly without the sub direcotory.

image

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

alexmercerind commented 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.

alexmercerind commented 3 years ago

I'm trying to find how that goes for Arch. Let us know, if you find a solution for this category of distro.

Yesterday17 commented 3 years ago

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})
alexmercerind commented 3 years ago

@Yesterday17, were you able to get it working on your Manjaro?

Yesterday17 commented 3 years ago

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.

alexmercerind commented 3 years ago

@Yesterday17 , may you please make a pull request with the same. 🙂

Yesterday17 commented 3 years ago

@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.

alexmercerind commented 3 years ago

@Yesterday17 . Thankyou I'll test it.

lycstar commented 3 years ago

Yes, libvlc.so is in usr/lib/ in archlinux

stonega commented 3 years ago

I have the same issue on Fedora, and the libvlc.so.5 is in /usr/lib64/

alexmercerind commented 3 years ago

@stonega you may change the location inside CMakeLists.txt for the time being.

stonega commented 3 years ago

@stonega you may change the location inside CMakeLists.txt for the time being.

Yes, I have changed it, and everything works as expected 😃

alexmercerind commented 3 years ago

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.