WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 133430
133400
Buildfix on Linux, uint64_t and unsigned long conflict
https://bugs.webkit.org/show_bug.cgi?id=133400
Summary
Buildfix on Linux, uint64_t and unsigned long conflict
Zsolt Borbely
Reported
2014-05-30 01:38:10 PDT
$ Tools/Scripts/build-webkit --efl --web-replay ... In file included from /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.cpp:29:0: /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:159:19: error: redefinition of 'struct JSC::EncodingTraits<long unsigned int>' /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:158:19: error: previous definition of 'struct JSC::EncodingTraits<long unsigned int>' /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.cpp:93:25: error: redefinition of 'static JSC::EncodedValue JSC::ScalarEncodingTraits<T>::encodeValue(const DecodedType&) [with T = long unsigned int; JSC::ScalarEncodingTraits<T>::DecodedType = long unsigned int]' /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.cpp:88:25: error: 'static JSC::EncodedValue JSC::ScalarEncodingTraits<T>::encodeValue(const DecodedType&) [with T = long unsigned int; JSC::ScalarEncodingTraits<T>::DecodedType = long unsigned int]' previously declared here /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.cpp:161:26: error: redefinition of 'T JSC::EncodedValue::convertTo() [with T = long unsigned int]' /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.cpp:152:21: error: 'T JSC::EncodedValue::convertTo() [with T = long unsigned int]' previously declared here In file included from /home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/JavaScriptCore/JSReplayInputs.h:34:0, from /home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/JavaScriptCore/JSReplayInputs.cpp:31: /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:159:19: error: redefinition of 'struct JSC::EncodingTraits<long unsigned int>' /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:158:19: error: previous definition of 'struct JSC::EncodingTraits<long unsigned int>' In file included from /home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/JavaScriptCore/JSReplayInputs.h:34:0, from /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/runtime/DateConstructor.cpp:40: /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:159:19: error: redefinition of 'struct JSC::EncodingTraits<long unsigned int>' /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:158:19: error: previous definition of 'struct JSC::EncodingTraits<long unsigned int>' In file included from /home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/JavaScriptCore/JSReplayInputs.h:34:0, from /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/runtime/JSGlobalObject.cpp:135: /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:159:19: error: redefinition of 'struct JSC::EncodingTraits<long unsigned int>' /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:158:19: error: previous definition of 'struct JSC::EncodingTraits<long unsigned int>'
Attachments
Proposed patch
(2.67 KB, patch)
2014-05-30 01:43 PDT
,
Zsolt Borbely
andersca
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Zsolt Borbely
Comment 1
2014-05-30 01:43:12 PDT
Created
attachment 232284
[details]
Proposed patch
Brian Burg
Comment 2
2014-05-30 07:25:27 PDT
Comment on
attachment 232284
[details]
Proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=232284&action=review
> Source/JavaScriptCore/ChangeLog:3 > + Buildfix on Linux, uint64_t and unsigned long conflict
Generally, I name replay-related bugs like 'Web Replay: [bug title]' so that they are easier to find later. But that's just my preference.
> Source/JavaScriptCore/ChangeLog:8 > + The uint64_t and unsigned long do the same typedef
I think the issue is that they are distinct types on Darwin [1], whereas on Linux and maybe other platforms they are typedefed to the same type. So, this guard may end up being #if !OS(LINUX) depending on whatever windows does. I think it's fine for now. [1]
https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man5/types.5.html
Darin Adler
Comment 3
2014-05-30 15:19:42 PDT
Comment on
attachment 232284
[details]
Proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=232284&action=review
> Source/JavaScriptCore/replay/EncodedValue.h:161 > +#if OS(DARWIN) > template<> struct EncodingTraits<unsigned long> : public ScalarEncodingTraits<unsigned long> { }; > +#endif
I don’t think this is the correct conditional. This is a property of the compiler and compiler configuration, not the OS. Further, we may be able to find a better way to avoid this. Lets ask Anders what he suggests.
Anders Carlsson
Comment 4
2014-05-31 16:50:42 PDT
Comment on
attachment 232284
[details]
Proposed patch I think it's wrong that there are traits for unsigned long. We should only encode/decode explicitly sized types. I think the right fix is to remove the unsigned long specialization, see what breaks and then add the necessary casts.
Brian Burg
Comment 5
2014-05-31 16:59:41 PDT
(In reply to
comment #4
)
> (From update of
attachment 232284
[details]
) > I think it's wrong that there are traits for unsigned long. We should only encode/decode explicitly sized types. > > I think the right fix is to remove the unsigned long specialization, see what breaks and then add the necessary casts.
Sounds like the right fix to me. IIRC, the only unsigned long is for encode/decode network request identifiers, which haven't landed yet anyway (but have been up for review for a long time).
Csaba Osztrogonác
Comment 6
2014-06-04 03:00:19 PDT
*** This bug has been marked as a duplicate of
bug 133430
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug