Closed Kreeblah closed 1 year ago
This is expected as readline
is keg-only on macOS to avoid conflicting with libedit
that Xcode/CLT already provides.
As pkg-config
notes:
Perhaps you should add the directory containing `readline.pc'
to the PKG_CONFIG_PATH environment variable
This is the same situation for any keg-only formula (e.g. openssl
, icu4c
, ...). See caveats in brew info readline
:
==> Caveats
readline is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides BSD libedit.
For compilers to find readline you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/readline/lib"
export CPPFLAGS="-I/opt/homebrew/opt/readline/include"
For pkg-config to find readline you may need to set:
export PKG_CONFIG_PATH="/opt/homebrew/opt/readline/lib/pkgconfig"
The alternative would be to try to build fluid-synth
with system libedit
instead, but it would depend on how fluid-synth
is using library and the compatibility between GNU's readline
and BSD's libedit
.
Hmmm. I guess I'll take a look at getting an update for the fluid-synth
formula ready to submit, then. Fluidsynth builds and runs just fine with the system libedit
(including passing the same steps as the test in the formula), but it seems to be failing to build when I make what I believe are equivalent changes in the fluid-synth
formula. I'll need to figure out what's going on there.
Thanks!
We can probably fix this by doing something like
inreplace lib/"pkgconfig/fluidsynth.pc",
/^(Requires\.private:.*) readline/,
"\\1 #{Formula["readline"].opt_lib}/pkgconfig/readline.pc"
in the fluid-synth
formula. This way you don't need to set PKG_CONFIG_PATH
to make sure readline
can be found.
I think I'm going to need to reopen this to get some help. I have https://github.com/Kreeblah/homebrew-core/blob/fluid-synth_readline/Formula/fluid-synth.rb checked in to a clone of the repo that matches changes I can make to how I build fluidsynth when I download the code myself. Turns out it builds using the built-in libedit
just fine, and can render the same file used in the formula's test when built that way. So, it seems like readline
isn't required to be installed.
But, for whatever reason, I can't build the fluid-synth
formula (even the version currently in homebrew-core
) since I get the following error whenever I try to run brew install --build-from-source fluid-synth
:
make[2]: *** read jobs pipe: Resource temporarily unavailable. Stop.
I can build other CMake-based formulas just fine, and I can build the fluidsynth CMake project outside of Homebrew, but I'm apparently having environmental issues when building the fluid-synth
formula that I'll need to track down.
So, is there anybody who would be willing to either take a look at my commit or to take a look at @carlocab's suggestion? It'd really be nice to not have to specify PKG_CONFIG_PATH
for things that use sdl2_mixer
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Fixed in #126004.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output" saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
I was trying to build a project that uses
pkg-config
to find dependencies.What happened (include all command output)?
This project built fine up until this commit to the
sdl2_mixer
formula: https://github.com/Homebrew/homebrew-core/commit/e22d6109d1e321659ee5093be91475777cf193c3 Starting with that commit, the code I'm trying to compile no longer does so, even code that compiled fine before. It seems thatpkg-config
can't satisfy all the dependencies forfluidsynth
. In particular, it's complaining about not finding anything forreadline
:What did you expect to happen?
I'd expect that command to output something more like what it does when called for
SDL2
:Step-by-step reproduction instructions (by running
brew
commands)