Bug 123502

Summary: [GTK] invalid application of 'sizeof' to incomplete type
Product: WebKit Reporter: Emilio Pozuelo Monfort <pochu27>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cgarcia, commit-queue, gustavo, vitaly.katunin, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
config.log of build failing
none
diff to fix build failing
none
Patch
none
Patch none

Description Emilio Pozuelo Monfort 2013-10-30 02:52:27 PDT
Building webkitgtk+ 2.3.1 with GCC 4.8

While compiling Source/WebKit2/Shared/WebKeyboardEvent.cpp I've got:

In file included from ../Source/WebKit2/Shared/WebCoreArgumentCoders.h:29:0,
                 from ../Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:27:
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h: In instantiation of 'static void CoreIPC::SimpleArgumentCoder<T>::encode(CoreIPC::ArgumentEncoder&, const T&) [with T = WebCore::TransformationMatrix]':
../Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:77:48:   required from here
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h:42:83: error: invalid application of 'sizeof' to incomplete type 'WebCore::TransformationMatrix'
         encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(&t), sizeof(T), __alignof(T));
                                                                                   ^
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h:42:100: error: invalid application of '__alignof__' to incomplete type 'WebCore::TransformationMatrix'
         encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(&t), sizeof(T), __alignof(T));
                                                                                                    ^
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h: In instantiation of 'static bool CoreIPC::SimpleArgumentCoder<T>::decode(CoreIPC::ArgumentDecoder&, T&) [with T = WebCore::TransformationMatrix]':
../Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:82:55:   required from here
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h:47:84: error: invalid application of 'sizeof' to incomplete type 'WebCore::TransformationMatrix'
         return decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(&t), sizeof(T), __alignof(T));
                                                                                    ^
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h:47:101: error: invalid application of '__alignof__' to incomplete type 'WebCore::TransformationMatrix'
         return decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(&t), sizeof(T), __alignof(T));
                                                                                                     ^
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h: In instantiation of 'static void CoreIPC::SimpleArgumentCoder<T>::encode(CoreIPC::ArgumentEncoder&, const T&) [with T = WebCore::FloatPoint3D]':
../Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:99:40:   required from here
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h:42:83: error: invalid application of 'sizeof' to incomplete type 'WebCore::FloatPoint3D'
         encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(&t), sizeof(T), __alignof(T));
                                                                                   ^
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h:42:100: error: invalid application of '__alignof__' to incomplete type 'WebCore::FloatPoint3D'
         encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(&t), sizeof(T), __alignof(T));
                                                                                                    ^
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h: In instantiation of 'static bool CoreIPC::SimpleArgumentCoder<T>::decode(CoreIPC::ArgumentDecoder&, T&) [with T = WebCore::FloatPoint3D]':
../Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:104:47:   required from here
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h:47:84: error: invalid application of 'sizeof' to incomplete type 'WebCore::FloatPoint3D'
         return decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(&t), sizeof(T), __alignof(T));
                                                                                    ^
../Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h:47:101: error: invalid application of '__alignof__' to incomplete type 'WebCore::FloatPoint3D'
         return decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(&t), sizeof(T), __alignof(T));
                                                                                                     ^
Comment 1 Zan Dobersek 2013-10-31 01:35:17 PDT
Can you please attach the config.log file?
Comment 2 Vitaly Katunin 2013-10-31 02:42:15 PDT
Created attachment 215637 [details]
config.log of build failing

Hi Zan!

I have the same problem on my machine.
Could you please see my config.log.

Br,
Vitaly
Comment 3 Vitaly Katunin 2013-10-31 02:47:25 PDT
Created attachment 215639 [details]
diff to fix build failing

Zan,

this patch fixes the build problem.
Please review it.

Br,
Vitaly
Comment 4 WebKit Commit Bot 2013-10-31 02:49:11 PDT
Attachment 215639 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/Shared/WebCoreArgumentCoders.cpp']" exit_code: 1
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:56:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 1 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Zan Dobersek 2013-10-31 03:33:01 PDT
The patch looks OK, but requires a ChangeLog entry. The style error should also be addressed.
More on what tools to use to produce the ChangeLog here: http://www.webkit.org/coding/contributing.html
Comment 6 Vitaly Katunin 2013-10-31 05:16:31 PDT
Created attachment 215644 [details]
Patch
Comment 7 Carlos Garcia Campos 2013-10-31 06:13:37 PDT
Comment on attachment 215644 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215644&action=review

> Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:28
> +#include <WebCore/TransformationMatrix.h>

I think this should be added below, not here, right after #include <WebCore/TextCheckerClient.h>
Comment 8 Vitaly Katunin 2013-10-31 06:16:56 PDT
Created attachment 215647 [details]
Patch
Comment 9 Vitaly Katunin 2013-10-31 06:18:33 PDT
(In reply to comment #7)
Carlos,

thank you for review. Done.

> (From update of attachment 215644 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=215644&action=review
> 
> > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:28
> > +#include <WebCore/TransformationMatrix.h>
> 
> I think this should be added below, not here, right after #include <WebCore/TextCheckerClient.h>
Comment 10 Vitaly Katunin 2013-10-31 07:17:51 PDT
Gentlemen,

can anybody with commit-privileges commit changes?
Thanks in advance!

Br, 
Vitaly
Comment 11 WebKit Commit Bot 2013-11-02 03:08:45 PDT
Comment on attachment 215647 [details]
Patch

Clearing flags on attachment: 215647

Committed r158486: <http://trac.webkit.org/changeset/158486>
Comment 12 WebKit Commit Bot 2013-11-02 03:08:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Csaba Osztrogonác 2013-11-05 09:13:39 PST
Comment on attachment 215639 [details]
diff to fix build failing

Cleared review? from attachment 215639 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).