GithubHelp home page GithubHelp logo

Comments (32)

iiiyu avatar iiiyu commented on June 26, 2024 2

So your Homebrew installation lives in /opt/homebrew (which is where it would typically be under Apple Silicon), and your flite installation is in /usr/local/lib which would be Homebrew's previous location (under x64). Indeed clang can't find the libraries and therefore fails.

Assuming the headers are in /usr/local/include, you should add -I/usr/local/include explicitly to the clang command. Homebrew does not do that on its own, see: https://github.com/orgs/Homebrew/discussions/868

Can you try with:

export CPPFLAGS=-I/usr/local/include"
brew install homebrew-ffmpeg/ffmpeg/ffmpeg  --with-chromaprint --with-decklink --with-fdk-aac --with-libflite --with-game-music-emu --with-harfbuzz --with-jack --with-jpeg-xl --with-libaribb24 --with-libaribcaption --with-libmodplug --with-libopenmpt --with-librist --with-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rav1e --with-svt-av1 --with-rtmpdump --with-rubberband --with-two-lame --with-webp --with-xvid --with-zeromq --with-zimg --with-srt --with-libvmaf --with-libxml2 --with-libzvbi --with-aribb24 --with-libbluray --with-libbs2b --with-libcaca --with-libgsm [email protected] --with-speex

I try

export CPPFLAGS=-I/usr/local/include"

It doesn’t work. but you inspired me.

Then I tried this

ln -s /usr/local/lib/libflite* /opt/homebrew/lib/
ln -s /usr/local/include/flite /opt/homebrew/include/flite
brew reinstall homebrew-ffmpeg/ffmpeg/ffmpeg --with-chromaprint --with-decklink --with-fdk-aac --with-libflite --with-game-music-emu --with-harfbuzz --with-jack --with-jpeg-xl --with-libaribb24 --with-libaribcaption --with-libmodplug --with-libopenmpt --with-librist --with-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rav1e --with-svt-av1 --with-rtmpdump --with-rubberband --with-two-lame --with-webp --with-xvid --with-zeromq --with-zimg --with-srt --with-libvmaf --with-libxml2 --with-libzvbi --with-aribb24 --with-libbluray --with-libbs2b --with-libcaca --with-libgsm [email protected] --with-speex

and I reinstalled it successfully.

So, I am summarizing how to install FFmpeg on Apple Silicon.

  1. Install Flite
git clone https://github.com/festvox/flite.git
cd flite/
./configure
make
sudo make install
  1. Make there are links.
ln -s /usr/local/lib/libflite* /opt/homebrew/lib/
ln -s /usr/local/include/flite /opt/homebrew/include/flite
  1. Follow Readme
brew install homebrew-ffmpeg/ffmpeg/ffmpeg $(brew options homebrew-ffmpeg/ffmpeg/ffmpeg --compact)

It works for me.

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024 1

Why do you not write a Homebrew formula for Flite?

I am not a maintainer for flite or homebrew core

You have to be neither to do that. Anyone can provide a formula.

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024 1

I will check if it's possible to link against non-Homebrew libraries

It's not supported, but sure, check. The rest of us understand that you cannot maintain a functioning, up-to-date, dependency hierarchy when you start mixing in unmanaged packages.

There is a solution that involves creating a symlink.

monkeying with homebrew and breaking the mechanics is a hack. Not a solution

As said, there is a solution that I'm well aware of is not a reliable one. Please take this kind of demeaning and snarky attitude somewhere else. You're free to not use this option if it doesn't work for you.

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

The exact command you were trying to run:

brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-chromaprint --with-decklink --with-fdk-aac --with-libflite --with-game-music-emu --with-harfbuzz --with-jack --with-jpeg-xl --with-libaribb24 --with-libaribcaption --with-libmodplug --with-libopenmpt --with-librist --with-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rav1e --with-svt-av1 --with-rtmpdump --with-rubberband --with-two-lame --with-webp --with-xvid --with-zeromq --with-zimg --with-srt --with-libvmaf --with-libxml2 --with-libzvbi --with-aribb24 --with-libbluray --with-libbs2b --with-libcaca --with-libgsm [email protected] --with-speex

Why did you set [email protected]?

from homebrew-ffmpeg.

iiiyu avatar iiiyu commented on June 26, 2024

The exact command you were trying to run:
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-chromaprint --with-decklink --with-fdk-aac --with-libflite --with-game-music-emu --with-harfbuzz --with-jack --with-jpeg-xl --with-libaribb24 --with-libaribcaption --with-libmodplug --with-libopenmpt --with-librist --with-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rav1e --with-svt-av1 --with-rtmpdump --with-rubberband --with-two-lame --with-webp --with-xvid --with-zeromq --with-zimg --with-srt --with-libvmaf --with-libxml2 --with-libzvbi --with-aribb24 --with-libbluray --with-libbs2b --with-libcaca --with-libgsm [email protected] --with-speex

