Bug 144902

Summary: [GTK][CMake] Make install fails when using ninja and configure is regenerated
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, kfunk, mario, mcatanzaro, mrobinson, svillar
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Script for installing WebKitGtk+ none

Description Carlos Garcia Campos 2015-05-11 23:31:33 PDT
[6/6] Install the project...
FAILED: cd WebKitBuild/Release && /usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /home/cgarcia/gnome/lib64/pkgconfig/javascriptcoregtk-3.0.pc
-- Installing: /home/cgarcia/gnome/include/webkitgtk-3.0/JavaScriptCore/JavaScript.h
-- Installing: /home/cgarcia/gnome/include/webkitgtk-3.0/JavaScriptCore/JSBase.h
-- Installing: /home/cgarcia/gnome/include/webkitgtk-3.0/JavaScriptCore/JSContextRef.h
-- Installing: /home/cgarcia/gnome/include/webkitgtk-3.0/JavaScriptCore/JSObjectRef.h
-- Installing: /home/cgarcia/gnome/include/webkitgtk-3.0/JavaScriptCore/JSStringRef.h
-- Installing: /home/cgarcia/gnome/include/webkitgtk-3.0/JavaScriptCore/JSValueRef.h
-- Installing: /home/cgarcia/gnome/include/webkitgtk-3.0/JavaScriptCore/WebKitAvailability.h
-- Installing: /home/cgarcia/gnome/share/gir-1.0/JavaScriptCore-3.0.gir
-- Installing: /home/cgarcia/gnome/lib64/girepository-1.0/JavaScriptCore-3.0.typelib
CMake Error at Source/JavaScriptCore/cmake_install.cmake:92 (FILE):
  file INSTALL cannot find
Call Stack (most recent call first):
  Source/cmake_install.cmake:38 (INCLUDE)
  cmake_install.cmake:37 (INCLUDE)

ninja: build stopped: subcommand failed.
[reply] [-] Comment 21

I'm not even sure this is a WebKit bug, I think it's something related with the ninja generator of CMake, but I'm not sure either if it happens when not using ninja, though. What I've noticed is that it always works after a clean build, and also after incremental builds unless any of the incremental builds changes something in cmake and the configure is run again. 
The problem seems to be that the cmake_install.cmake files are re-generated differently, as if the project was built without the RPATH support and install needed to re-link binaries before copying them. But the project is built with RPATH support, and install should not relink, but just remove the RPATH from the binaries before copying them.
Comment 1 Sergio Villar Senin 2016-08-02 02:27:47 PDT
I've just hit this one
Comment 2 Sergio Villar Senin 2016-08-02 02:29:10 PDT
What I did was an incremental build with a different prefix passed to build-webkit.
Comment 3 Sergio Villar Senin 2016-11-10 02:30:25 PST
Created attachment 294354 [details]
Script for installing WebKitGtk+
Comment 4 Sergio Villar Senin 2016-11-10 02:31:49 PST
After wasting a lot of time every time I wanted to install webkit I decided to simply put all the commands in one script and run it.

I have honestly no idea about CMake machinery so I don't know how to fix the install but I'm sure that the script will help experts to tackle the existing issues.