Opened 9 years ago

Closed 9 years ago

#331 closed defect (fixed)

Log is blank if build libraries missing with Qt GUI

Reported by: Tom Goddard Owned by: Eric Pettersen
Priority: major Milestone:
Component: Window Toolkit Version:
Keywords: Cc: gregc@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

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.

Change History (1)

comment:1 by Eric Pettersen, 9 years ago

Resolution: fixed
Status: newclosed

Fixed by setting DYLD_FRAMEWORK_PATH. Not sure if it's the best fix. Works though.

Note: See TracTickets for help on using tickets.