Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

OSX Yosemite 10.10.2 + Homebrew #114

Open
ckhk212 opened this issue Mar 28, 2015 · 6 comments
Open

OSX Yosemite 10.10.2 + Homebrew #114

ckhk212 opened this issue Mar 28, 2015 · 6 comments

Comments

@ckhk212
Copy link

ckhk212 commented Mar 28, 2015

I am trying to install this, and I ran into the following issue regardless pkg-config gtk+-2.0 --cflags seems to execute correctly. According to the install_macos.txt, I still need to "force to link with the new cairo library". Is it still true?

I saw the following

Checking your configuration.

OCaml (the wonderful language) is present.
make (gnu version) is present.
Configuring ocamlgtk (see /tmp/ocamlgtk.log).
configure: error: GTK+ is required
Configuring ocamlcairo (see /tmp/ocamlcairo.log).
configure: error: Package requirements (cairo >= 1.2 freetype2) were not met:

Package 'xcb-shm', required by 'cairo', not 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_CFLAGS
and CAIRO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


pfff target prefix: /usr/local (you can use --prefix to override it)
Generating Makefile.config (VISUAL=0, BYTECODE=1, CMT=0) (see also configure --help)
Generating commons/features.ml
Generating globals/config_pfff.ml
!!Problems during ./configure!!

----------------------------------------------------------------------
!!!! You can try to compile and test pfff, 
but some features or plugins may be missing. !!!!

We have found 2 missing packages. 
Have a look at the install_xxx.txt corresponding to your OS. 


To compile pfff type:
  $ make depend
  $ make 
Then, to test pfff simply type:
  $ ./pfff -dump_php demos/foo.php

If you want to use the analysis framework and code visualization tools
see install.txt or type ./configure --help

Then I export PKG_CONFIG_PATH with the new path

export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/opt/libpng/lib/pkgconfig
echo $PKG_CONFIG_PATH
/opt/X11/lib/pkgconfig:/usr/local/opt/libpng/lib/pkgconfig

pkg-config gtk+-2.0 --cflags execute correctly

pkg-config gtk+-2.0 --cflags
-D_REENTRANT -I/opt/X11/include/cairo -I/opt/X11/include/pixman-1 -I/opt/X11/include/libpng15 -I/opt/X11/include -I/opt/X11/include/freetype2 -I/usr/local/Cellar/libpng/1.6.16/include/libpng16 -I/usr/local/Cellar/gtk+/2.24.25/include/gtk-2.0 -I/usr/local/Cellar/gtk+/2.24.25/lib/gtk-2.0/include -I/usr/local/Cellar/pango/1.36.8/include/pango-1.0 -I/usr/local/Cellar/atk/2.14.0/include/atk-1.0 -I/usr/local/Cellar/gdk-pixbuf/2.30.8/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/pango/1.36.8/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/0.9.38/include/harfbuzz -I/usr/local/Cellar/pango/1.36.8/include/pango-1.0 -I/usr/local/Cellar/glib/2.42.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.42.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include 

But Package 'xcb-shm', required by 'cairo', not found remains

@phooji
Copy link
Contributor

phooji commented Apr 8, 2015

I'm not familiar with that particular bit of the codebase; @aryx ?

@aryx
Copy link
Contributor

aryx commented Apr 14, 2015

Can you copy paste the /tmp/ocamlcairo.log file.

My recent experience compiling pfff with macos is written in install_macos.txt. I had
problems with old version of MacOS and recent version of brew, but recent version of MacOS (Yosemite) and recent version of xquartz and brew should work fine.

@ckhk212
Copy link
Author

ckhk212 commented Apr 14, 2015

@aryx Thanks for your help, here is what I have under /tmp/ocamlcairo.log

checking for ocamlc... ocamlc
OCaml version is 4.02.1
OCaml library path is /usr/local/lib/ocaml
checking for ocamlopt... ocamlopt
checking for ocamlc.opt... ocamlc.opt
checking for ocamlopt.opt... ocamlopt.opt
checking for ocamldep... ocamldep
checking for ocamlmktop... ocamlmktop
checking for ocamlmklib... ocamlmklib
checking for ocamldoc... ocamldoc
OCaml uses clang to compile C files
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for CAIRO... 

I've tried re-intall the following:
$ brew reinstall objective-caml camlp4
$ brew reinstall gtk+
$ brew reinstall cairo
$ brew reinstall swi-prolog

Then I ran $ ./configure

And I get this:

Checking your configuration.

OCaml (the wonderful language) is present.
make (gnu version) is present.
Configuring ocamlgtk (see /tmp/ocamlgtk.log).
configure: error: GTK+ is required
Configuring ocamlcairo (see /tmp/ocamlcairo.log).
configure: error: Package requirements (cairo >= 1.2 freetype2) were not met:

Package 'xcb-shm', required by 'cairo', not 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_CFLAGS
and CAIRO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


pfff target prefix: /usr/local (you can use --prefix to override it)
Generating Makefile.config (VISUAL=0, BYTECODE=1, CMT=0) (see also configure --help)
Generating commons/features.ml
Generating globals/config_pfff.ml
!!Problems during ./configure!!

----------------------------------------------------------------------
!!!! You can try to compile and test pfff, 
but some features or plugins may be missing. !!!!

We have found 2 missing packages. 
Have a look at the install_xxx.txt corresponding to your OS. 


To compile pfff type:
  $ make depend
  $ make 

Then, to test pfff simply type:
  $ ./pfff -dump_php demos/foo.php

If you want to use the analysis framework and code visualization tools
see install.txt or type ./configure --help

Installed specs:
MacOS 10.10.3
Homebrew 0.9.5

@aryx
Copy link
Contributor

aryx commented Apr 16, 2015

I've put precompiled binaries of pfff here: https://github.com/aryx/pfff-binaries/tree/master/mac

can you let me know if they work? Or does it say that a library is not present?

@ckhk212
Copy link
Author

ckhk212 commented Apr 16, 2015

O awesome. IT works! 👏 Thanks @aryx Now I need to figure out how to use them properly! 😏

@ghost
Copy link

ghost commented Aug 4, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

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

No branches or pull requests

3 participants