<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Debug build fails to link due to missing implementation of WebCore::Frame::isMainFrame()"
   href="https://bugs.webkit.org/show_bug.cgi?id=153719">153719</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Debug build fails to link due to missing implementation of WebCore::Frame::isMainFrame()
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebCore Misc.
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jeremyhu&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When building the debug configuration, libwebkit2gtk fails to link with:

:info:build Undefined symbols for architecture x86_64:
:info:build   &quot;WebCore::Frame::isMainFrame() const&quot;, referenced from:
:info:build       WebCore::printRenderTreeForLiveDocuments() in libWebCoreGTK.a(RenderObject.cpp.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [lib/libwebkit2gtk-4.0.37.13.1.dylib] Error 1

The function is only present in debug builds, so it's certainly no surprise that the release build compiles fine:

#ifndef NDEBUG
void printRenderTreeForLiveDocuments()
{
    for (const auto* document : Document::allDocuments()) {
        if (!document-&gt;renderView() || document-&gt;inPageCache())
            continue;
        if (document-&gt;frame() &amp;&amp; document-&gt;frame()-&gt;isMainFrame())
            fprintf(stderr, &quot;----------------------main frame--------------------------\n&quot;);
        fprintf(stderr, &quot;%s&quot;, document-&gt;url().string().utf8().data());
        showRenderTree(document-&gt;renderView());
    }
}
#endif
} // namespace WebCore

This was observed on OSX with webkitgtk-2.11.4 configured as:
cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH=&quot;/opt/local;/usr&quot; -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DPORT=GTK -DUSE_SYSTEM_MALLOC=ON -DENABLE_MINIBROWSER=OFF -DENABLE_VIDEO=ON -DENABLE_INTROSPECTION=OFF -DLLVM_CONFIG_EXE=/opt/local/bin/llvm-config-mp-3.7 -DENABLE_QUARTZ_TARGET=OFF -DENABLE_X11_TARGET=ON -DENABLE_OPENGL=ON -DENABLE_PLUGIN_PROCESS_GTK2=ON -DCMAKE_C_FLAGS_RELEASE=&quot;-DNDEBUG&quot; -DCMAKE_CXX_FLAGS_RELEASE=&quot;-DNDEBUG&quot; -DCMAKE_OSX_ARCHITECTURES=&quot;x86_64&quot; -DCMAKE_OSX_DEPLOYMENT_TARGET=&quot;10.11&quot; -DCMAKE_OSX_SYSROOT=&quot;/&quot;</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>