Closed samwightt closed 3 years ago
Are you using the latest Homebrew and macOS?
Yep! I'm on the latest version of Homebrew and of the macOS Big Sur beta.
Does this reproduce with the Ruby installed Homebrew?
PATH=$(brew --prefix ruby)/bin:$PATH gem install rcairo
I'm having the same issue with a M1 Mac on Big Sur 11.2.3.
checking for GCC... -------------------- yes
"clang -o conftest -I/Users/evan/.rbenv/versions/2.6.6/include/ruby-2.6.0/-darwin20 -I/Users/evan/.rbenv/versions/2.6.6/include/ruby-2.6.0/ruby/backward -I/Users/evan/.rbenv/versions/2.6.6/include/ruby-2.6.0 -I. -I/Users/evan/.rbenv/versions/2.6.6/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -Wno-error=implicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/evan/.rbenv/versions/2.6.6/lib -L. -L/Users/evan/.rbenv/versions/2.6.6/lib -fstack-protector-strong -lruby.2.6 "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"clang -I/Users/evan/.rbenv/versions/2.6.6/include/ruby-2.6.0/-darwin20 -I/Users/evan/.rbenv/versions/2.6.6/include/ruby-2.6.0/ruby/backward -I/Users/evan/.rbenv/versions/2.6.6/include/ruby-2.6.0 -I. -I/Users/evan/.rbenv/versions/2.6.6/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -Wno-error=implicit-function-declaration -fno-common -pipe -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: #ifndef __GNUC__
5: # error
6: |:/ === __GNUC__ undefined === /:|
7: #endif
/* end */
--------------------
checking for Homebrew... -------------------- yes
--------------------
have_package: checking for cairo version (>= 1.2.0)... -------------------- yes
--------------------
Could you try the latest pkg-config
gem?
See also: #69
No luck.
which pkg-config /opt/homebrew/bin/pkg-config
pkg-config --debug --list-all https://gist.github.com/ChickenBeard/c67512001685f93ab218f5cb70c33418
pkg-config --debug --cflags --libs cairo https://gist.github.com/ChickenBeard/7f9782f7726ce1933a476a9a0ae2c5fd
pkg-config --debug --modversion cairo https://gist.github.com/ChickenBeard/36850af23be0e3201d37dedc2aca9ada
pkg-config --debug --cflags --libs expat https://gist.github.com/ChickenBeard/43087366949c6b511a1d137f1f929cf0
Could you show gem install cairo
output?
Building native extensions. This could take a while...
ERROR: Error installing cairo:
ERROR: Failed to build gem native extension.
current directory: /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/cairo-1.17.5/ext/cairo
/Users/evan/.rbenv/versions/2.6.6/bin/ruby -I /Users/evan/.rbenv/versions/2.6.6/lib/ruby/site_ruby/2.6.0 -r ./siteconf20210411-31069-1jjfsg1.rb extconf.rb
checking for GCC... yes
checking for Homebrew... yes
checking for cairo version (>= 1.2.0)... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/evan/.rbenv/versions/2.6.6/bin/$(RUBY_BASE_NAME)
--with-pkg-config
--without-pkg-config
--with-override-variables
--without-override-variables
/Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:389:in `parse_pc': .pc doesn't exist: <xproto> (PackageConfig::NotFoundError)
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:233:in `declaration'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:178:in `requires_private'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:508:in `block in all_required_packages'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:259:in `collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:265:in `block in collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:260:in `each'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:260:in `collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:265:in `block in collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:260:in `each'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:260:in `collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:265:in `block in collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:260:in `each'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:260:in `collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:265:in `block in collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:260:in `each'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:260:in `collect_requires'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:507:in `all_required_packages'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:283:in `collect_cflags'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:191:in `cflags_only_other'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:568:in `cflags_only_other'
from /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pkg-config-1.4.5/lib/pkg-config.rb:615:in `have_package'
from extconf.rb:42:in `required_pkg_config_package'
from extconf.rb:50:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/extensions/-darwin-20/2.6.0/cairo-1.17.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/cairo-1.17.5 for inspection.
Results logged to /Users/evan/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/extensions/-darwin-20/2.6.0/cairo-1.17.5/gem_make.out
Could you show the output of ruby -rpp -r pkg-config -e 'pp PackageConfig.new("xproto")'
?
#<PackageConfig:0x00000001520ea468
@declarations=nil,
@msvc_syntax=nil,
@name="xproto",
@options={},
@override_variables={},
@path_position=nil,
@paths=
["/opt/homebrew/lib/pkgconfig",
"/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/11",
"/usr/local/lib/pkgconfig",
"/usr/lib/pkgconfig"],
@pc_path=nil,
@variables=nil>
Thanks. Could you try pkg-config 1.4.6?
Huzzah! gem install pkg-config
moved it up to 1.4.6
Then gem install cairo
worked like a charm.
Finally, gem install gtk3
worked
When I try running the following:
gem install cairo
I get the following output:
The
mkmf.log
file contains the following:No idea what would cause this issue. Xcode CLI tools are updated and Cairo was installed successfully using brew. Ruby 2.5.8 was installed with RVM. Any idea on how to fix this?