stsaz / fmedia

fast audio player/recorder/converter
BSD 2-Clause "Simplified" License
212 stars 20 forks source link

Help:I try to build this project in linux arm64 by using the build script. #98

Closed moyang628 closed 9 months ago

moyang628 commented 9 months ago

Hello, I try to build this project in ubuntu 20.04 arm64 to use the flutter plugin -record there is a lot of errors such as when I compiling the MAC FLAC libs and llibzstd-ff . Is this project surportting the arm64 linux ? Thanks.

stsaz commented 9 months ago

Hello! fmedia uses an ancient version of MAC lib, and it doesn't compile for arm64. I build FLAC and zstd for android/arm64, and they work, so maybe there's just some minor issue with my makefiles - we can fix this. Here's what I suggest:

P.S. It would be even better if you can try to build phiola (https://github.com/stsaz/phiola), it's the next major update of fmedia. It will be easier for me to fix issues there. To disable MAC lib just apply the attached patch. phiola-alib3-disable-MAC.txt

moyang628 commented 9 months ago

Now I change to gcc to compile. I skipped some lib ,and I made some changes to the build script and the makefiles, the libzstd-ff.so has been complied successfully. but the next step stucked, here it comes:

+cp -u ALAC/.so \ DynamicAudioNormalizer/.so \ fdk-aac/.so \ FLAC/.so \ mp3lame/.so \ mpg123/.so \ musepack/.so \ ogg/.so \ opus/.so \ vorbis/.so \ wavpack/*.so \ _linux-arm64

================================

stsaz commented 9 months ago

The autobuild script is a little bit outdated, as it turns out.

In Building zstd... section replace make -j8 -Rr install with make libzstd - this will copy fmedia-src/ffpack/zstd/libzstd-ffpack.so to fmedia-src/ffpack/_linux-arm64/ dir. If not, you can copy it manually.

UPDATE:

config.mk:1: ../../ffbase/conf.mk: No such file or directory

The latest ffpack/Makefile includes ../ffbase/conf.mk, not ../../ffbase/conf.mk. Make sure the paths are correct.

https://github.com/stsaz/ffpack/blob/640c7eed2f5a57994d670e68167bda28ec7daa0f/config.mk#L1C2-L1C2