﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
331	Log is blank if build libraries missing with Qt GUI	Tom Goddard	Eric Pettersen	"On the Mac the log is blank after starting ChimeraX because Qt fails to start the separate process QtWebEngineProces because it can't find the Qt frameworks.  This only happens if the build directories are gone, apparently the installed ChimeraX uses the build frameworks:

$ cx
dyld: Library not loaded: @rpath/QtWebEngineCore.framework/Versions/5/QtWebEngineCore
  Referenced from: /Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
  Reason: image not found

This starts ChimeraX successfully by the log remains always blank.  This happened when I copied the ChimeraX.app from my build machine to my laptop which does not have the build files.  Looking at the rpath fo QtWebEngineProcess shows that it is pointing to the build directories.

$ otool -l /Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess:
...
Load command 23
          cmd LC_RPATH
      cmdsize 64
         path @loader_path/../../../../../../../../Frameworks (offset 12)
Load command 24
          cmd LC_RPATH
      cmdsize 56
         path /Users/goddard/ucsf/chimerax/build/lib (offset 12)

This is fixed if I change the rpath in the QtWebEngineProcess executable:

$ install_name_tool -rpath /Users/goddard/ucsf/chimerax/build/lib /Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/lib /Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess

Something like this should go in our install Makefile but it needs a relative path.  I tried

 install_name_tool -rpath /Users/goddard/ucsf/chimerax/build/lib @executable_path/../../../../.. /Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess

but it did not work giving the same runtime loader error.  Not sure what the correct RPATH is.
"	defect	closed	major		Window Toolkit		fixed		gregc@…				all	ChimeraX
