record icon indicating copy to clipboard operation
record copied to clipboard

CMake Error at CMakeLists.txt:120 (install fmedia)

Open Nicolab opened this issue 2 years ago • 10 comments

Package version record: 4.3.2

Describe the bug

When I install the record package, I have this error on Linux Ubuntu 18.04 LTS

Launching lib/main.dart on Linux in debug mode...
lib/main.dart:1
CMake Error at CMakeLists.txt:120 (install):
  install FILES given directory
  "/media/data/lab/dev/work/tests/linux/flutter/ephemeral/.plugin_symlinks/record_linux/linux/fmedia"
  to install.


Exception: Unable to generate build files
Exited (sigterm)

To Reproduce

Maybe by running record 4.3.2 on Linux Ubuntu 18.04

Expected behavior

Just build and import without error.

Desktop:

  • OS: Ubuntu 18.04 LTS

EDIT: That compiles on all version 3, but not since the version 4.

Nicolab avatar Aug 08 '22 19:08 Nicolab

Thanks for the report. Honestly, I don't know how to handle this issue. I don't have linux installed, I just reproduce what I do for Windows here. Install step is just about copying fmedia files in the output folder but the exception states that cmake can't create build files. Could be a permission issue?

Do you have cmake logs in linux build folder that could clarify this?

llfbandit avatar Aug 09 '22 15:08 llfbandit

Thanks for your advices.

The directory exists: /media/data/lab/dev/work/tests/linux/flutter/ephemeral/.plugin_symlinks/record_linux/linux/fmedia The permissions are ok (current user), with the 775 right on this folder.

There is no cmake log file in linux build folder.

I have another package (path_provider_linux) into .plugin_symlinks folder. It compiles well. I have deleted the build folder, flutter clean, etc and reinstalled all but the same. My cmake version is 3.10.2

I don't really see what the problem is, without logs it's not obvious.

Nicolab avatar Aug 10 '22 13:08 Nicolab

Can you attach your build folder for the example project? You can trim it by removing all binary files (lib, so, pdb, otf, ...) and the final output folder. I'll try to dig in.

llfbandit avatar Aug 19 '22 14:08 llfbandit

same issue

alisalimik avatar Aug 25 '22 11:08 alisalimik

Please bump this :) Got same issue do you still need the build folder ? FKv6d4T

Grrravity avatar Oct 05 '22 07:10 Grrravity

I need all you have to dig in this issue. Noboby's send me log ro build folder. So currently this issue is blocked.

llfbandit avatar Oct 05 '22 08:10 llfbandit

Ok then you can dig into my project https://github.com/Grrravity/promptme There is the build folder : https://we.tl/t-wlEQHqdEvv

Grrravity avatar Oct 05 '22 08:10 Grrravity

I managed to install the package on linux (with WSL - ubuntu 20.04, cmake 3.16.3, flutter 3.3.3). I did not reproduced the error. I've built and run successfully the example (but I was unable to record, capture devices were not bridged).

So, this is both good and bad news. Bad news because we still don't know how this issue is happening and good news (at least for me) because it's still info to say that config of cmake should not be the culprit.

That said, I released another version of the package because of bad fmedia executable lookup (on linux, libraries are installed in a lib subfolder).

llfbandit avatar Oct 05 '22 22:10 llfbandit

Great that's still some steps toward solution :p

I was building with 22.04 lts pop os. I don't know if that could be some sort of reason. I'll try to check my cmake version as well as flutter version. Though I did update them when trying to fix building the app so idk.

Grrravity avatar Oct 05 '22 22:10 Grrravity

Hi, I'm trying to record audio in my linux system using the example code provided in the documentation, I'm getting bad state error, should I need to add any specific permission or any setup needs to be done for the linux build? No documentation is provided for Linux platform, using record 4.4.0 and I'm on Flutter 3.0.3 version

ShrirangaB avatar Oct 13 '22 05:10 ShrirangaB

I managed to install the package on linux (with WSL - ubuntu 20.04, cmake 3.16.3, flutter 3.3.3). I did not reproduced the error. I've built and run successfully the example (but I was unable to record, capture devices were not bridged).

So, this is both good and bad news. Bad news because we still don't know how this issue is happening and good news (at least for me) because it's still info to say that config of cmake should not be the culprit.

That said, I released another version of the package because of bad fmedia executable lookup (on linux, libraries are installed in a lib subfolder).

Having almost the same environment but still facing the error

drexhacker avatar Nov 03 '22 00:11 drexhacker

same issue

Nightwelf avatar Nov 28 '22 06:11 Nightwelf

getting this issue on ArchLinux (Linux 6.0.12-arch) too. using record: ^4.4.1

I event tried to symlink the fmedia binary which I installed from my package manager, but that also didn't worked.

samyakbardiya avatar Dec 19 '22 05:12 samyakbardiya

This breaks the compilation of my app which I need for Linux on x86 and arm64. Please consider removing the Linux support until this is fixed. Also: Binaries should never ever checked in into a code repository...

krille-chan avatar Dec 21 '22 19:12 krille-chan

I was able to at least build by changing CMakeLists.txt file, stored in linux/flutter/ephemeral/.plugin_symlinks/record_linux/linux/.

After installig fmedia from my package manager, I changed "${CMAKE_CURRENT_SOURCE_DIR}/fmedia" to /usr/bin/fmedia (output of $ which fmedia) in the above mentioned file. And after that I was able to at least build the file, but still unable to use the record package.

After changing the last few lines will look like this:

set(record_linux_bundled_libraries
  ""
  "/usr/bin/fmedia"
  PARENT_SCOPE
)

samyakbardiya avatar Dec 22 '22 10:12 samyakbardiya

Package record_linux has been updated to 0.4.0. fmedia is no more included on this platform until a solution is found. So you must install it separately. fmedia executable must be widely available to be called.

llfbandit avatar Dec 27 '22 01:12 llfbandit

This breaks the compilation of my app which I need for Linux on x86 and arm64. Please consider removing the Linux support until this is fixed. Also: Binaries should never ever checked in into a code repository...

@krillefear Despite the changes described above, fmedia is not available for ARM architecture as far as I know.

llfbandit avatar Dec 27 '22 01:12 llfbandit