You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are reporting a bug others will be able to reproduce and not asking a question or requesting software. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh. To get software added or changed in Homebrew please file a Pull Request
ran brew update and can still reproduce the problem?
ran brew doctor, fixed all issues and can still reproduce the problem?
ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
Note: the missing 'x's above are caused by the fact that I don't have a macOS installation handy: I'm experiencing the issue in the context of Travis CI builds, and I don't have CLI access there.
What you were trying to do (and why)
libvirt tries to detect readline availability using pkg-config, and this works on Linux and FreeBSD but not on macOS.
but the termcap.pc is nowhere to be found, so pkg-config reports readline as non-usable.
I believe the problem lies in the fact that readline does not depend on ncurses: readline tries to figure out at configure time what dependencies it needs, and since ncurses is not present in the build environment it ends up picking termcap (possibly from the base system?) and storing that into readline.pc, which ultimately leads to the file not being usable. If ncurses was present at build time, then the file would contain
Requires.private: ncurses
as it does on Linux instead and, since the ncurses package contains a working ncurses.pc file, readline.pc would be usable as well.
Note that I haven't tested any of the above, so it might not be completely accurate :)
An alternative approach would be to do what FreeBSD does and ditch the Requires.private directive altogether:
but it seems to me that depending on ncurses would be a less hacky way to solve the issue.
What happened (include command output)
$ export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"
$ pkg-config --cflags --libs readline
Package termcap was not found in the pkg-config search path.
Perhaps you should add the directory containing `termcap.pc'
to the PKG_CONFIG_PATH environment variable
Package 'termcap', required by 'readline', not found
$
brew install
(orupgrade
,reinstall
) a single, Homebrew/homebrew-core formula (not cask) on macOS? If it's a generalbrew
problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a Linux problem please file this issue at https://github.com/Homebrew/linuxbrew-core/issues/new/choose. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?Note: the missing 'x's above are caused by the fact that I don't have a macOS installation handy: I'm experiencing the issue in the context of Travis CI builds, and I don't have CLI access there.
What you were trying to do (and why)
libvirt tries to detect
readline
availability usingpkg-config
, and this works on Linux and FreeBSD but not on macOS.See it in action:
https://travis-ci.org/andreabolognani/libvirt/jobs/520773233#L1088-L1093
The problem is that the
readline.pc
file containsbut the
termcap.pc
is nowhere to be found, sopkg-config
reportsreadline
as non-usable.I believe the problem lies in the fact that
readline
does not depend onncurses
:readline
tries to figure out atconfigure
time what dependencies it needs, and sincencurses
is not present in the build environment it ends up pickingtermcap
(possibly from the base system?) and storing that intoreadline.pc
, which ultimately leads to the file not being usable. Ifncurses
was present at build time, then the file would containas it does on Linux instead and, since the
ncurses
package contains a workingncurses.pc
file,readline.pc
would be usable as well.Note that I haven't tested any of the above, so it might not be completely accurate :)
An alternative approach would be to do what FreeBSD does and ditch the
Requires.private
directive altogether:https://github.com/freebsd/freebsd-ports/blob/master/devel/readline/Makefile#L42-L44
This will also work, as seen in:
https://travis-ci.org/andreabolognani/libvirt/jobs/520783508#L1092-L1093
but it seems to me that depending on
ncurses
would be a less hacky way to solve the issue.What happened (include command output)
What you expected to happen
Step-by-step reproduction instructions (by running
brew install
commands)The text was updated successfully, but these errors were encountered: