<div dir="ltr"><div><div><div>Hi there,<br></div>looks like the problem was unrelated to VTK or Qt themselves, but to the way we were trying to create the OS X bundle through our CMakeLists.<br><br></div><div>Attached is a CMakeLists that should solve the issue.<br></div><div><br></div>Please note that you will need to change the {VTK_BIN_PATH} for the location where your VTK binaries reside, for example<br>/Users/your_username/Development/Binaries/VTK6/bin<br><br></div>HTH,<br>JON HAITZ<br clear="all"><div><div><div><div><div class="gmail_extra"><div><div><div dir="ltr"><table align="center" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td><br></td></tr><tr><td><br></td></tr></tbody></table></div></div></div>
<br><div class="gmail_quote">On 15 December 2014 at 12:18, Jon Haitz Legarreta <span dir="ltr"><<a href="mailto:jhlegarreta@vicomtech.org" target="_blank">jhlegarreta@vicomtech.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi there,<br>we are having some trouble when trying to create an OS X bundle of an imaging software of our own that uses ITK, VTK and Qt.<br><br>We are using VTK 6.1.0 and Qt 5.3.2. And our OS X is Yosemite (10.10).<br><br>In order to track the problem down, we tried to generate such a bundle for one of the examples of VTK that uses Qt: QtVTKRenderWindows.<br><br>The modified CMakeLists.txt is attached.<br><br>We found that there seems to be a bug filed in kitware's CMake project in mantis [1]. It dates back to 2013. It seems to be still open.<br><br>I am posting below the errors we get when trying to run our *.app just in case they are of any help.<br><br><br>Is this a problem strictly related to CMake, or either VTK or either Qt for OS X platforms?<br><br><br></div>Does anybody know how to solve this issue?<br><br><div><br>Thank you,<br>JON HAITZ<br><br><br><br><br><br>[1] <a href="http://public.kitware.com/Bug/view.php?id=14365" target="_blank">http://public.kitware.com/Bug/view.php?id=14365</a><br><br>[-] Error trace:<br><br>When executing the *.app, the application crashes, and OS X's crash report shows this message (this is just the beginning):<br><br><span style="font-family:monospace">Process: QtVTKRenderWindows [17872]<br>Path: /Users/USER/Desktop/QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows<br>Identifier: QtVTKRenderWindows<br>Version: ??? (???)<br>Code Type: X86-64 (Native)<br>Parent Process: ??? [1]<br>Responsible: QtVTKRenderWindows [17872]<br>User ID: 501<br>Date/Time: 2014-12-15 10:30:23.381 +0100<br>OS Version: Mac OS X 10.10.1 (14B25)<br>Report Version: 11<br>Anonymous UUID: E9092016-A746-70A3-34F4-DC5791286273<br>Sleep/Wake UUID: BAEA81DE-427D-44D8-BA6D-0189EBDA3FFD<br>Time Awake Since Boot: 42000 seconds<br>Time Since Wake: 5500 seconds<br>Crashed Thread: 0 Dispatch queue: com.apple.main-thread<br>Exception Type: EXC_CRASH (SIGABRT)<br>Exception Codes: 0x0000000000000000, 0x0000000000000000<br>Application Specific Information:<br>abort() called<br>Thread 0 Crashed:: Dispatch queue: com.apple.main-thread<br>0 libsystem_kernel.dylib 0x00007fff89fc9282 __pthread_kill + 10<br>1 libsystem_c.dylib 0x00007fff8f9bab73 abort + 129<br>2 QtCore 0x00000001084a6649 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9<br>3 QtCore 0x00000001084a7af1 QMessageLogger::fatal(char const*, ...) const + 161<br>4 QtGui 0x0000000108ade948 QGuiApplicationPrivate::createPlatformIntegration() + 5672<br>5 QtGui 0x0000000108ade96b QGuiApplicationPrivate::createEventDispatcher() + 27<br>6 QtCore 0x00000001086ccc41 QCoreApplication::init() + 113<br>7 QtCore 0x00000001086ccbb7 QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39<br>8 QtGui 0x0000000108adc08e QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14<br>9 QtWidgets 0x0000000109085aae QApplication::QApplication(int&, char**, int) + 206<br>10 0x0000000106c06c2c main + 60<br>11 libdyld.dylib 0x00007fff948c85c9 start + 1</span><br><br><br><br>If we try to execute the *.app from the command line, the error displayed reads:<br><br><span style="font-family:monospace">MAC0001-D:Desktop usuario$ open QtVTKRenderWindows.app<br>LSOpenURLsWithRole() failed with error -10810 for the file /Users/usuario/Desktop/QtVTKRenderWindows.app.<br>MAC0001-D:Desktop usuario$ QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows <br>This application failed to start because it could not find or load the Qt platform plugin "cocoa".<br><br>Reinstalling the application may fix this problem.<br>Abort trap: 6<br></span><br><div><div><div dir="ltr"><table align="center" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td><br></td></tr><tr><td><table align="center" border="0" cellpadding="0"><tbody><tr><td></td></tr></tbody></table></td></tr></tbody></table></div></div></div>
</div></div>
</blockquote></div></div></div></div></div></div></div>