<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@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jeremyhu@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 "WebCore::Frame::isMainFrame() const", 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->renderView() || document->inPageCache())
continue;
if (document->frame() && document->frame()->isMainFrame())
fprintf(stderr, "----------------------main frame--------------------------\n");
fprintf(stderr, "%s", document->url().string().utf8().data());
showRenderTree(document->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="/opt/local;/usr" -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="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.11" -DCMAKE_OSX_SYSROOT="/"</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>