Why did you set [email protected]?

Hey @retokromer , thanks for your reply. Actually, I successfully installed it by deleting --with-libflite after I posted this issue. And why did I set [email protected]? I'm not sure. I used brew options homebrew-ffmpeg/ffmpeg/ffmpeg --compact to get it. I believe I might have installed another tool that depends on [email protected], so I have multiple versions of OpenSSL in my system.

Thanks again.

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

Hello @iiiyu : you need to install Flite before running the FFmpeg formula, as indicated in the ReadMe, then it should work fine.

from homebrew-ffmpeg.

iiiyu avatar iiiyu commented on June 26, 2024

Hello @iiiyu : you need to install Flite before running the FFmpeg formula, as indicated in the ReadMe, then it should work fine.

I've been researching for three hours and I can't find a way to install it.

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

If I remember carefully, it’s MacPorts.

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024

I've found a guide here: https://stackoverflow.com/a/61189269/435093 — maybe this works?

from homebrew-ffmpeg.

iiiyu avatar iiiyu commented on June 26, 2024

I've found a guide here: https://stackoverflow.com/a/61189269/435093 — maybe this works?

Hey @slhck In fact, I have already compiled and installed it. But it doesn't seem to be working.
CleanShot 2024-03-18 at 22 47 11

If I remember carefully, it’s MacPorts.

So, it looks like I have to install MacPorts. To be honest, I don't want to install both Homebrew and MacPorts on my computer at the same time.

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024

I have already compiled and installed it

It would be good if you could already provide more background on what you've tried and where you got stuck, to avoid us having to research things that you already know.

Regarding the specific problem, it looks like you already have the library compiled and installed but ffmpeg is not finding it. Per the error message, can you access ffbuild/config.log and show its contents?

So, it looks like I have to install MacPorts. To be honest, I don't want to install both Homebrew and MacPorts on my computer at the same time.

That makes sense. (I mean, not installing both.)

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

So, it looks like I have to install MacPorts. To be honest, I don't want to install both Homebrew and MacPorts on my computer at the same time.

As long as I know, there is no Homebrew formula for Flite.

from homebrew-ffmpeg.

iiiyu avatar iiiyu commented on June 26, 2024

I have already compiled and installed it

It would be good if you could already provide more background on what you've tried and where you got stuck, to avoid us having to research things that you already know.

Regarding the specific problem, it looks like you already have the library compiled and installed but ffmpeg is not finding it. Per the error message, can you access ffbuild/config.log and show its contents?

So, it looks like I have to install MacPorts. To be honest, I don't want to install both Homebrew and MacPorts on my computer at the same time.

That makes sense. (I mean, not installing both.)

Sure, I am glad to provide this log. Where can I find it? ffbuild/config.log

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

I am travelling at the moment. Next weekend I can check what I did, when I added the option. I used it last year with the students (more for fun rather than seriously).

from homebrew-ffmpeg.

iiiyu avatar iiiyu commented on June 26, 2024

I am travelling at the moment. Next weekend I can check what I did, when I added the option. I used it last year with the students (more for fun rather than seriously).

Please enjoy your travelling, I am really thankful for your reply. Actually, I just need fdk-aac at the moment. So, even if my ffmpeg is without libflite, I am good now.

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024

I am afraid I don't know where it is stored exactly; I would expect it to be in the same directory as the last lines from the log: /Users/ewan/Library/Logs/Homebrew/ffmpeg

from homebrew-ffmpeg.

iiiyu avatar iiiyu commented on June 26, 2024

I am afraid I don't know where it is stored exactly; I would expect it to be in the same directory as the last lines from the log: /Users/ewan/Library/Logs/Homebrew/ffmpeg

config.log

I am not good with Clang. Could it be because /usr/local/lib isn’t included in the Clang path when ffmpeg is compiled?

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024

So your Homebrew installation lives in /opt/homebrew (which is where it would typically be under Apple Silicon), and your flite installation is in /usr/local/lib which would be Homebrew's previous location (under x64). Indeed clang can't find the libraries and therefore fails.

Assuming the headers are in /usr/local/include, you should add -I/usr/local/include explicitly to the clang command. Homebrew does not do that on its own, see: https://github.com/orgs/Homebrew/discussions/868

Can you try with:

