MantisBT - CMake
View Issue Details
0015027CMake(No Category)public2014-07-16 21:462015-04-06 09:07
Luc J. Bourhis 
Daniele E. Domenichelli 
normalminoralways
closedunable to reproduce 
Apple MacMacOS10.9
CMake 2.8.12.2 
 
0015027: Failure to find GTK
In the process of building cmake on that version of MacOS 10.9, I get the following failures

{{{
CMake Error at Modules/FindGTK2.cmake:181 (file):
file STRINGS file "/Library/Frameworks/Gtk.framework/Headers/gtk/gtk/gtkversion.h" cannot be read.
Call Stack (most recent call first):
Modules/FindGTK2.cmake:796 (_GTK2_GET_VERSION)
Tests/CMakeLists.txt:1197 (find_package)
}}}

There is a file /Library/Frameworks/Gtk.framework/Headers/gtk/gtkversion.h on my system.

1. Install MacPorts
2. Issue "port install cmake"

I was advised by the MacPorts maintainer to report the bug upstream.
No tags attached.
Issue History
2014-07-16 21:46Luc J. BourhisNew Issue
2014-07-17 03:35Daniele E. DomenichelliNote Added: 0036404
2014-07-17 05:42Luc J. BourhisNote Added: 0036405
2014-07-21 07:09Daniele E. DomenichelliNote Added: 0036417
2014-07-21 07:11Daniele E. DomenichelliNote Added: 0036418
2014-07-31 04:51Rolf Eike BeerAssigned To => Daniele E. Domenichelli
2014-07-31 04:51Rolf Eike BeerStatusnew => assigned
2014-07-31 05:04Luc J. BourhisNote Added: 0036514
2014-08-01 10:11Daniele E. DomenichelliNote Added: 0036539
2014-10-29 04:35Daniele E. DomenichelliStatusassigned => feedback
2014-10-29 05:09Luc J. BourhisNote Added: 0037096
2014-10-29 05:09Luc J. BourhisStatusfeedback => assigned
2014-10-29 05:09Luc J. BourhisNote Edited: 0037096bug_revision_view_page.php?bugnote_id=37096#r1601
2014-10-29 06:10Daniele E. DomenichelliNote Added: 0037097
2014-10-29 06:10Daniele E. DomenichelliStatusassigned => resolved
2014-10-29 06:10Daniele E. DomenichelliResolutionopen => unable to reproduce
2015-04-06 09:07Robert MaynardNote Added: 0038433
2015-04-06 09:07Robert MaynardStatusresolved => closed

Notes
(0036404)
Daniele E. Domenichelli   
2014-07-17 03:35   
Just to clarify... It tries to read

  /Library/Frameworks/Gtk.framework/Headers/gtk/gtk/gtkversion.h

but the file on your file system is

  /Library/Frameworks/Gtk.framework/Headers/gtk/gtkversion.h

(/gtk/ instead of /gtk/gtk/), is this correct?
(0036405)
Luc J. Bourhis   
2014-07-17 05:42   
Yes, indeed.
(0036417)
Daniele E. Domenichelli   
2014-07-21 07:09   
I don't understand how this could be happening...

The module does this:

    _GTK2_FIND_INCLUDE_DIR(GTK gtk/gtk.h)
    if(GTK2_GTK_INCLUDE_DIR)
        _GTK2_GET_VERSION(GTK2_MAJOR_VERSION
                          GTK2_MINOR_VERSION
                          GTK2_PATCH_VERSION
                          ${GTK2_GTK_INCLUDE_DIR}/gtk/gtkversion.h)

Can you check if the file gtk.h is in the same directory as gtkversion.h?
(0036418)
Daniele E. Domenichelli   
2014-07-21 07:11   
And by the way, which version of GTK do you have installed, and how did you install it?
(0036514)
Luc J. Bourhis   
2014-07-31 05:04   
Sorry for the late answer but I was on leave.

gtk.h and gtkversion.h are in the dame directory. The latter says 2.14.3

I don't remember how it got installed there unfortunately. I had completely forgotten about it until it broke my MacPorts.
(0036539)
Daniele E. Domenichelli   
2014-08-01 10:11   
Sorry, this doesn't seem something that can happen from the code and I don't have a mac so I cannot reproduce it...

Can anyone else with OSX reproduce it?

@Luc: have you tried to delete the cache and rebuild it? It would be really useful to understand how you did install it, can you please try to find it out? (maybe in your shell history, or in the downloaded files...)
(0037096)
Luc J. Bourhis   
2014-10-29 05:09   
I have the suspicion that the remnant install of cmake in /Library/Frameworks was installed as part of the now defunct project GTK+OSX whose goal was to provide a native port of GTK to OS X at a time when it could only install in the realm of X11. I had experimented with that circa 2009 and I don't see any other alternative explanation. If so, it means it will be very difficult to reproduce the installation of that /Library/Frameworks/Gtk.framework of mine. I don't have the time to hunt in the depth of time to find the GTK+OSX installer to be honest.

In any case, removing that framework solves the problem and I think this is good enough actually if my suspicion is right because my case is definitively a freak. The Macports maintainer had never seen that problem before after all. Thus I'd recommend closing this ticket.

Thank you very much for your time!

(0037097)
Daniele E. Domenichelli   
2014-10-29 06:10   
Thanks for the feedback
(0038433)
Robert Maynard   
2015-04-06 09:07   
Closing resolved issues that have not been updated in more than 4 months.