Bug 138655 - REGRESSION(r175930): [GTK] Clean build is broken after r175930
Summary: REGRESSION(r175930): [GTK] Clean build is broken after r175930
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, Regression
Depends on:
Blocks:
 
Reported: 2014-11-12 03:30 PST by Carlos Garcia Campos
Modified: 2017-03-11 11:02 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2014-11-12 03:30:49 PST
I've rolled out r175930 partially, removing the new unit test added to fix the build until we figure out how to properly fit it.
Comment 1 Sergio Villar Senin 2014-11-12 03:32:56 PST
This is the linking error:

lib/../Source/WebCore/CMakeFiles/WebCorePlatformGTK.dir/rendering/RenderThemeGtk.cpp.o: In function `WebCore::RenderThemeGtk::mediaControlsScript()':
RenderThemeGtk.cpp:(.text+0x129a): undefined reference to `WebCore::mediaControlsLocalizedStringsJavaScript'
RenderThemeGtk.cpp:(.text+0x12cc): undefined reference to `WebCore::mediaControlsBaseJavaScript'
RenderThemeGtk.cpp:(.text+0x12e0): undefined reference to `WebCore::mediaControlsGtkJavaScript'
Comment 2 Alberto Garcia 2014-11-17 00:37:08 PST
Is this still valid? I just built webkit from scratch without problems.
Comment 3 Xabier Rodríguez Calvar 2014-11-17 00:46:29 PST
(In reply to comment #2)
> Is this still valid? I just built webkit from scratch without problems.

I'll let him correct me if I am wrong, but I think Carlos reverted the part of the patch causing the regression, so it is still valid because a correct way to link that should be found.
Comment 4 Carlos Garcia Campos 2014-11-17 01:07:44 PST
(In reply to comment #3)
> (In reply to comment #2)
> > Is this still valid? I just built webkit from scratch without problems.
> 
> I'll let him correct me if I am wrong, but I think Carlos reverted the part
> of the patch causing the regression, so it is still valid because a correct
> way to link that should be found.

Correct
Comment 5 Alberto Garcia 2014-11-17 07:14:51 PST
Here's the full log:

g++   -std=c++11 -O3 -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-omit-frame-pointer -fno-tree-dce  -L/usr/local/devel/WebKit/WebKitBuild/DependenciesGTK/Root/lib64 @CMakeFiles/TestWebCore.rsp  -o bin/TestWebKitAPI/WebCore/TestWebCore
lib/libWebCorePlatformGTK.a(lib/../Source/WebCore/CMakeFiles/WebCorePlatformGTK.dir/rendering/RenderThemeGtk.cpp.o):RenderThemeGtk.cpp:function WebCore::RenderThemeGtk::mediaControlsScript(): error: undefined reference to 'WebCore::mediaControlsLocalizedStringsJavaScript'
lib/libWebCorePlatformGTK.a(lib/../Source/WebCore/CMakeFiles/WebCorePlatformGTK.dir/rendering/RenderThemeGtk.cpp.o):RenderThemeGtk.cpp:function WebCore::RenderThemeGtk::mediaControlsScript(): error: undefined reference to 'WebCore::mediaControlsBaseJavaScript'
lib/libWebCorePlatformGTK.a(lib/../Source/WebCore/CMakeFiles/WebCorePlatformGTK.dir/rendering/RenderThemeGtk.cpp.o):RenderThemeGtk.cpp:function WebCore::RenderThemeGtk::mediaControlsScript(): error: undefined reference to 'WebCore::mediaControlsGtkJavaScript'
collect2: error: ld returned 1 exit status

The missing symbols are in lib/libWebCoreGTK.a, however they are not
being found. This seems to have to do with the order in which they
appear in CMakeFiles/TestWebCore.rsp:

[...] lib/libgtest.so lib/libWTFGTK.a lib/libWebCoreGTK.a lib/libWebCorePlatformGTK.a -lgdk-3 [...]

If I put libWebCoreGTK.a _after_ libWebCorePlatformGTK.a those errors
are replaced with a much longer list.

Putting libWebCoreGTK.a before _and_ after libWebCorePlatformGTK.a
makes the problem disappear.
Comment 6 Xabier Rodríguez Calvar 2014-11-18 00:59:50 PST
(In reply to comment #5)
> g++   -std=c++11 -O3 -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti
> -fno-omit-frame-pointer -fno-tree-dce 
> -L/usr/local/devel/WebKit/WebKitBuild/DependenciesGTK/Root/lib64
> @CMakeFiles/TestWebCore.rsp  -o bin/TestWebKitAPI/WebCore/TestWebCore
> lib/libWebCorePlatformGTK.a(lib/../Source/WebCore/CMakeFiles/
> WebCorePlatformGTK.dir/rendering/RenderThemeGtk.cpp.o):RenderThemeGtk.cpp:
> function WebCore::RenderThemeGtk::mediaControlsScript(): error: undefined
> reference to 'WebCore::mediaControlsLocalizedStringsJavaScript'
> lib/libWebCorePlatformGTK.a(lib/../Source/WebCore/CMakeFiles/
> WebCorePlatformGTK.dir/rendering/RenderThemeGtk.cpp.o):RenderThemeGtk.cpp:
> function WebCore::RenderThemeGtk::mediaControlsScript(): error: undefined
> reference to 'WebCore::mediaControlsBaseJavaScript'
> lib/libWebCorePlatformGTK.a(lib/../Source/WebCore/CMakeFiles/
> WebCorePlatformGTK.dir/rendering/RenderThemeGtk.cpp.o):RenderThemeGtk.cpp:
> function WebCore::RenderThemeGtk::mediaControlsScript(): error: undefined
> reference to 'WebCore::mediaControlsGtkJavaScript'
> collect2: error: ld returned 1 exit status
> 
> Putting libWebCoreGTK.a before _and_ after libWebCorePlatformGTK.a
> makes the problem disappear.

Martin, these are the symbols defined in WebCore, but come from the serialization of the scripts defined in PlatformGTK. We tried adding WebCore as direct dependency of the tests, but it didn't work, I don't know why.