# Launch error message in Qt5 debug build

**URL:** <https://discourse.slicer.org/t/launch-error-message-in-qt5-debug-build/2039>\
**Category:** Development\
**Created:** [February 6, 2018, 10:53pm UTC](https://discourse.slicer.org/t/launch-error-message-in-qt5-debug-build/2039 "2018-02-06T22:53:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [February 6, 2018, 10:53pm UTC](https://discourse.slicer.org/t/launch-error-message-in-qt5-debug-build/2039/1 "2018-02-06T22:53:19Z")

</div>

Has anyone else seen this, immediately on application launch? Slicer still appears to start ok. Debug build, macOS 10.12, SDK 10.12, Qt5 from upstream. It appeared after the most recent ITK update.

```auto
Error: In /opt/bld/s5nj/ITKv4/Modules/ThirdParty/GDCM/src/gdcm/Source/Common/gdcmSystem.cxx, line 461, function static const char *gdcm::System::GetCurrentProcessFileName()
missing implementation

```

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [February 6, 2018, 10:56pm UTC](https://discourse.slicer.org/t/launch-error-message-in-qt5-debug-build/2039/2 "2018-02-06T22:56:00Z")

</div>

It looks like ITK disables the relevant flag providing the implementation on mac due to linking errors and/or sdk compatibility policy: [https://github.com/InsightSoftwareConsortium/ITK/commit/b853e6ce32676](https://github.com/InsightSoftwareConsortium/ITK/commit/b853e6ce32676) (and a few others).

@jcfr any idea about this, since you were mentioned in that commit?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 6, 2018, 11:48pm UTC](https://discourse.slicer.org/t/launch-error-message-in-qt5-debug-build/2039/3 "2018-02-06T23:48:59Z")

</div>

Yes, I get that same message on my mac builds (Qt4 and Qt5)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [February 7, 2018, 6:46am UTC](https://discourse.slicer.org/t/launch-error-message-in-qt5-debug-build/2039/4 "2018-02-07T06:46:17Z")

</div>

Thanks for reporting the issue, this should be fixed in [r26893](http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=26893)

In ITK, we removed the need to explicitly linking against CoreFoundation library in GDCM to help build python wheels that would work on different version of OSX.

The functions with this dependency were used only in GDCM executables there are not built in ITK. The current error was due to the call to `GlobalInternal::LoadDefaultPaths()` done at load time of the GDCM library … that was adding resources path to a global list. Since these resources path are not useful, we commented to call to `GlobalInternal::LoadDefaultPaths()`.

If in the future, we need to link against the library, GDCM build system could be updated to use `-framework CoreFoundatation` instead of an explicit full path to `/path/to/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/CoreFoundation.framework`.

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [February 7, 2018, 11:47am UTC](https://discourse.slicer.org/t/launch-error-message-in-qt5-debug-build/2039/5 "2018-02-07T11:47:44Z")

</div>

Great, thanks. ITK/GDCM could use `_NSGetExecutablePath()` to do the same thing as the CoreFoundation code is doing, but without SDK pinning (cc @thewtex).