export CPPFLAGS=-I/usr/local/include"
brew install homebrew-ffmpeg/ffmpeg/ffmpeg  --with-chromaprint --with-decklink --with-fdk-aac --with-libflite --with-game-music-emu --with-harfbuzz --with-jack --with-jpeg-xl --with-libaribb24 --with-libaribcaption --with-libmodplug --with-libopenmpt --with-librist --with-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rav1e --with-svt-av1 --with-rtmpdump --with-rubberband --with-two-lame --with-webp --with-xvid --with-zeromq --with-zimg --with-srt --with-libvmaf --with-libxml2 --with-libzvbi --with-aribb24 --with-libbluray --with-libbs2b --with-libcaca --with-libgsm [email protected] --with-speex

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024

Glad you got it solved. It's certainly not the cleanest solution, and I thought passing the CPPFLAGS would work, but having a symlink in place is surely also works. It's just that if you ever decide to update flite you would need to modify/update the symlinks.

from homebrew-ffmpeg.

iiiyu avatar iiiyu commented on June 26, 2024

Is it possible to update here

args << "--extra-cflags=-I#{HOMEBREW_PREFIX}/include"
args << "--extra-ldflags=-L#{HOMEBREW_PREFIX}/include"

like

--extra-ldflags=-L/first/path -L/second/path -L/opt/homebrew/include

maybe. I am not sure.

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024

No, because we would not want to hardcode other paths into a Formula. What if you wanted to install flite somewhere else? That's where the environment variables would come into play, by passing in the extra include paths to the compiler. I am not sure why they are not working though.

from homebrew-ffmpeg.

iiiyu avatar iiiyu commented on June 26, 2024

No, because we would not want to hardcode other paths into a Formula. What if you wanted to install flite somewhere else? That's where the environment variables would come into play, by passing in the extra include paths to the compiler. I am not sure why they are not working though.

You are right, forget about my dirty solution.

from homebrew-ffmpeg.

exekutive avatar exekutive commented on June 26, 2024

If I remember carefully, it’s MacPorts.

You have tested this? If so I'd love to know how you run both package managers concurrently on a system without conflict, and how you pursuaded HB to use MP packages (or any non-HB packages) as dependencies because HB is definitely not designed to work that way out of the box.

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

You have tested this?

Indeed, my students did it last year. The path issue has already been discussed earlier in this thread. This was just meant as a quick and dirty solution. Yet if this year they are still interested in experimenting text to speech synthesis, then they should compile Flite manually. Note that writing the corresponding Homebrew formula would non be difficult.

from homebrew-ffmpeg.

exekutive avatar exekutive commented on June 26, 2024

I don't think so. Maybe when your students tried, there was a hombrew core formula for flite.
As things are now, the option cannot work as advertised, and certainly not without modification.

the --with-libflite option should be removed from the formula

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

Maybe when your students tried, there was a hombrew core formula for flite.

No, there wasn’t.

the --with-libflite option should be removed from the formula

Why? It was included as option to FFmpeg twelve years ago. I added it here after my last year’s course and I am not going to remove it. You are completely free not to use it.

from homebrew-ffmpeg.

exekutive avatar exekutive commented on June 26, 2024

Because HB does not support non-HB dependencies, thus this is a broken formula.
And because issues like this one exist, and you will get more, since this repository is being suggested all over the internet as solution to the complaints about HB removing options. ffmpeg is a very popular tool. The issue was discussed but not really resolved.
Removing it is simply the right thing to do.

from homebrew-ffmpeg.

slhck avatar slhck commented on June 26, 2024

There is a solution that involves creating a symlink.

I will check if it's possible to link against non-Homebrew libraries that are installed locally. The flag I suggested does not seem to be the right one.

So the option works, but requires some manual changes. In any case the user has to compile the dependency manually. I am against removing the option.

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

Removing it is simply the right thing to do.

No, not at all: it’s part of the official FFmpeg, and we wish to include the option in our Homebrew formula as well. As said, our formula works in different ways, one of them was described in detail above.

Why do you not write a Homebrew formula for Flite? Here in this repository that is out of scope.

from homebrew-ffmpeg.

exekutive avatar exekutive commented on June 26, 2024

I will check if it's possible to link against non-Homebrew libraries

It's not supported, but sure, check. The rest of us understand that you cannot maintain a functioning, up-to-date, dependency hierarchy when you start mixing in unmanaged packages.

There is a solution that involves creating a symlink.

monkeying with homebrew and breaking the mechanics is a hack. Not a solution

from homebrew-ffmpeg.

exekutive avatar exekutive commented on June 26, 2024

Why do you not write a Homebrew formula for Flite?

I am not a maintainer for flite or homebrew core

from homebrew-ffmpeg.

retokromer avatar retokromer commented on June 26, 2024

You're free to not use this option if it doesn't work for you.

Indeed, I already said it above.

from homebrew-ffmpeg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.