Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk{2,3}-x11 fails to build on Darwin #61891

Closed
smaret opened this issue May 22, 2019 · 4 comments · Fixed by #61912
Closed

gtk{2,3}-x11 fails to build on Darwin #61891

smaret opened this issue May 22, 2019 · 4 comments · Fixed by #61912

Comments

@smaret
Copy link
Member

smaret commented May 22, 2019

Issue description

gtk{2,3}-x11 fails to build on Darwin with the following message:

checking for CAIRO_BACKEND... no
configure: error: Package requirements (cairo-xlib >= 1.6) were not met:

No package 'cairo-xlib' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CAIRO_BACKEND_CFLAGS
and CAIRO_BACKEND_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
builder for '/nix/store/dnay7nf0f9g6kli435ibgx8ic5yym67l-gtk+-2.24.32.drv' failed with exit code 1
error: build of '/nix/store/dnay7nf0f9g6kli435ibgx8ic5yym67l-gtk+-2.24.32.drv' failed

Last successful evaluation on Hydra was on April 20.

Steps to reproduce

% nix-build -I. -A gtk2-x11

Technical details

  • system: "x86_64-darwin"
  • host os: Darwin 18.6.0, macOS 10.14.5
  • multi-user?: no
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • channels(smaret): "nixpkgs-19.03pre170546.0f43790d2ce"
  • nixpkgs: /nix/store/381kbvy7byjv28l0knxb3s4g9mdmjwi7-master.tar.gz
@matthewbauer
Copy link
Member

Probably caused by b7a41a2

smaret added a commit to smaret/nixpkgs that referenced this issue May 22, 2019
On Darwin cairo does not have X11 support enabled by default, but
gtk{2,3}-x11 requires it. Force gtk{2,3}-x11 to be built against cairo
with X11 support enabled. Fixes NixOS#61891.
@dhruvio
Copy link
Contributor

dhruvio commented May 24, 2019

FYI, I'm still having issues with this, but it may be due to the merged changes from yesterday not yet being available in unstable.

My problem arose from using vim_configurable because it depends on gtk{2,3}. However, it is possible to work around this by eliminating the gtk dependency by overriding the guiSupport parameter. This was useful for me because I use vim from a terminal. See snippet below:

# with gtk{2,3} (old way):
pkgs.vim_configurable.customize { /*...*/ }
# without gtk{2,3} (workaround):
let
overridden = pkgs.vim_confirgurable.override { guiSupport = "false"; };
in
overridden.customize { /*...*/ }

@smaret
Copy link
Member Author

smaret commented May 24, 2019

@dhruvio I’ve made another fix in gtk{2,3}-x11 (#61942). Maybe it solves your problem with vim-configurable? If not then I would suggest that you open a new issue that describes it.

@dhruvio
Copy link
Contributor

dhruvio commented May 24, 2019

Looks like it's still not working on macOS without the workaround. I think the problem has to do with the way the vim_configurable package was defined. I'll create another ticket. Thanks @smaret

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants